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