equal
deleted
inserted
replaced
393 mkdir -p $@ |
393 mkdir -p $@ |
394 |
394 |
395 ################################################################ |
395 ################################################################ |
396 # Word frequency statistic. |
396 # Word frequency statistic. |
397 |
397 |
|
398 define FREQLIST_MACRO |
|
399 FREQLIST_OPT += -freq:freq:$(1)=$(2) |
|
400 FREQLIST_DEP += $(2) |
|
401 endef |
|
402 FREQLIST_OPT := |
|
403 FREQLIST_DEP := |
|
404 |
398 # For dictd and anki. |
405 # 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 |
406 $(eval $(call FREQLIST_MACRO,GSL,wordlist/gsl.freq)) |
|
407 $(eval $(call FREQLIST_MACRO,AWL,wordlist/awl.freq)) |
|
408 $(eval $(call FREQLIST_MACRO,NGSL,wordlist/ngsl.freq)) |
|
409 $(eval $(call FREQLIST_MACRO,NAWL,wordlist/nawl.freq)) |
|
410 FREQLIST_OPT += -freq:var:VOA=dist/wordlist/voa.list |
|
411 FREQLIST_DEP += dist/wordlist/voa.list |
400 |
412 |
401 FREQ_DEP := |
413 FREQ_DEP := |
402 FREQ_FILTER := |
414 FREQ_FILTER := |
403 |
415 |
404 # BNC_COCA_BASEWORD := $(wildcard wordlist/bnc+coca/basewrd[0-1]?.txt) |
416 # BNC_COCA_BASEWORD := $(wildcard wordlist/bnc+coca/basewrd[0-1]?.txt) |
445 cat $(GSL_BASEWORD) >$@ |
457 cat $(GSL_BASEWORD) >$@ |
446 |
458 |
447 dist/wordlist/ngsl.var: $(NGSL_BASEWORD) | dist/wordlist/ |
459 dist/wordlist/ngsl.var: $(NGSL_BASEWORD) | dist/wordlist/ |
448 cat $(NGSL_BASEWORD) >$@ |
460 cat $(NGSL_BASEWORD) >$@ |
449 |
461 |
450 dist/wordlist/voa.list: gadict_voa.gadict py/gadict_headwords.py | dist/wordlist/ |
462 dist/wordlist/voa.list: gadict_voa.gadict py/gadict_headwords.py $(MAKEFILE_LIST) | dist/wordlist/ |
451 python3 -B py/gadict_headwords.py gadict_voa.gadict >$@ |
463 python3 -B py/gadict_headwords.py gadict_voa.gadict >$@ |
452 |
464 |
453 dist/wordlist/: |
465 dist/wordlist/: |
454 mkdir -p $@ |
466 mkdir -p $@ |
455 |
467 |
483 dist/dictd/%.c5.name dist/dictd/%.c5.url: dist/dictd/%.c5 |
495 dist/dictd/%.c5.name dist/dictd/%.c5.url: dist/dictd/%.c5 |
484 : |
496 : |
485 |
497 |
486 # -B suppress __pycache__ dir |
498 # -B suppress __pycache__ dir |
487 |
499 |
488 dist/dictd/gadict_en-ru+uk.c5: gadict_en-ru+uk.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/ |
500 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/ |
489 python3 -B py/gadict_c5.py $(FREQLIST_OPT) $< $@ |
501 python3 -B py/gadict_c5.py $(FREQLIST_OPT) $< $@ |
490 echo "gadict En-Ru+Uk"> dist/dictd/gadict_en-ru+uk.c5.name |
502 echo "gadict En-Ru+Uk"> dist/dictd/gadict_en-ru+uk.c5.name |
491 |
503 |
492 dist/dictd/gadict_en-ru.c5: gadict_en-ru+uk.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/ |
504 dist/dictd/gadict_en-ru.c5: gadict_en-ru+uk.gadict py/gadict.py py/gadict_c5.py $(MAKEFILE_LIST) | dist/dictd/ |
493 python3 -B py/gadict_c5.py $< $@ -lang:ru |
505 python3 -B py/gadict_c5.py $< $@ -lang:ru |
510 srs: $(SRS_ANKI_FILES) $(SRS_TAB_FILES) |
522 srs: $(SRS_ANKI_FILES) $(SRS_TAB_FILES) |
511 |
523 |
512 .PHONY: anki |
524 .PHONY: anki |
513 anki: $(SRS_ANKI_FILES) |
525 anki: $(SRS_ANKI_FILES) |
514 |
526 |
515 dist/srs/%.apkg: %.gadict %.del py/gadict.py py/gadict_srs_anki.py $(MAKEFILE_LIST) | dist/srs/ |
527 dist/srs/%.apkg: %.gadict %.del py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/srs/ |
516 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(FREQLIST_OPT) $< $@ |
528 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(FREQLIST_OPT) $< $@ |
517 |
529 |
518 dist/srs/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(MAKEFILE_LIST) | dist/srs/ |
530 dist/srs/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/srs/ |
519 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(FREQLIST_OPT) $< $@ |
531 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(FREQLIST_OPT) $< $@ |
520 |
532 |
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/ |
533 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/ |
522 python3 -B py/gadict_srs_tab.py $< $@ -lang:ru,uk |
534 python3 -B py/gadict_srs_tab.py $< $@ -lang:ru,uk |
523 |
535 |