]> git.donarmstrong.com Git - lilypond.git/blob - make/doclang-targets.make
Language makefile tweaks.
[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$(depth)/Documentation/$(ISOLANG) \
7   -I$(depth)/Documentation/user \
8   -I$(builddir)/Documentation/user/$(outdir)
9
10 default: 
11
12 $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
13
14 MAKEINFO = LANG=$(ISOLANG) $(MAKEINFO_PROGRAM) --force
15
16 $(outdir)/lilypond/index.html: $(outdir)/lilypond.nexi doc-po
17         mkdir -p $(dir $@)
18         -$(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(depth)/Documentation/texinfo.css --html $<
19         find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | xargs $(PYTHON) $(depth)/buildscripts/html-gettext.py $(depth)/Documentation/po/$(outdir) $(ISOLANG)
20
21 $(outdir)/lilypond.html: $(outdir)/lilypond.nexi
22         -$(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(depth)/Documentation/texinfo.css --html --no-split --no-headers $< 
23
24 local-WWW: png-ln $(outdir)/lilypond.html $(outdir)/lilypond/index.html deep-ln lang-merge
25
26 lang-merge:
27         $(foreach i, $(shell find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME'), ln -f $(i) $(i:$(outdir)/%.html=$(depth)/Documentation/user/$(outdir)/%.$(ISOLANG).html) &&) true
28
29 png-ln:
30         mkdir -p $(outdir)/lilypond
31         # makeinfo is broken, it MUST have PNGs in output dir
32         # symlinking PNGs...
33         $(foreach i, $(shell find $(depth)/Documentation/user/$(outdir) -maxdepth 1 -name '*.png'), ln -sf ../$(i) $(i:$(depth)/Documentation/user/$(outdir)/%.png=$(outdir)/%.png) &&) true
34         $(foreach i, $(shell find $(depth)/Documentation/user/$(outdir)/lilypond -name '*.png'), ln -sf ../../$(i) $(i:$(depth)/Documentation/user/$(outdir)/%.png=$(outdir)/%.png) &&) true
35
36 # Links referred to by Documentation index
37 # BROKEN: the following makes broken symlinks
38 #LILYPOND_LINKS = Reference-Manual.html Tutorial.html Ly2dvi.html Midi2ly.html
39
40
41 deep-ln:
42         mkdir -p $(outdir)/lilypond
43         cd $(outdir)/lilypond && $(foreach i, $(LILYPOND_LINKS),\
44                  rm -f $(i) && ln -s lilypond.html $(i) &&) true
45
46 local-WWW-clean: deep-WWW-clean
47
48 deep-WWW-clean:
49         rm -rf $(outdir)/lilypond
50
51 web-clean: clean
52         $(MAKE) out=www local-WWW-clean
53
54 doc-po:
55         $(MAKE) -C $(depth)/Documentation/po messages