]> git.donarmstrong.com Git - lilypond.git/blob - make/doclang-targets.make
Fix disappearing PNGs in Info HTML translated docs
[lilypond.git] / make / doclang-targets.make
1 # assumes depth and ISOLANG are defined
2
3 OUT_ITEXI_FILES = $(ITELY_FILES:%.itely=$(outdir)/%.itexi)
4
5 LILYPOND_BOOK_INCLUDES += \
6   -I$(top-src-dir)/Documentation/user \
7   -I$(top-build-dir)/Documentation/user/$(outdir)
8
9 default:
10
11 $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
12
13 MAKEINFO = LANG=$(ISOLANG) $(MAKEINFO_PROGRAM) --force
14
15 $(outdir)/lilypond/index.html: $(outdir)/lilypond.nexi doc-po
16         mkdir -p $(dir $@)
17         -$(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
18         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)
19
20 # we don't make the big page until the whole manual is translated
21 # if this happens, we'll have to define local-WWW differently for this language
22 #$(outdir)/lilypond.html: $(outdir)/lilypond.nexi
23 #       -$(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $< 
24
25 local-WWW: png-ln $(outdir)/lilypond/index.html lang-merge
26
27 lang-merge:
28         $(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) &&) true
29
30 LINKED_PNGS = henle-flat-gray.png baer-flat-gray.png lily-flat-bw.png
31
32 # makeinfo is broken, it MUST have PNGs in output dir
33 # strangely, this is not true for ly PNGs
34 # symlinking PNGs...
35 png-ln:
36         mkdir -p $(outdir)/lilypond
37         cd $(outdir) && $(foreach i, $(LINKED_PNGS), ln -sf ../$(depth)/Documentation/user/$(i) $(i) &&) true
38         cd $(outdir)/lilypond && $(foreach i, $(LINKED_PNGS), ln -sf ../../$(depth)/Documentation/user/$(i) $(i) &&) true
39
40 local-WWW-clean: deep-WWW-clean
41
42 deep-WWW-clean:
43         rm -rf $(outdir)/lilypond
44
45 web-clean: clean
46         $(MAKE) out=www local-WWW-clean
47
48 doc-po:
49         $(MAKE) -C $(depth)/Documentation/po messages