--- a/Makefile Sat Jul 08 01:19:51 2017 +0300
+++ b/Makefile Sat Jul 08 01:21:00 2017 +0300
@@ -112,6 +112,10 @@
LATEX2PDF := pdflatex
+ifeq '$(ANKI_PY_DIR)' ''
+ ANKI_PY_DIR := /usr/share/anki
+endif
+
################################################################
# Install paths.
@@ -618,17 +622,17 @@
# Specific rules (due to renames or other customization).
dist/anki/gadict.apkg: gadict.gadict $(GADICT_DEL_FILE) py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/
- PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name="gadict_en-ru+uk" -rich $(GADICT_DEL_OPT) $(FREQLIST_OPT) $< $@
+ PYTHONPATH=$(ANKI_PY_DIR): python -B py/gadict_srs_anki.py -name="gadict_en-ru+uk" -rich $(GADICT_DEL_OPT) $(FREQLIST_OPT) $< $@
dist/anki/gadict_voa.apkg: gadict_voa.gadict py/gadict.py py/gadict_srs_anki.py $(VOA_FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/
- PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name="gadict_voa" $(VOA_FREQLIST_OPT) $< $@
+ PYTHONPATH=$(ANKI_PY_DIR): python -B py/gadict_srs_anki.py -name="gadict_voa" $(VOA_FREQLIST_OPT) $< $@
# General rules.
dist/anki/%.apkg: %.gadict %.del py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/
- PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name=$* -rich -delfile=$*.del $(FREQLIST_OPT) $< $@
+ PYTHONPATH=$(ANKI_PY_DIR): python -B py/gadict_srs_anki.py -name=$* -rich -delfile=$*.del $(FREQLIST_OPT) $< $@
dist/anki/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/
- PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name=$* -rich $(FREQLIST_OPT) $< $@
+ PYTHONPATH=$(ANKI_PY_DIR): python -B py/gadict_srs_anki.py -name=$* -rich $(FREQLIST_OPT) $< $@
.PHONY: tab
tab: $(SRS_TAB_FILES)