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