Merge branch 'master' of ssh+git://git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / GNUmakefile
bloba2b1730e02d3c34b0c1d7deded1ff606de739a08
1 depth = ..
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
12 include $(depth)/make/stepmake.make
14 default: local-doc
16 local-WWW: txt-to-html $(outdir)/index.html
18 local-WWW-clean: deep-WWW-clean
20 deep-WWW-clean:
21 rm -rf $(outdir)/wiki-dump
23 OUT_TXT_FILES = $(addprefix $(outdir)/, $(addsuffix .txt, $(README_TOP_FILES)))
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)
30 po-update:
31 make -C po po-update
33 all-translations-update: po-update
34 $(foreach lang, $(LANGS), make ISOLANG=$(lang) skeleton-update snippet-update &&) true
36 ifneq ($(ISOLANG),)
37 new-lang:
38 @if (( $$(file -b $(ISOLANG)) == directory )) 2>/dev/null; \
39 then echo "Error: $(ISOLANG) directory already exists. Exiting." ; \
40 exit 3 ; \
42 mkdir -p $(ISOLANG)/user
43 cp fr/GNUmakefile $(ISOLANG)
44 cp fr/user/GNUmakefile $(ISOLANG)/user
45 sed -i -e 's/ISOLANG *= *fr/ISOLANG = $(ISOLANG)/' $(ISOLANG)/GNUmakefile $(ISOLANG)/user/GNUmakefile
46 $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -b "UNTRANSLATED NODE: IGNORE ME" -l $(ISOLANG) -o doc.pot --skeleton --gettext ../user/lilypond.tely
47 mv $(outdir)/*.*tely $(ISOLANG)/user
48 msgmerge -U po/lilypond-doc.pot $(outdir)/doc.pot
49 cp po/lilypond-doc.pot po/$(ISOLANG).po
50 @echo "*** Please add a language definition for $(ISOLANG) in buildscripts/langdefs.py ***"
52 check-translation:
53 find $(ISOLANG)/user/ -name '*.*tely' | xargs $(PYTHON) $(buildscript-dir)/check_translation.py $(buildscript-dir) $(ISOLANG)/index.html.in
55 skeleton-update:
56 $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -b "UNTRANSLATED NODE: IGNORE ME" -l $(ISOLANG) --skeleton ../user/lilypond.tely
57 $(PYTHON) $(buildscript-dir)/texi-skeleton-update.py $(ISOLANG)/user $(outdir)
59 snippet-update:
60 $(PYTHON) $(buildscript-dir)/update-snippets.py user $(ISOLANG)/user '*.itely'
61 endif