]> git.donarmstrong.com Git - lilypond.git/blob - make/doclang-targets.make
Remove mf-to-table tex output. Fixes scons font build.
[lilypond.git] / make / doclang-targets.make
1 # one assumes depth and ISOLANG are defined
2
3 OUT_ITEXI_FILES = $(ITELY_FILES:%.itely=$(outdir)/%.itexi)
4
5 TEXINFO_PAPERSIZE_OPTION= $(if $(findstring $(PAPERSIZE),a4),,-t @afourpaper)
6
7 LILYPOND_BOOK_INCLUDES += \
8   -I$(top-src-dir)/Documentation/user \
9   -I$(top-build-dir)/Documentation/user/$(outdir)
10
11 default:
12
13 $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
14
15 MAKEINFO = LANG=$(ISOLANG) $(MAKEINFO_PROGRAM) --force
16
17 $(outdir)/lilypond/index.html: $(outdir)/lilypond.nexi $(outdir)/user-ln doc-po
18         mkdir -p $(dir $@)
19         -$(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
20         find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | xargs $(PYTHON) $(buildscript-dir)/html-gettext.py $(buildscript-dir) $(top-build-dir)/Documentation/po/$(outdir) $(ISOLANG)
21
22 # we don't make the big page until the whole manual is translated
23 # if this happens, we'll have to define local-WWW differently for this language
24 #$(outdir)/lilypond.html: $(outdir)/lilypond.nexi
25 #       -$(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $< 
26
27 $(outdir)/%.pdf: $(outdir)/%.texi $(outdir)/user-ln doc-po
28         $(PYTHON) $(buildscript-dir)/texi-gettext.py $(buildscript-dir) $(top-build-dir)/Documentation/po/$(outdir) $(ISOLANG) $<
29         cd $(outdir); texi2pdf --batch $(TEXINFO_PAPERSIZE_OPTION) $(notdir $*).pdftexi
30
31 local-WWW: $(outdir)/lilypond.pdf $(outdir)/lilypond/index.html
32         cd $(outdir); find -name '*.html' | xargs grep -L --label="" 'UNTRANSLATED NODE: IGNORE ME' | xargs $(PYTHON) ../$(buildscript-dir)/mass-link.py --prepend-suffix .$(ISOLANG) hard . $(top-build-dir)/Documentation/user/$(outdir) lilypond.pdf
33         cd $(outdir); find \( -name 'lily-??????????.png' -o -name 'lily-??????????.ly' \) -a -not -type l | xargs $(PYTHON) ../$(buildscript-dir)/mass-link.py hard . $(top-build-dir)/Documentation/user/$(outdir)
34 # FIXME
35 # ugh, this is not enough to avoid wasting build time, $(outdir)/user-ln should be touched for all languages
36         touch -mr $(top-build-dir)/Documentation/user/$(outdir) $(outdir)/user-ln
37
38 LINKED_PNGS = henle-flat-gray.png baer-flat-gray.png lily-flat-bw.png
39
40 # makeinfo is broken, it MUST have PNGs in output dir
41 # symlinking PNGs...
42 # lilypond-book -I flag seems broken too, and texi2pdf -I flag confuses
43 # pdfetex with .aux and other files from English manual
44 # symlinking lily-*...
45 $(outdir)/user-ln: $(top-build-dir)/Documentation/user/$(outdir)
46         touch -mr $(top-build-dir)/Documentation/user/$(outdir) $@
47         mkdir -p $(outdir)/lilypond
48         $(PYTHON) $(buildscript-dir)/mass-link.py symbolic $(top-build-dir)/Documentation/user/$(outdir) $(outdir) 'lily-*.pdf' 'lily-*.tex' 'lily-*.texi' 'lily-*.ly' 'lily-*.txt' 'lily-*.png' 'henle-flat-gray.*' 'baer-flat-gray.*' 'lily-flat-bw.*'
49         cd $(outdir)/lilypond && $(foreach i, $(LINKED_PNGS), ln -sf ../../$(depth)/Documentation/user/$(i) $(i) &&) true
50
51 local-WWW-clean: deep-WWW-clean
52
53 deep-WWW-clean:
54         rm -rf $(outdir)/lilypond
55
56 web-clean: clean
57         $(MAKE) out=www local-WWW-clean
58
59 doc-po:
60         $(MAKE) -C $(depth)/Documentation/po messages