1 # one assumes depth and ISOLANG are defined
3 OUT_ITEXI_FILES = $(ITELY_FILES:%.itely=$(outdir)/%.itexi)
5 TEXINFO_PAPERSIZE_OPTION= $(if $(findstring $(PAPERSIZE),a4),,-t @afourpaper)
7 LILYPOND_BOOK_INCLUDES += \
8 -I$(top-src-dir)/Documentation/user \
9 -I$(top-build-dir)/Documentation/user/$(outdir)
13 $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
15 MAKEINFO = LANG=$(ISOLANG) $(MAKEINFO_PROGRAM) --force
17 $(outdir)/lilypond/index.html: png-ln $(outdir)/lilypond.nexi doc-po
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)
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 $<
27 $(outdir)/%.pdf: $(outdir)/%.texi $(outdir)/lilypond/index.html
28 $(PYTHON) $(buildscript-dir)/texi-gettext.py $(buildscript-dir) $(top-build-dir)/Documentation/po/$(outdir) $(ISOLANG) $(<)
29 cd $(outdir); texi2pdf -I $(top-build-dir)/Documentation/user/$(outdir) --batch $(TEXINFO_PAPERSIZE_OPTION) $(<F)
31 local-WWW: $(outdir)/lilypond/index.html $(outdir)/lilypond.pdf lang-merge
33 lang-merge: $(outdir)/lilypond/index.html $(outdir)/lilypond.pdf
34 $(foreach i, $(shell find $(outdir) -name '*.html' | xargs grep -L --label="" 'UNTRANSLATED NODE: IGNORE ME'), ln -f $(i) $(i:$(outdir)/%.html=$(depth)/Documentation/user/$(outdir)/%.$(ISOLANG).html) &&) ln -f $(outdir)/lilypond.pdf $(depth)/Documentation/user/$(outdir)/lilypond.$(ISOLANG).pdf && true
36 LINKED_PNGS = henle-flat-gray.png baer-flat-gray.png lily-flat-bw.png
38 # makeinfo is broken, it MUST have PNGs in output dir
39 # strangely, this is not true for ly PNGs
42 mkdir -p $(outdir)/lilypond
43 cd $(outdir) && $(foreach i, $(LINKED_PNGS), ln -sf ../$(depth)/Documentation/user/$(i) $(i) &&) true
44 cd $(outdir)/lilypond && $(foreach i, $(LINKED_PNGS), ln -sf ../../$(depth)/Documentation/user/$(i) $(i) &&) true
46 local-WWW-clean: deep-WWW-clean
49 rm -rf $(outdir)/lilypond
52 $(MAKE) out=www local-WWW-clean
55 $(MAKE) -C $(depth)/Documentation/po messages