Revert "update fret diagrams regression test"
[lilypond/csorensen.git] / Documentation / GNUmakefile
blob15b6a6f297bec3e562a6497df84475d4bf553f63
1 depth = ..
3 NAME = documentation
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 default: local-doc
16 local-WWW: txt-to-html $(outdir)/index.html $(outdir)/devel.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 translation-status
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) -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 python/langdefs.py ***"
52 CHECKED_FILES = $(ISOLANG)/index.html.in $(shell find $(ISOLANG)/user/ -maxdepth 1 -name '*.*te??')
54 TELY_FILES = $(call src-wildcard,$(ISOLANG)/user/*.tely)
55 skeleton-update:
56 $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) --skeleton $(TELY_FILES:$(ISOLANG)/user/%.tely=../user/%.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'
62 DOCUMENTS_INCLUDES:=-I $(ISOLANG)/user \
63 -I $(top-build-dir)/Documentation/$(ISOLANG)/user/out-www \
64 -I $(top-src-dir)/input/lsr \
65 -I $(top-build-dir)/input/lsr/out-www \
66 -I user -I $(top-build-dir)/Documentation/user/out-www
68 else # ISOLANG is empty
70 DOCUMENTS_INCLUDES:=-I user \
71 -I $(top-build-dir)/Documentation/user/out-www \
72 -I $(top-src-dir)/input/lsr \
73 -I $(top-build-dir)/input/lsr/out-www
75 endif # ISOLANG
77 check-xrefs:
78 $(PYTHON) $(buildscript-dir)/check_texi_refs.py --batch \
79 $(DOCUMENTS_INCLUDES) $(buildscript-dir)/manuals_definitions.py
81 fix-xrefs:
82 $(PYTHON) $(buildscript-dir)/check_texi_refs.py --auto-fix \
83 $(DOCUMENTS_INCLUDES) $(buildscript-dir)/manuals_definitions.py
85 check-translation:
86 $(PYTHON) $(buildscript-dir)/check_translation.py $(buildscript-dir) $(CHECKED_FILES)
88 update-translation:
89 $(PYTHON) $(buildscript-dir)/check_translation.py --update $(buildscript-dir) $(CHECKED_FILES)
91 translation-status:
92 make -C po out=www messages
93 $(PYTHON) $(buildscript-dir)/translations-status.py $(buildscript-dir)
95 local-help: extra-local-help
97 extra-local-help:
98 @echo -e "\
99 check-xrefs [ISOLANG=LL] validate Texinfo cross-references\n\
100 fix-xrefs [ISOLANG=LL] interactively fix Texinfo cross-references (use with caution)\n\
102 Translations specific targets (see TRANSLATION for details):\n\
103 new-lang ISOLANG=LL create and initialize subdirectory \'LL' for language \'LL\n\
104 po-update update and replace PO files for documentation with msgmerged versions\n\
105 check-translation ISOLANG=LL show changes in English docs since last translation update\n\
106 update-translation ISOLANG=LL call $$$$EDITOR to help updating the translation\n\
107 skeleton-update ISOLANG=LL update Texinfo skeleton files\n\
108 snippet-update ISOLANG=LL update ly snippets in Texinfo translation according to\n\
109 docs in English (use with caution)\n\
111 LL refers to the desired locale (most often only the ISO 639 language code).\n"
113 info:
114 $(MAKE) -C user info