--- a/Makefile Fri May 08 22:13:02 2020 +0300
+++ b/Makefile Fri May 08 23:19:32 2020 +0300
@@ -147,8 +147,14 @@
DICTDZ_FILES := $(C5_FILES:.c5=.dict.dz)
INDEX_FILES := $(C5_FILES:.c5=.index)
+GAPHRASE_FILES := $(wildcard *.gaphrase)
+GADIALOG_FILES := $(wildcard *.gadialog)
+
SRS_TAB_FILES := $(patsubst %.gadict,dist/srs/%.tab.txt,$(GADICT_FILES))
-SRS_ANKI_FILES := $(patsubst %.gadict,dist/anki/%.apkg,$(GADICT_FILES)) dist/anki/gadialog.apkg
+SRS_ANKI_FILES := \
+ $(patsubst %.gadict,dist/anki/%.apkg,$(GADICT_FILES)) \
+ $(patsubst %.gaphrase,dist/anki/%.apkg,$(GAPHRASE_FILES)) \
+ $(patsubst %.gadialog,dist/anki/%.apkg,$(GADIALOG_FILES))
DICT_HTML_FILES := $(patsubst %.gadict,dist/html/%.html,$(GADICT_FILES))
@@ -670,6 +676,9 @@
dist/anki/%.apkg: %.gadialog py/gadialog_srs_anki.py $(MAKEFILE_LIST) | dist/anki/
PYTHONPATH=$(ANKI_PY_DIR): LC_ALL=en_US.utf8 python3 -B py/gadialog_srs_anki.py -name="$*" $< $@
+dist/anki/%.apkg: %.gaphrase py/gaphrase_srs_anki.py $(MAKEFILE_LIST) | dist/anki/
+ PYTHONPATH=$(ANKI_PY_DIR): LC_ALL=en_US.utf8 python3 -B py/gaphrase_srs_anki.py -name="$*" $< $@
+
# General rules.
dist/anki/%.apkg: %.gadict %.del py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/
PYTHONPATH=$(ANKI_PY_DIR): LC_ALL=en_US.utf8 python3 -B py/gadict_srs_anki.py -name=$* -rich -delfile=$*.del $(FREQLIST_OPT) $< $@