Makefile
changeset 771 7c81eb58b618
parent 770 71b9d7ea4885
parent 769 7877b9a74af7
child 772 ea173f7395a0
equal deleted inserted replaced
770:71b9d7ea4885 771:7c81eb58b618
   456 FREQ_FILTER += $(patsubst %,-b:%,$(VOA_BASEWORD))
   456 FREQ_FILTER += $(patsubst %,-b:%,$(VOA_BASEWORD))
   457 
   457 
   458 FREQ_FILTER += -12000f:wordlist/oanc.freq
   458 FREQ_FILTER += -12000f:wordlist/oanc.freq
   459 
   459 
   460 .PHONY: freq
   460 .PHONY: freq
   461 freq: dist/wordlist/gadict_en-ru+uk.list py/gadict_freq.py $(FREQ_DEP) $(BUILD_SCRIPTS)
   461 freq: dist/wordlist/gadict.list py/gadict_freq.py $(FREQ_DEP) $(BUILD_SCRIPTS)
   462 	python3 -B py/gadict_freq.py +b:dist/wordlist/gadict_en-ru+uk.list $(FREQ_FILTER)
   462 	python3 -B py/gadict_freq.py +b:dist/wordlist/gadict.list $(FREQ_FILTER)
   463 
   463 
   464 .PHONY: missing
   464 .PHONY: missing
   465 missing: missing-words missing-stat
   465 missing: missing-words missing-stat
   466 
   466 
   467 .PHONY: missing-words
   467 .PHONY: missing-words
   468 missing-words: dist/wordlist/gadict_en-ru+uk.list $(FREQ_DEP) $(BUILD_SCRIPTS)
   468 missing-words: dist/wordlist/gadict.list $(FREQ_DEP) $(BUILD_SCRIPTS)
   469 	@echo ===== VOA =====
   469 	@echo ===== VOA =====
   470 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +b:dist/wordlist/voa.list
   470 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +b:dist/wordlist/voa.list
   471 	@echo ===== GSL =====
   471 	@echo ===== GSL =====
   472 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +f:wordlist/gsl.freq
   472 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +f:wordlist/gsl.freq
   473 	@echo ===== AWL =====
   473 	@echo ===== AWL =====
   474 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +f:wordlist/awl.freq
   474 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +f:wordlist/awl.freq
   475 	@echo ===== NGSL =====
   475 	@echo ===== NGSL =====
   476 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +f:wordlist/ngsl.freq
   476 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +f:wordlist/ngsl.freq
   477 	@echo ===== NAWL =====
   477 	@echo ===== NAWL =====
   478 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +f:wordlist/nawl.freq
   478 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +f:wordlist/nawl.freq
   479 	@echo ===== BSL =====
   479 	@echo ===== BSL =====
   480 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +b:wordlist/bsl.var
   480 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +b:wordlist/bsl.var
   481 	@echo ===== TSL =====
   481 	@echo ===== TSL =====
   482 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +b:wordlist/tsl.var
   482 	python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +b:wordlist/tsl.var
   483 
   483 
   484 .PHONY: missing-stat
   484 .PHONY: missing-stat
   485 missing-stat: dist/wordlist/gadict_en-ru+uk.list $(FREQ_DEP) $(BUILD_SCRIPTS)
   485 missing-stat: dist/wordlist/gadict.list $(FREQ_DEP) $(BUILD_SCRIPTS)
   486 	@echo ====== Missing words stat =======
   486 	@echo ====== Missing words stat =======
   487 	@printf "%4s: %4s / %4s\n" VOA `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +b:dist/wordlist/voa.list | wc -l` `wc -l <dist/wordlist/voa.list`
   487 	@printf "%4s: %4s / %4s\n" VOA `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +b:dist/wordlist/voa.list | wc -l` `wc -l <dist/wordlist/voa.list`
   488 	@printf "%4s: %4s / %4s\n" GSL `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +f:wordlist/gsl.freq | wc -l` `wc -l <wordlist/gsl.freq`
   488 	@printf "%4s: %4s / %4s\n" GSL `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +f:wordlist/gsl.freq | wc -l` `wc -l <wordlist/gsl.freq`
   489 	@printf "%4s: %4s / %4s\n" AWL `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +f:wordlist/awl.freq | wc -l` `wc -l <wordlist/awl.freq`
   489 	@printf "%4s: %4s / %4s\n" AWL `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +f:wordlist/awl.freq | wc -l` `wc -l <wordlist/awl.freq`
   490 	@printf "%4s: %4s / %4s\n" NGSL `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +f:wordlist/ngsl.freq | wc -l` `wc -l <wordlist/ngsl.freq`
   490 	@printf "%4s: %4s / %4s\n" NGSL `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +f:wordlist/ngsl.freq | wc -l` `wc -l <wordlist/ngsl.freq`
   491 	@printf "%4s: %4s / %4s\n" NAWL `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +f:wordlist/nawl.freq | wc -l` `wc -l <wordlist/nawl.freq`
   491 	@printf "%4s: %4s / %4s\n" NAWL `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +f:wordlist/nawl.freq | wc -l` `wc -l <wordlist/nawl.freq`
   492 	@printf "%4s: %4s / %4s\n" BSL `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +b:wordlist/bsl.var | wc -l` `wc -l <wordlist/bsl.var`
   492 	@printf "%4s: %4s / %4s\n" BSL `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +b:wordlist/bsl.var | wc -l` `wc -l <wordlist/bsl.var`
   493 	@printf "%4s: %4s / %4s\n" TSL `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict_en-ru+uk.list +b:wordlist/tsl.var | wc -l` `wc -l <wordlist/tsl.var`
   493 	@printf "%4s: %4s / %4s\n" TSL `python3 -B py/gadict_freq.py -b:dist/wordlist/gadict.list +b:wordlist/tsl.var | wc -l` `wc -l <wordlist/tsl.var`
   494 
   494 
   495 dist/wordlist/%.list: %.gadict py/gadict_headwords.py $(BUILD_SCRIPTS) | dist/wordlist/
   495 dist/wordlist/%.list: %.gadict py/gadict_headwords.py $(BUILD_SCRIPTS) | dist/wordlist/
   496 	python3 -B py/gadict_headwords.py  $< $@
   496 	python3 -B py/gadict_headwords.py  $< $@
   497 
   497 
   498 dist/wordlist/gsl.var: $(GSL_BASEWORD) | dist/wordlist/
   498 dist/wordlist/gsl.var: $(GSL_BASEWORD) | dist/wordlist/
   537 dist/dictd/%.c5.name dist/dictd/%.c5.url: dist/dictd/%.c5
   537 dist/dictd/%.c5.name dist/dictd/%.c5.url: dist/dictd/%.c5
   538 	:
   538 	:
   539 
   539 
   540 # -B  suppress __pycache__ dir
   540 # -B  suppress __pycache__ dir
   541 
   541 
   542 dist/dictd/gadict_en-ru+uk.c5: gadict_en-ru+uk.gadict $(FREQLIST_DEP) py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/
   542 dist/dictd/gadict.c5: gadict.gadict $(FREQLIST_DEP) py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/
   543 	python3 -B py/gadict_c5.py $(FREQLIST_OPT)  $< $@
   543 	python3 -B py/gadict_c5.py $(FREQLIST_OPT)  $< $@
   544 	echo "gadict En-Ru+Uk"> dist/dictd/gadict_en-ru+uk.c5.name
   544 	echo "gadict En-Ru+Uk"> dist/dictd/gadict.c5.name
   545 
   545 
   546 dist/dictd/gadict_en-ru.c5: gadict_en-ru+uk.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/
   546 dist/dictd/gadict_en-ru.c5: gadict.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/
   547 	python3 -B py/gadict_c5.py  $< $@ -lang:ru
   547 	python3 -B py/gadict_c5.py  $< $@ -lang:ru
   548 	echo "gadict En-Ru"> dist/dictd/gadict_en-ru.c5.name
   548 	echo "gadict En-Ru"> dist/dictd/gadict_en-ru.c5.name
   549 
   549 
   550 dist/dictd/gadict_en-uk.c5: gadict_en-ru+uk.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/
   550 dist/dictd/gadict_en-uk.c5: gadict.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/
   551 	python3 -B py/gadict_c5.py  $< $@ -lang:uk
   551 	python3 -B py/gadict_c5.py  $< $@ -lang:uk
   552 	echo "gadict En-Uk"> dist/dictd/gadict_en-uk.c5.name
   552 	echo "gadict En-Uk"> dist/dictd/gadict_en-uk.c5.name
   553 
   553 
   554 dist/dictd/gadict_voa.c5: gadict_voa.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/
   554 dist/dictd/gadict_voa.c5: gadict_voa.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/
   555 	python3 -B py/gadict_c5.py  $< $@ -lang:en
   555 	python3 -B py/gadict_c5.py  $< $@ -lang:en
   573 	PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name=gadict_voa $(VOA_FREQLIST_OPT) $< $@
   573 	PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name=gadict_voa $(VOA_FREQLIST_OPT) $< $@
   574 
   574 
   575 dist/anki/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/
   575 dist/anki/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/
   576 	PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name=$* -rich -delfile=$*.del $(FREQLIST_OPT) $< $@
   576 	PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name=$* -rich -delfile=$*.del $(FREQLIST_OPT) $< $@
   577 
   577 
   578 dist/srs/gadict_en-ru+uk.tab.txt: gadict_en-ru+uk.gadict py/gadict.py py/gadict_srs_tab.py $(MAKEFILE_LIST) | dist/srs/
   578 dist/srs/gadict.tab.txt: gadict.gadict py/gadict.py py/gadict_srs_tab.py $(MAKEFILE_LIST) | dist/srs/
   579 	python3 -B py/gadict_srs_tab.py  $< $@ -lang:ru,uk
   579 	python3 -B py/gadict_srs_tab.py  $< $@ -lang:ru,uk
   580 
   580 
   581 dist/srs/%.tab.txt: %.gadict py/gadict.py py/gadict_srs_tab.py $(MAKEFILE_LIST) | dist/srs/
   581 dist/srs/%.tab.txt: %.gadict py/gadict.py py/gadict_srs_tab.py $(MAKEFILE_LIST) | dist/srs/
   582 	python3 -B py/gadict_srs_tab.py  $< $@
   582 	python3 -B py/gadict_srs_tab.py  $< $@
   583 
   583 
   702 
   702 
   703 # Install:
   703 # Install:
   704 #   $ sudo apt-get install python3-enchant hunspell-en-us hunspell-en-gb hunspell-en-au hunspell-en-ca
   704 #   $ sudo apt-get install python3-enchant hunspell-en-us hunspell-en-gb hunspell-en-au hunspell-en-ca
   705 .PHONY: check
   705 .PHONY: check
   706 check:
   706 check:
   707 	python3 -B py/gadict_spellcheck.py gadict_en-ru+uk.gadict
   707 	python3 -B py/gadict_spellcheck.py gadict.gadict
   708 
   708 
   709 ################################################################
   709 ################################################################
   710 # Clean targets.
   710 # Clean targets.
   711 
   711 
   712 .PHONY: distclean
   712 .PHONY: distclean