393 mkdir -p $@ |
393 mkdir -p $@ |
394 |
394 |
395 ################################################################ |
395 ################################################################ |
396 # Word frequency statistic. |
396 # Word frequency statistic. |
397 |
397 |
|
398 # For dictd and anki. |
|
399 FREQLIST_OPT := -freq:freq:GSL=wordlist/gsl.freq -freq:freq:AWL=wordlist/awl.freq -freq:freq:NGSL=wordlist/ngsl.freq -freq:freq:NAWL=wordlist/nawl.freq |
|
400 |
398 FREQ_DEP := |
401 FREQ_DEP := |
399 FREQ_FILTER := |
402 FREQ_FILTER := |
400 |
403 |
401 # BNC_COCA_BASEWORD := $(wildcard wordlist/bnc+coca/basewrd[0-1]?.txt) |
404 # BNC_COCA_BASEWORD := $(wildcard wordlist/bnc+coca/basewrd[0-1]?.txt) |
402 # FREQ_DEP += $(BNC_COCA_BASEWORD) |
405 # FREQ_DEP += $(BNC_COCA_BASEWORD) |
480 dist/dictd/%.c5.name dist/dictd/%.c5.url: dist/dictd/%.c5 |
483 dist/dictd/%.c5.name dist/dictd/%.c5.url: dist/dictd/%.c5 |
481 : |
484 : |
482 |
485 |
483 # -B suppress __pycache__ dir |
486 # -B suppress __pycache__ dir |
484 |
487 |
485 dist/dictd/gadict_en-ru.c5: gadict_en-ru+uk.gadict py/gadict.py py/gadict_c5.py | dist/dictd/ |
488 dist/dictd/gadict_en-ru+uk.c5: gadict_en-ru+uk.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/ |
|
489 python3 -B py/gadict_c5.py $(FREQLIST_OPT) $< $@ |
|
490 echo "gadict En-Ru+Uk"> dist/dictd/gadict_en-ru+uk.c5.name |
|
491 |
|
492 dist/dictd/gadict_en-ru.c5: gadict_en-ru+uk.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/ |
486 python3 -B py/gadict_c5.py $< $@ -lang:ru |
493 python3 -B py/gadict_c5.py $< $@ -lang:ru |
487 echo "gadict En-Ru"> dist/dictd/gadict_en-ru.c5.name |
494 echo "gadict En-Ru"> dist/dictd/gadict_en-ru.c5.name |
488 |
495 |
489 dist/dictd/gadict_en-uk.c5: gadict_en-ru+uk.gadict py/gadict.py py/gadict_c5.py | dist/dictd/ |
496 dist/dictd/gadict_en-uk.c5: gadict_en-ru+uk.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/ |
490 python3 -B py/gadict_c5.py $< $@ -lang:uk |
497 python3 -B py/gadict_c5.py $< $@ -lang:uk |
491 echo "gadict En-Uk"> dist/dictd/gadict_en-uk.c5.name |
498 echo "gadict En-Uk"> dist/dictd/gadict_en-uk.c5.name |
492 |
499 |
493 dist/dictd/gadict_voa.c5: gadict_voa.gadict py/gadict.py py/gadict_c5.py | dist/dictd/ |
500 dist/dictd/gadict_voa.c5: gadict_voa.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/ |
494 python3 -B py/gadict_c5.py $< $@ -lang:en |
501 python3 -B py/gadict_c5.py $< $@ -lang:en |
495 |
502 |
496 dist/dictd/%.c5: %.gadict py/gadict.py py/gadict_c5.py | dist/dictd/ |
503 dist/dictd/%.c5: %.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/ |
497 python3 -B py/gadict_c5.py $< $@ |
504 python3 -B py/gadict_c5.py $< $@ |
498 |
505 |
499 dist/dictd/: |
506 dist/dictd/: |
500 mkdir -p $@ |
507 mkdir -p $@ |
501 |
508 |
504 |
511 |
505 .PHONY: anki |
512 .PHONY: anki |
506 anki: $(SRS_ANKI_FILES) |
513 anki: $(SRS_ANKI_FILES) |
507 |
514 |
508 dist/srs/%.apkg: %.gadict %.del py/gadict.py py/gadict_srs_anki.py $(MAKEFILE_LIST) | dist/srs/ |
515 dist/srs/%.apkg: %.gadict %.del py/gadict.py py/gadict_srs_anki.py $(MAKEFILE_LIST) | dist/srs/ |
509 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $< $@ |
516 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(FREQLIST_OPT) $< $@ |
510 |
517 |
511 dist/srs/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(MAKEFILE_LIST) | dist/srs/ |
518 dist/srs/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(MAKEFILE_LIST) | dist/srs/ |
512 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $< $@ |
519 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(FREQLIST_OPT) $< $@ |
513 |
520 |
514 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/ |
521 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/ |
515 python3 -B py/gadict_srs_tab.py $< $@ -lang:ru,uk |
522 python3 -B py/gadict_srs_tab.py $< $@ -lang:ru,uk |
516 |
523 |
517 dist/srs/%.tab.txt: %.gadict py/gadict.py py/gadict_srs_tab.py $(MAKEFILE_LIST) | dist/srs/ |
524 dist/srs/%.tab.txt: %.gadict py/gadict.py py/gadict_srs_tab.py $(MAKEFILE_LIST) | dist/srs/ |