]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/GNUmakefile
Add index.html.in to translation checking
[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 TRANSLATION
11
12 include $(depth)/make/stepmake.make
13
14 default: local-doc
15
16 local-WWW: 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 OUT_TXT_FILES = $(addprefix $(outdir)/, $(addsuffix .txt, $(README_TOP_FILES)))
24
25 # cd $(outdir) rule gets bit hairy for --srcdir configure builds
26 txt-to-html:
27         $(foreach a, $(README_TOP_FILES), cp $(top-src-dir)/$(a) $(outdir)/$(a).txt && ) true
28         $(PYTHON) $(step-bindir)/text2html.py $(OUT_TXT_FILES)
29
30 po-update:
31         make -C po po-update
32
33 ifneq ($(ISOLANG),)
34 new-lang:
35         @if (( $$(file -b $(ISOLANG)) == directory )) 2>/dev/null; \
36         then echo "Error: $(ISOLANG) directory already exists. Exiting." ; \
37         exit 3 ; \
38         fi
39         mkdir -p $(ISOLANG)/user
40         cp fr/GNUmakefile $(ISOLANG)
41         cp fr/user/GNUmakefile $(ISOLANG)/user
42         sed -i -e 's/ISOLANG *= *fr/ISOLANG = $(ISOLANG)/' $(ISOLANG)/GNUmakefile $(ISOLANG)/user/GNUmakefile
43         $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -b "UNTRANSLATED NODE: IGNORE ME" -l $(ISOLANG) -o doc.pot --skeleton --gettext ../user/lilypond.tely
44         mv $(outdir)/*.*tely $(ISOLANG)/user
45         msgmerge -U po/lilypond-doc.pot $(outdir)/doc.pot
46         cp po/lilypond-doc.pot po/$(ISOLANG).po
47         @echo "***  Please add a language definition for $(ISOLANG) in buildscripts/langdefs.py  ***"
48
49 check-translation:
50         find $(ISOLANG)/user/ -name '*.*tely' | xargs $(PYTHON) $(buildscript-dir)/check_translation.py $(buildscript-dir) $(ISOLANG)/index.html.in
51
52 skeleton-update:
53         $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -b "UNTRANSLATED NODE: IGNORE ME" -l $(ISOLANG) --skeleton ../user/lilypond.tely
54         $(PYTHON) $(buildscript-dir)/texi-skeleton-update.py $(ISOLANG)/user $(outdir)
55 endif