]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/GNUmakefile
Improve doc translation infrastructure
[lilypond.git] / Documentation / GNUmakefile
1 depth = ..
2
3 NAME = documentation
4 LANGS = $(shell $(PYTHON) $(buildscript-dir)/langdefs.py)
5 SUBDIRS=user bibliography pictures topdocs misc po $(LANGS)
6 STEPMAKE_TEMPLATES=documentation texinfo tex
7 LOCALSTEPMAKE_TEMPLATES=lilypond ly
8 LILYPOND_BOOK_FLAGS=--extra-options '-e "(ly:set-option (quote internal-type-checking) \#t)"'
9 README_TOP_FILES= DEDICATION THANKS 
10 EXTRA_DIST_FILES= texinfo.css
11
12 include $(depth)/make/stepmake.make
13
14 default: local-doc
15
16 local-WWW: copy-for-me txt-to-html $(outdir)/index.html
17
18 local-WWW-clean: deep-WWW-clean
19
20 deep-WWW-clean:
21         rm -rf $(outdir)/wiki-dump
22
23 copy-for-me:
24         $(foreach a, $(README_TOP_FILES), cp $(top-src-dir)/$(a) $(outdir)/$(a).txt && ) true
25
26 OUT_TXT_FILES = $(addprefix $(outdir)/, $(addsuffix .txt, $(README_TOP_FILES)))
27
28 # cd $(outdir) rule gets bit hairy for --srcdir configure builds
29 txt-to-html:
30         $(PYTHON) $(step-bindir)/text2html.py $(OUT_TXT_FILES)
31
32 po-update:
33         make -C po po-update
34
35 ifneq ($(ISOLANG),)
36 new-lang:
37         @if (( $$(file -b $(ISOLANG)) == directory )) 2>/dev/null; \
38         then echo "Error: $(ISOLANG) directory already exists. Exiting." ; \
39         exit 3 ; \
40         fi
41         mkdir -p $(ISOLANG)/user
42         cp fr/GNUmakefile $(ISOLANG)
43         cp fr/user/GNUmakefile $(ISOLANG)/user
44         sed -i -e 's/ISOLANG *= *fr/ISOLANG = $(ISOLANG)/' $(ISOLANG)/GNUmakefile $(ISOLANG)/user/GNUmakefile
45         $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -b "UNTRANSLATED NODE: IGNORE ME" -l $(ISOLANG) -o doc.pot --skeleton --gettext ../user/lilypond.tely
46         mv $(outdir)/*.*tely $(ISOLANG)/user
47         msgmerge -U po/lilypond-doc.pot $(outdir)/doc.pot
48         cp po/lilypond-doc.pot po/$(ISOLANG).po
49         @echo "***  Please add a language definition for $(ISOLANG) in buildscripts/langdefs.py  ***"
50
51 check-translation:
52         find $(ISOLANG)/user/ -name '*.*tely' | xargs $(PYTHON) $(buildscript-dir)/check_translation.py $(buildscript-dir)
53
54 skeleton-update:
55         $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -b "UNTRANSLATED NODE: IGNORE ME" -l $(ISOLANG) --skeleton ../user/lilypond.tely
56         $(PYTHON) $(buildscript-dir)/texi-skeleton-update.py $(ISOLANG)/user $(outdir)
57 endif