]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/texinfo-rules.make
Merge branch 'master' of ssh://kainhofer@git.sv.gnu.org/srv/git/lilypond into dev...
[lilypond.git] / stepmake / stepmake / texinfo-rules.make
1
2 .SUFFIXES: .html .info .texi .texinfo
3
4 # "makeinfo --info" MUST be able to read PNGs from CWD for info images
5 # to work, hence $(INFO_IMAGES_DIR) -> $(outdir)/ symlink.
6 # $(outdir)/$(INFO_IMAGES_DIR)/*.png symlinks are only needed to view
7 # out-www/*.info with Emacs -- HTML docs no longer need these
8 # symlinks, see replace_symlinks_urls in
9 # buildscripts/add_html_footer.py.
10
11 # make dereferences symlinks, and $(INFO_IMAGES_DIR) is a symlink
12 # to $(outdir), so we can't use directly $(INFO_IMAGES_DIR) as a
13 # prerequisite, otherwise %.info are always outdated (because older
14 # than $(outdir), hence this .dep file
15
16 $(outdir)/$(INFO_IMAGES_DIR).info-images-dir.dep: $(INFO_DOCS:%=$(outdir)/%.texi)
17 ifneq ($(INFO_IMAGES_DIR),)
18         rm -f $(INFO_IMAGES_DIR)
19         ln -s $(outdir) $(INFO_IMAGES_DIR)
20         mkdir -p $(outdir)/$(INFO_IMAGES_DIR)
21         rm -f $(outdir)/$(INFO_IMAGES_DIR)/[a-f0-9][a-f0-9]
22         cd $(outdir)/$(INFO_IMAGES_DIR) && $(PYTHON) $(top-src-dir)/buildscripts/mass-link.py symbolic .. . [a-f0-9][a-f0-9]
23 endif
24         touch $@
25
26 # Settings for texi2html:
27 ifneq ($(ISOLANG),) 
28 TEXI2HTML_LANG = --lang=$ISOLANG
29 endif
30 TEXI2HTML_FLAGS += --css-ref=lilypond.css $(DOCUMENTATION_INCLUDES)
31 TEXI2HTML = $(TEXI2HTML_PROGRAM) $(TEXI2HTML_FLAGS) $(TEXI2HTML_LANG)
32
33
34
35 $(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir.dep
36         $(MAKEINFO) -I$(outdir) --output=$@ $<
37
38
39 $(outdir)/%/index.html: $(outdir)/%.texi
40         mkdir -p $(dir $@)
41         $(TEXI2HTML) --I=$(outdir) --output=$(dir $@) --prefix=index --split=section $(TEXI2HTML_INIT) $<
42         cp $(top-src-dir)/Documentation/lilypond.css $(dir $@)
43
44 $(outdir)/%-big-page.html: $(outdir)/%.texi
45         $(TEXI2HTML) --I=$(outdir) -D bigpage --output=$@ $(TEXI2HTML_INIT) $< 
46         cp $(top-src-dir)/Documentation/lilypond.css $(dir $@)
47
48 $(outdir)/%.html: $(outdir)/%.texi
49         $(TEXI2HTML) --I=$(outdir) --output=$@ $(TEXI2HTML_INIT) $<
50         cp $(top-src-dir)/Documentation/lilypond.css $(dir $@)
51
52 $(outdir)/%.html.omf: %.texi
53         $(call GENERATE_OMF,html)
54
55 $(outdir)/%.pdf.omf: %.texi
56         $(call GENERATE_OMF,pdf)
57
58 $(outdir)/%.ps.gz.omf: %.texi
59         $(call GENERATE_OMF,ps.gz)
60
61 $(outdir)/%.pdf: $(outdir)/%.texi
62         cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) --batch $(TEXINFO_PAPERSIZE_OPTION) $(<F)
63
64 $(outdir)/%.txt: $(outdir)/%.texi
65         $(MAKEINFO) -I $(src-dir) -I $(outdir) --no-split --no-headers --output $@ $<
66
67 $(outdir)/%.texi: %.texi
68         rm -f $@
69         cp $< $@
70
71
72