142 DICT_FILES := $(C5_FILES:.c5=.dict) |
142 DICT_FILES := $(C5_FILES:.c5=.dict) |
143 DICTDZ_FILES := $(C5_FILES:.c5=.dict.dz) |
143 DICTDZ_FILES := $(C5_FILES:.c5=.dict.dz) |
144 INDEX_FILES := $(C5_FILES:.c5=.index) |
144 INDEX_FILES := $(C5_FILES:.c5=.index) |
145 |
145 |
146 SRS_TAB_FILES := $(patsubst %.gadict,dist/srs/%.tab.txt,$(GADICT_FILES)) |
146 SRS_TAB_FILES := $(patsubst %.gadict,dist/srs/%.tab.txt,$(GADICT_FILES)) |
147 SRS_ANKI_FILES := $(patsubst %.gadict,dist/srs/%.apkg,$(GADICT_FILES)) |
147 SRS_ANKI_FILES := $(patsubst %.gadict,dist/anki/%.apkg,$(GADICT_FILES)) |
148 |
148 |
149 RST_TMPL_FILE = dist/misc/rst.tmpl |
149 RST_TMPL_FILE = dist/misc/rst.tmpl |
150 RST_CSS_FILE = www/tmpl/rst.css |
150 RST_CSS_FILE = www/tmpl/rst.css |
151 |
151 |
152 RST_FILES := $(wildcard www/*.rst) |
152 RST_FILES := $(wildcard www/*.rst) |
331 DISTREL_DICTDZ_FILES := $(patsubst %,dist/$(fullpkgname)/dictd/%,$(notdir $(DICTDZ_FILES))) |
331 DISTREL_DICTDZ_FILES := $(patsubst %,dist/$(fullpkgname)/dictd/%,$(notdir $(DICTDZ_FILES))) |
332 DISTREL_INDEX_FILES := $(patsubst %,dist/$(fullpkgname)/dictd/%,$(notdir $(INDEX_FILES))) |
332 DISTREL_INDEX_FILES := $(patsubst %,dist/$(fullpkgname)/dictd/%,$(notdir $(INDEX_FILES))) |
333 DISTREL_RST_FILES := $(patsubst %,dist/$(fullpkgname)/doc/txt/%,$(notdir $(RST_FILES))) |
333 DISTREL_RST_FILES := $(patsubst %,dist/$(fullpkgname)/doc/txt/%,$(notdir $(RST_FILES))) |
334 DISTREL_HTML_FILES := $(patsubst %,dist/$(fullpkgname)/doc/html/%,$(notdir $(RST_HTML_FILES))) |
334 DISTREL_HTML_FILES := $(patsubst %,dist/$(fullpkgname)/doc/html/%,$(notdir $(RST_HTML_FILES))) |
335 DISTREL_SRS_TAB_FILES := $(patsubst %,dist/$(fullpkgname)/srs/%,$(notdir $(SRS_TAB_FILES))) |
335 DISTREL_SRS_TAB_FILES := $(patsubst %,dist/$(fullpkgname)/srs/%,$(notdir $(SRS_TAB_FILES))) |
336 DISTREL_SRS_ANKI_FILES := $(patsubst %,dist/$(fullpkgname)/srs/%,$(notdir $(SRS_ANKI_FILES))) |
336 DISTREL_SRS_ANKI_FILES := $(patsubst %,dist/$(fullpkgname)/anki/%,$(notdir $(SRS_ANKI_FILES))) |
337 |
337 |
338 dist/$(fullpkgname).tar.gz: $(DISTREL_DICTDZ_FILES) $(DISTREL_INDEX_FILES) $(DISTREL_SRS_TAB_FILES) $(DISTREL_SRS_ANKI_FILES) $(DISTREL_RST_FILES) $(DISTREL_HTML_FILES) $(BUILD_SCRIPTS) |
338 dist/$(fullpkgname).tar.gz: $(DISTREL_DICTDZ_FILES) $(DISTREL_INDEX_FILES) $(DISTREL_SRS_TAB_FILES) $(DISTREL_SRS_ANKI_FILES) $(DISTREL_RST_FILES) $(DISTREL_HTML_FILES) $(BUILD_SCRIPTS) |
339 rm -rf $@ |
339 rm -rf $@ |
340 tar zcf $@ -C dist/ $(fullpkgname) |
340 tar zcf $@ -C dist/ $(fullpkgname) |
341 |
341 |
347 cp $< $@ |
347 cp $< $@ |
348 |
348 |
349 $(DISTREL_SRS_TAB_FILES): dist/$(fullpkgname)/srs/%: dist/srs/% | dist/$(fullpkgname)/srs/ |
349 $(DISTREL_SRS_TAB_FILES): dist/$(fullpkgname)/srs/%: dist/srs/% | dist/$(fullpkgname)/srs/ |
350 cp $< $@ |
350 cp $< $@ |
351 |
351 |
352 $(DISTREL_SRS_ANKI_FILES): dist/$(fullpkgname)/srs/%: dist/srs/% | dist/$(fullpkgname)/srs/ |
352 $(DISTREL_SRS_ANKI_FILES): dist/$(fullpkgname)/anki/%: dist/anki/% | dist/$(fullpkgname)/anki/ |
353 cp $< $@ |
353 cp $< $@ |
354 |
354 |
355 $(DISTREL_RST_FILES): dist/$(fullpkgname)/doc/txt/%: www/% | dist/$(fullpkgname)/doc/txt/ |
355 $(DISTREL_RST_FILES): dist/$(fullpkgname)/doc/txt/%: www/% | dist/$(fullpkgname)/doc/txt/ |
356 cp $< $@ |
356 cp $< $@ |
357 |
357 |
358 $(DISTREL_HTML_FILES): dist/$(fullpkgname)/doc/html/%: dist/www/% | dist/$(fullpkgname)/doc/html/ |
358 $(DISTREL_HTML_FILES): dist/$(fullpkgname)/doc/html/%: dist/www/% | dist/$(fullpkgname)/doc/html/ |
359 cp $< $@ |
359 cp $< $@ |
360 |
360 |
361 $(patsubst %,dist/$(fullpkgname)/%, dictd/ srs/ doc/txt/ doc/html/): |
361 $(patsubst %,dist/$(fullpkgname)/%, dictd/ srs/ anki/ doc/txt/ doc/html/): |
362 mkdir -p $@ |
362 mkdir -p $@ |
363 |
363 |
364 .PHONY: dist-src |
364 .PHONY: dist-src |
365 dist-src: $(DISTSRC_TARBALLS) |
365 dist-src: $(DISTSRC_TARBALLS) |
366 |
366 |
526 srs: $(SRS_ANKI_FILES) $(SRS_TAB_FILES) |
526 srs: $(SRS_ANKI_FILES) $(SRS_TAB_FILES) |
527 |
527 |
528 .PHONY: anki |
528 .PHONY: anki |
529 anki: $(SRS_ANKI_FILES) |
529 anki: $(SRS_ANKI_FILES) |
530 |
530 |
531 dist/srs/%.apkg: %.gadict %.del py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/srs/ |
531 dist/anki/%.apkg: %.gadict %.del py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/ |
532 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(FREQLIST_OPT) $< $@ |
532 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(FREQLIST_OPT) $< $@ |
533 |
533 |
534 dist/srs/gadict_voa.apkg: gadict_voa.gadict py/gadict.py py/gadict_srs_anki.py $(VOA_FREQLIST_DEP) $(MAKEFILE_LIST) | dist/srs/ |
534 dist/anki/gadict_voa.apkg: gadict_voa.gadict py/gadict.py py/gadict_srs_anki.py $(VOA_FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/ |
535 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(VOA_FREQLIST_OPT) $< $@ |
535 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(VOA_FREQLIST_OPT) $< $@ |
536 |
536 |
537 dist/srs/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/srs/ |
537 dist/anki/%.apkg: %.gadict py/gadict.py py/gadict_srs_anki.py $(FREQLIST_DEP) $(MAKEFILE_LIST) | dist/anki/ |
538 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(FREQLIST_OPT) $< $@ |
538 PYTHONPATH=/usr/share/anki: python -B py/gadict_srs_anki.py $(FREQLIST_OPT) $< $@ |
539 |
539 |
540 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/ |
540 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/ |
541 python3 -B py/gadict_srs_tab.py $< $@ -lang:ru,uk |
541 python3 -B py/gadict_srs_tab.py $< $@ -lang:ru,uk |
542 |
542 |
543 dist/srs/%.tab.txt: %.gadict py/gadict.py py/gadict_srs_tab.py $(MAKEFILE_LIST) | dist/srs/ |
543 dist/srs/%.tab.txt: %.gadict py/gadict.py py/gadict_srs_tab.py $(MAKEFILE_LIST) | dist/srs/ |
544 python3 -B py/gadict_srs_tab.py $< $@ |
544 python3 -B py/gadict_srs_tab.py $< $@ |
545 |
545 |
546 dist/srs/: |
546 dist/anki/ dist/srs/: |
547 mkdir -p $@ |
547 mkdir -p $@ |
548 |
548 |
549 ################################################################ |
549 ################################################################ |
550 # Documentation targets. |
550 # Documentation targets. |
551 |
551 |