Further speed up make

Similar to cee85f422b.
pull/10/head
Khaled Hosny 2015-06-22 03:32:08 +02:00
parent e2cb07c427
commit 1140041c2b
1 changed files with 6 additions and 3 deletions

View File

@ -58,8 +58,6 @@ FLAGS = AD AE AF AG AI AL AM AO AR AS AT AU AW AX AZ \
FLAGS_SRC_DIR = third_party/region-flags/png FLAGS_SRC_DIR = third_party/region-flags/png
FLAGS_DIR = ./flags FLAGS_DIR = ./flags
glyph_name = $(shell ./flag_glyph_name.py $(flag))
GLYPH_NAMES := $(shell ./flag_glyph_name.py $(FLAGS)) GLYPH_NAMES := $(shell ./flag_glyph_name.py $(FLAGS))
WAVED_FLAGS := $(foreach flag,$(FLAGS),$(FLAGS_DIR)/$(flag).png) WAVED_FLAGS := $(foreach flag,$(FLAGS),$(FLAGS_DIR)/$(flag).png)
PNG128_FLAGS := $(foreach glyph_name,$(GLYPH_NAMES),$(addprefix ./png/128/emoji_$(glyph_name),.png)) PNG128_FLAGS := $(foreach glyph_name,$(GLYPH_NAMES),$(addprefix ./png/128/emoji_$(glyph_name),.png))
@ -71,7 +69,12 @@ $(FLAGS_DIR)/%.png: $(FLAGS_SRC_DIR)/%.png ./waveflag "$(PNGQUANT)"
"$(PNGQUANT)" $(PNGQUANTFLAGS) "$@" "$(PNGQUANT)" $(PNGQUANTFLAGS) "$@"
flag-symlinks: $(WAVED_FLAGS) flag-symlinks: $(WAVED_FLAGS)
$(foreach flag,$(FLAGS),ln -fs ../../flags/$(flag).png ./png/128/emoji_$(glyph_name).png;) $(subst ^, , \
$(join \
$(FLAGS:%=ln^-fs^../../flags/%.png^), \
$(GLYPH_NAMES:%=./png/128/emoji_%.png;) \
) \
)
$(PNG128_FLAGS): flag-symlinks $(PNG128_FLAGS): flag-symlinks