4 LANGS = $(shell $(PYTHON) $(top-src-dir)/python/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 HTML_PAGE_NAMES= index devel translations
15 OUT_HTML_FILES= $(HTML_PAGE_NAMES:%=$(outdir)/%.html)
19 local-WWW: txt-to-html $(OUT_HTML_FILES)
21 local-WWW-clean: deep-WWW-clean
24 rm -rf $(outdir)/wiki-dump
26 OUT_TXT_FILES = $(addprefix $(outdir)/, $(addsuffix .txt, $(README_TOP_FILES)))
28 # cd $(outdir) rule gets bit hairy for --srcdir configure builds
30 $(foreach a, $(README_TOP_FILES), cp $(top-src-dir)/$(a) $(outdir)/$(a).txt && ) true
31 $(PYTHON) $(step-bindir)/text2html.py $(OUT_TXT_FILES)
36 all-translations-update: po-update translation-status
37 $(foreach lang, $(LANGS), make ISOLANG=$(lang) skeleton-update snippet-update &&) true
41 @if (( $$(file -b $(ISOLANG)) == directory )) 2>/dev/null; \
42 then echo "Error: $(ISOLANG) directory already exists. Exiting." ; \
45 mkdir -p $(ISOLANG)/user
46 cp fr/GNUmakefile $(ISOLANG)
47 cp fr/user/GNUmakefile $(ISOLANG)/user
48 sed -i -e 's/ISOLANG *= *fr/ISOLANG = $(ISOLANG)/' $(ISOLANG)/GNUmakefile $(ISOLANG)/user/GNUmakefile
49 $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) -o doc.pot --skeleton --gettext ../user/lilypond-learning.tely
50 mv $(outdir)/*.*tely $(ISOLANG)/user
51 msgmerge -U po/lilypond-doc.pot $(outdir)/doc.pot
52 cp po/lilypond-doc.pot po/$(ISOLANG).po
53 @echo "*** Please add a language definition for $(ISOLANG) in python/langdefs.py ***"
55 CHECKED_FILES = $(ISOLANG)/index.html.in $(shell find $(ISOLANG)/user/ -maxdepth 1 -name '*.*te??')
57 TELY_FILES = $(call src-wildcard,$(ISOLANG)/user/*.tely)
59 $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) --skeleton $(TELY_FILES:$(ISOLANG)/user/%.tely=../user/%.tely)
60 $(PYTHON) $(buildscript-dir)/texi-skeleton-update.py $(ISOLANG)/user $(outdir)
63 $(PYTHON) $(buildscript-dir)/update-snippets.py user $(ISOLANG)/user '*.itely'
65 DOCUMENTS_INCLUDES:=-I $(ISOLANG)/user \
66 -I $(top-build-dir)/Documentation/$(ISOLANG)/user/out-www \
67 -I $(top-src-dir)/input/lsr \
68 -I $(top-build-dir)/input/lsr/out-www \
69 -I user -I $(top-build-dir)/Documentation/user/out-www
71 else # ISOLANG is empty
73 DOCUMENTS_INCLUDES:=-I user \
74 -I $(top-build-dir)/Documentation/user/out-www \
75 -I $(top-src-dir)/input/lsr \
76 -I $(top-build-dir)/input/lsr/out-www
81 $(PYTHON) $(buildscript-dir)/check_texi_refs.py --batch \
82 $(DOCUMENTS_INCLUDES) $(buildscript-dir)/manuals_definitions.py
85 $(PYTHON) $(buildscript-dir)/check_texi_refs.py --auto-fix \
86 $(DOCUMENTS_INCLUDES) $(buildscript-dir)/manuals_definitions.py
89 $(PYTHON) $(buildscript-dir)/check_translation.py $(buildscript-dir) $(CHECKED_FILES)
92 $(PYTHON) $(buildscript-dir)/check_translation.py --update $(buildscript-dir) $(CHECKED_FILES)
95 make -C po out=www messages
96 $(PYTHON) $(buildscript-dir)/translations-status.py $(buildscript-dir)
98 local-help: extra-local-help
102 check-xrefs [ISOLANG=LL] validate Texinfo cross-references\n\
103 fix-xrefs [ISOLANG=LL] interactively fix Texinfo cross-references (use with caution)\n\
105 Translations specific targets (see TRANSLATION for details):\n\
106 new-lang ISOLANG=LL create and initialize subdirectory \'LL' for language \'LL\n\
107 po-update update and replace PO files for documentation with msgmerged versions\n\
108 check-translation ISOLANG=LL show changes in English docs since last translation update\n\
109 update-translation ISOLANG=LL call $$$$EDITOR to help updating the translation\n\
110 skeleton-update ISOLANG=LL update Texinfo skeleton files\n\
111 snippet-update ISOLANG=LL update ly snippets in Texinfo translation according to\n\
112 docs in English (use with caution)\n\
114 LL refers to the desired locale (most often only the ISO 639 language code).\n"