--- a/Makefile Tue Nov 01 21:10:55 2016 +0200
+++ b/Makefile Wed Nov 02 21:16:39 2016 +0200
@@ -136,8 +136,9 @@
GADICT_FILES := $(wildcard *.gadict)
-C5_FILES := dist/dictd/gadict_en-ru+uk.c5 dist/dictd/gadict_voa.c5
+C5_FILES := $(patsubst %.gadict,dist/dictd/%.c5,$(GADICT_FILES))
ALL_C5_FILES := $(C5_FILES) dist/dictd/gadict_en-ru.c5 dist/dictd/gadict_en-uk.c5
+PNG_FILES := $(patsubst %.gadict,dist/dictd/%.png,$(GADICT_FILES))
DICT_FILES := $(C5_FILES:.c5=.dict)
DICTDZ_FILES := $(C5_FILES:.c5=.dict.dz)
INDEX_FILES := $(C5_FILES:.c5=.index)
@@ -379,6 +380,9 @@
dist/dictd/%.dict.dz: dist/dictd/%.dict
dictzip -c $< >$@
+dist/dictd/%.png: %.xpm | dist/dictd/
+ convert $< $@
+
GADICT_SUFFIXES := en-ru+uk en-ru en-uk voa
.SECONDARY: $(patsubst %,dist/dictd/gadict_%.c5.name,$(GADICT_SUFFIXES))
.SECONDARY: $(patsubst %,dist/dictd/gadict_%.c5.url,$(GADICT_SUFFIXES))
@@ -387,8 +391,6 @@
:
# -B suppress __pycache__ dir
-dist/dictd/gadict_en-ru+uk.c5: gadict_en-ru+uk.gadict py/gadict.py py/gadict_c5.py | dist/dictd/
- python3 -B py/gadict_c5.py $< $@
dist/dictd/gadict_en-ru.c5: gadict_en-ru+uk.gadict py/gadict.py py/gadict_c5.py | dist/dictd/
python3 -B py/gadict_c5.py $< $@ ru
@@ -401,6 +403,9 @@
dist/dictd/gadict_voa.c5: gadict_voa.gadict py/gadict.py py/gadict_c5.py | dist/dictd/
python3 -B py/gadict_c5.py $< $@ en
+dist/dictd/%.c5: %.gadict py/gadict.py py/gadict_c5.py | dist/dictd/
+ python3 -B py/gadict_c5.py $< $@
+
dist/dictd/:
mkdir -p $@
@@ -429,9 +434,9 @@
# Install/uninstall targets.
.PHONY: install
-install: $(DICTDZ_FILES) $(INDEX_FILES)
+install: $(DICTDZ_FILES) $(INDEX_FILES) $(PNG_FILES)
mkdir -p $(datadir) $(elispdir)
- for f in $(DICTDZ_FILES) $(INDEX_FILES); do \
+ for f in $(DICTDZ_FILES) $(INDEX_FILES) $(PNG_FILES); do \
$(INSTALL_DATA) $$f $(datadir); \
done
$(INSTALL_DATA) contrib/gadict.el $(elispdir)