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