110 RST2HTML_RENDER_FLAGS := --strip-comments --embed-stylesheet --no-xml-declaration --math-output=HTML --initial-header-level=2 |
110 RST2HTML_RENDER_FLAGS := --strip-comments --embed-stylesheet --no-xml-declaration --math-output=HTML --initial-header-level=2 |
111 RST2HTML_FLAGS := $(RST_FLAGS) $(RST2HTML_RENDER_FLAGS) |
111 RST2HTML_FLAGS := $(RST_FLAGS) $(RST2HTML_RENDER_FLAGS) |
112 |
112 |
113 LATEX2PDF := pdflatex |
113 LATEX2PDF := pdflatex |
114 |
114 |
|
115 ifeq '$(ANKI_PY_DIR)' '' |
|
116 ANKI_PY_DIR := /usr/share/anki |
|
117 endif |
|
118 |
115 ################################################################ |
119 ################################################################ |
116 # Install paths. |
120 # Install paths. |
117 |
121 |
118 ifeq '$(origin prefix)' 'undefined' |
122 ifeq '$(origin prefix)' 'undefined' |
119 ifeq '$(shell id -u)' '0' |
123 ifeq '$(shell id -u)' '0' |
616 GADICT_DEL_OPT := -delfile=$(GADICT_DEL_FILE) |
620 GADICT_DEL_OPT := -delfile=$(GADICT_DEL_FILE) |
617 endif |
621 endif |
618 |
622 |
619 # Specific rules (due to renames or other customization). |
623 # Specific rules (due to renames or other customization). |
620 dist/anki/gadict.apkg: gadict.gadict $(GADICT_DEL_FILE) py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/ |
624 dist/anki/gadict.apkg: gadict.gadict $(GADICT_DEL_FILE) py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/ |
621 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name="gadict_en-ru+uk" -rich $(GADICT_DEL_OPT) $(FREQLIST_OPT) $< $@ |
625 PYTHONPATH=$(ANKI_PY_DIR): python -B py/gadict_srs_anki.py -name="gadict_en-ru+uk" -rich $(GADICT_DEL_OPT) $(FREQLIST_OPT) $< $@ |
622 |
626 |
623 dist/anki/gadict_voa.apkg: gadict_voa.gadict py/gadict.py py/gadict_srs_anki.py $(VOA_FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/ |
627 dist/anki/gadict_voa.apkg: gadict_voa.gadict py/gadict.py py/gadict_srs_anki.py $(VOA_FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/ |
624 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name="gadict_voa" $(VOA_FREQLIST_OPT) $< $@ |
628 PYTHONPATH=$(ANKI_PY_DIR): python -B py/gadict_srs_anki.py -name="gadict_voa" $(VOA_FREQLIST_OPT) $< $@ |
625 |
629 |
626 # General rules. |
630 # General rules. |
627 dist/anki/%.apkg: %.gadict %.del py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/ |
631 dist/anki/%.apkg: %.gadict %.del py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/ |
628 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name=$* -rich -delfile=$*.del $(FREQLIST_OPT) $< $@ |
632 PYTHONPATH=$(ANKI_PY_DIR): python -B py/gadict_srs_anki.py -name=$* -rich -delfile=$*.del $(FREQLIST_OPT) $< $@ |
629 |
633 |
630 dist/anki/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/ |
634 dist/anki/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/ |
631 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py -name=$* -rich $(FREQLIST_OPT) $< $@ |
635 PYTHONPATH=$(ANKI_PY_DIR): python -B py/gadict_srs_anki.py -name=$* -rich $(FREQLIST_OPT) $< $@ |
632 |
636 |
633 .PHONY: tab |
637 .PHONY: tab |
634 tab: $(SRS_TAB_FILES) |
638 tab: $(SRS_TAB_FILES) |
635 |
639 |
636 dist/srs/gadict.tab.txt: gadict.gadict py/gadict.py py/gadict_srs_tab.py $(MAKEFILE_LIST) | dist/srs/ |
640 dist/srs/gadict.tab.txt: gadict.gadict py/gadict.py py/gadict_srs_tab.py $(MAKEFILE_LIST) | dist/srs/ |