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)/%.nexi: $(ITELY_FILES) $(ITEXI_FILES)
15 MAKEINFO_FLAGS += --force
17 $(outdir)/%/index.html: $(outdir)/%.nexi $(outdir)/user-ln doc-po
19 -$(MAKEINFO) -I$(outdir) --output=$(outdir)/$* --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
21 # we don't make the big page until the whole manual is translated
22 # if this happens, we'll have to define local-WWW differently for this language
23 #$(outdir)/lilypond.html: $(outdir)/lilypond.nexi
24 # -$(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
26 $(outdir)/%.pdf: $(outdir)/%.texi $(outdir)/user-ln doc-po
27 $(PYTHON) $(buildscript-dir)/texi-gettext.py $(buildscript-dir) $(top-build-dir)/Documentation/po/$(outdir) $(ISOLANG) $<
28 cd $(outdir); texi2pdf --batch $(TEXINFO_PAPERSIZE_OPTION) $(notdir $*).pdftexi
30 TELY_FILES = $(call src-wildcard,*.tely)
31 DEEP_HTML_FILES = $(TELY_FILES:%.tely=$(outdir)/%/index.html)
32 PDF_FILES = $(TELY_FILES:%.tely=$(outdir)/%.pdf)
34 local-WWW: $(DEEP_HTML_FILES) $(PDF_FILES)
35 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)
36 find $(outdir) -name '*.html' | xargs grep -L --label="" 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(outdir)/!!g' | xargs $(PYTHON) $(buildscript-dir)/mass-link.py --prepend-suffix .$(ISOLANG) hard $(outdir) $(top-build-dir)/Documentation/user/$(outdir) $(TELY_FILES:%.tely=%.pdf)
37 find $(outdir) \( -name 'lily-??????????.png' -o -name 'lily-??????????.ly' \) -a -not -type l | sed 's!$(outdir)/!!g' | xargs $(PYTHON) $(buildscript-dir)/mass-link.py hard $(outdir) $(top-build-dir)/Documentation/user/$(outdir)
40 # ugh, this is not enough to avoid wasting build time, $(outdir)/user-ln should be touched for all languages
41 touch -mr $(top-build-dir)/Documentation/user/$(outdir) $(outdir)/user-ln
43 LINKED_PNGS = henle-flat-gray.png baer-flat-gray.png lily-flat-bw.png
45 # makeinfo is broken, it MUST have PNGs in output dir
47 # lilypond-book -I flag seems broken too, and texi2pdf -I flag confuses
48 # pdfetex with .aux and other files from English manual
49 # symlinking lily-*...
50 $(outdir)/user-ln: $(top-build-dir)/Documentation/user/$(outdir)
51 touch -mr $(top-build-dir)/Documentation/user/$(outdir) $@
52 $(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.*'
53 mkdir -p $(outdir)/lilypond
54 cd $(outdir)/lilypond && $(foreach i, $(LINKED_PNGS), ln -sf ../../$(depth)/Documentation/user/$(i) $(i) &&) true
56 local-WWW-clean: deep-WWW-clean
59 rm -rf $(outdir)/lilypond*
62 $(MAKE) out=www local-WWW-clean
65 $(MAKE) -C $(depth)/Documentation/po messages