--- a/Makefile Thu Sep 15 17:48:20 2016 +0300
+++ b/Makefile Thu Sep 15 19:19:34 2016 +0300
@@ -143,6 +143,7 @@
INDEX_FILES := $(C5_FILES:.c5=.index)
SRS_TAB_FILES := $(patsubst %.gadict,dist/srs/%.tab.txt,$(GADICT_FILES))
+SRS_ANKI_FILES := $(patsubst %.gadict,dist/srs/%.apkg,$(GADICT_FILES))
RST_TMPL_FILE = dist/misc/rst.tmpl
RST_CSS_FILE = www/tmpl/rst.css
@@ -394,7 +395,10 @@
mkdir -p $@
.PHONY: srs
-srs: $(SRS_TAB_FILES)
+srs: $(SRS_ANKI_FILES) $(SRS_TAB_FILES)
+
+dist/srs/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(MAKEFILE_LIST) | dist/srs/
+ PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $< $@
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/
python3 -B py/gadict_srs_tab.py $< $@ ru,uk