--- a/Makefile Fri Mar 03 14:44:37 2017 +0200
+++ b/Makefile Fri Mar 03 14:50:57 2017 +0200
@@ -566,12 +566,15 @@
.PHONY: anki
anki: $(SRS_ANKI_FILES)
+GADICT_DEL_FILE := $(wildcard gadict.del)
+GADICT_DEL_OPT :=
+ifneq '' '$(GADICT_DEL_FILE)'
+ GADICT_DEL_OPT := -delfile=$(GADICT_DEL_FILE)
+endif
+
# Specific rules (due to renames or other customization).
-dist/anki/gadict.apkg: gadict.gadict gadict.del py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/
- PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name="gadict_en-ru+uk" -rich -delfile=gadict.del $(FREQLIST_OPT) $< $@
-
-dist/anki/gadict.apkg: gadict.gadict py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/
- PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name="gadict_en-ru+uk" -rich $(FREQLIST_OPT) $< $@
+dist/anki/gadict.apkg: gadict.gadict $(GADICT_DEL_FILE) py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/
+ PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name="gadict_en-ru+uk" -rich $(GADICT_DEL_OPT) $(FREQLIST_OPT) $< $@
dist/anki/gadict_voa.apkg: gadict_voa.gadict py/gadict.py py/gadict_srs_anki.py $(VOA_FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/
PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name="gadict_voa" $(VOA_FREQLIST_OPT) $< $@