diff -r 3a3b6fe56883 -r 77df10cfe3ba Makefile --- a/Makefile Thu Nov 10 17:04:05 2016 +0200 +++ b/Makefile Thu Nov 10 18:43:41 2016 +0200 @@ -395,28 +395,29 @@ ################################################################ # Word frequency statistic. -define FREQLIST_FREQ_MACRO -FREQLIST_OPT += -freq:freq:$(1)=$(2) -FREQLIST_DEP += $(2) +define FREQ_MACRO +$(1)_OPT += -freq:$(2):$(3)=$(4) +$(1)_DEP += $(4) endef -define FREQLIST_VAR_MACRO -FREQLIST_OPT += -freq:var:$(1)=$(2) -FREQLIST_DEP += $(2) -endef -FREQLIST_OPT := -FREQLIST_DEP := -# For dictd and anki. -$(eval $(call FREQLIST_FREQ_MACRO,GSL,wordlist/gsl.freq)) -$(eval $(call FREQLIST_FREQ_MACRO,AWL,wordlist/awl.freq)) -$(eval $(call FREQLIST_FREQ_MACRO,NGSL,wordlist/ngsl.freq)) -$(eval $(call FREQLIST_FREQ_MACRO,NAWL,wordlist/nawl.freq)) -$(eval $(call FREQLIST_VAR_MACRO,VOA,dist/wordlist/voa.list)) -$(eval $(call FREQLIST_VAR_MACRO,BSL,wordlist/bsl.var)) -$(eval $(call FREQLIST_VAR_MACRO,TSL,wordlist/tsl.var)) +# For gadict_voa. +$(eval $(call FREQ_MACRO,VOA_FREQLIST,freq,GSL,wordlist/gsl.freq)) +$(eval $(call FREQ_MACRO,VOA_FREQLIST,freq,GSL,wordlist/gsl.freq)) +$(eval $(call FREQ_MACRO,VOA_FREQLIST,freq,AWL,wordlist/awl.freq)) +$(eval $(call FREQ_MACRO,VOA_FREQLIST,freq,NGSL,wordlist/ngsl.freq)) +$(eval $(call FREQ_MACRO,VOA_FREQLIST,freq,NAWL,wordlist/nawl.freq)) +$(eval $(call FREQ_MACRO,VOA_FREQLIST,var,BSL,wordlist/bsl.var)) +$(eval $(call FREQ_MACRO,VOA_FREQLIST,var,TSL,wordlist/tsl.var)) -FREQ_DEP := -FREQ_FILTER := +# For other dictionaries. +$(eval $(call FREQ_MACRO,FREQLIST,freq,GSL,wordlist/gsl.freq)) +$(eval $(call FREQ_MACRO,FREQLIST,freq,GSL,wordlist/gsl.freq)) +$(eval $(call FREQ_MACRO,FREQLIST,freq,AWL,wordlist/awl.freq)) +$(eval $(call FREQ_MACRO,FREQLIST,freq,NGSL,wordlist/ngsl.freq)) +$(eval $(call FREQ_MACRO,FREQLIST,freq,NAWL,wordlist/nawl.freq)) +$(eval $(call FREQ_MACRO,FREQLIST,var,VOA,dist/wordlist/voa.list)) +$(eval $(call FREQ_MACRO,FREQLIST,var,BSL,wordlist/bsl.var)) +$(eval $(call FREQ_MACRO,FREQLIST,var,TSL,wordlist/tsl.var)) # BNC_COCA_BASEWORD := $(wildcard wordlist/bnc+coca/basewrd[0-1]?.txt) # FREQ_DEP += $(BNC_COCA_BASEWORD) @@ -532,6 +533,9 @@ dist/srs/%.apkg: %.gadict %.del py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/srs/ PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(FREQLIST_OPT) $< $@ +dist/srs/gadict_voa.apkg: gadict_voa.gadict py/gadict.py py/gadict_srs_anki.py $(VOA_FREQLIST_DEP) $(MAKEFILE_LIST) | dist/srs/ + PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(VOA_FREQLIST_OPT) $< $@ + dist/srs/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/srs/ PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(FREQLIST_OPT) $< $@