]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/GNUmakefile
Merge branch 'master' of ssh+git://git.sv.gnu.org/srv/git/lilypond
[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 $(outdir)/devel.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 all-translations-update: po-update translation-status
34         $(foreach lang, $(LANGS), make ISOLANG=$(lang) skeleton-update snippet-update &&) true
35
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 ; \
41         fi
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-learning.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  ***"
51
52 CHECKED_FILES = $(ISOLANG)/index.html.in $(shell find $(ISOLANG)/user/ -maxdepth 1 -name '*.*te??')
53
54 TELY_FILES = $(call src-wildcard,$(ISOLANG)/user/*.tely)
55 skeleton-update:
56         $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -b "UNTRANSLATED NODE: IGNORE ME" -l $(ISOLANG) --skeleton $(TELY_FILES:$(ISOLANG)/user/%.tely=../user/%.tely)
57         $(PYTHON) $(buildscript-dir)/texi-skeleton-update.py $(ISOLANG)/user $(outdir)
58
59 snippet-update:
60         $(PYTHON) $(buildscript-dir)/update-snippets.py user $(ISOLANG)/user '*.itely'
61
62 endif
63
64 check-translation:
65         $(PYTHON) $(buildscript-dir)/check_translation.py $(buildscript-dir) $(CHECKED_FILES)
66
67 update-translation:
68         $(PYTHON) $(buildscript-dir)/check_translation.py --update $(buildscript-dir) $(CHECKED_FILES)
69
70 translation-status:
71         make -C po out=www messages
72         $(PYTHON) $(buildscript-dir)/translations-status.py $(buildscript-dir) po/out-www