]> 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 ifneq ($(INFO_IMAGES_DIR),)
12
13 # make dereferences symlinks, and $(INFO_IMAGES_DIR) is a symlink
14 # to $(outdir), so we can't use directly $(INFO_IMAGES_DIR) as a
15 # prerequisite, otherwise %.info are always outdated (because older
16 # than $(outdir), hence this .dep file
17
18 $(outdir)/%.info-images-dir.dep: $(outdir)/%.texi
19         rm -f $*
20         ln -s $(outdir) $*
21         mkdir -p $(outdir)/$*
22         find $(outdir)/$*/ -name '*'.png | xargs rm -f
23         (cd $(outdir)/$*/ ; ln -sf ../*.png . )
24         touch $@
25
26 else
27
28 $(outdir)/.info-images-dir.dep:
29         touch $@
30
31 endif
32
33 # Settings for texi2html:
34 ifneq ($(ISOLANG),) 
35 TEXI2HTML_LANG = --lang=$ISOLANG
36 endif
37 TEXI2HTML_FLAGS += --css-ref=lilypond.css $(DOCUMENTATION_INCLUDES)
38 TEXI2HTML = $(TEXI2HTML_PROGRAM) $(TEXI2HTML_FLAGS) $(TEXI2HTML_LANG)
39
40
41
42 $(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir.dep
43         $(MAKEINFO) -I$(outdir) --output=$@ $<
44
45
46 $(outdir)/%/index.html: $(outdir)/%.texi
47         mkdir -p $(dir $@)
48         $(TEXI2HTML) --I=$(outdir) --output=$(dir $@) --prefix=index --split=section $(TEXI2HTML_INIT) $<
49         cp $(top-src-dir)/Documentation/lilypond.css $(dir $@)
50
51 # TODO: Pass -D bigpage to texi2html
52 $(outdir)/%-big-page.html: $(outdir)/%.texi
53         $(TEXI2HTML) --I=$(outdir) --output=$@ $(TEXI2HTML_INIT) $< 
54         cp $(top-src-dir)/Documentation/lilypond.css $(dir $@)
55
56 $(outdir)/%.html: $(outdir)/%.texi
57         $(TEXI2HTML) --I=$(outdir) --output=$@ $(TEXI2HTML_INIT) $<
58         cp $(top-src-dir)/Documentation/lilypond.css $(dir $@)
59
60 $(outdir)/%.html.omf: %.texi
61         $(call GENERATE_OMF,html)
62
63 $(outdir)/%.pdf.omf: %.texi
64         $(call GENERATE_OMF,pdf)
65
66 $(outdir)/%.ps.gz.omf: %.texi
67         $(call GENERATE_OMF,ps.gz)
68
69 $(outdir)/%.pdf: $(outdir)/%.texi
70         cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) --batch $(TEXINFO_PAPERSIZE_OPTION) $(<F)
71
72 $(outdir)/%.txt: $(outdir)/%.texi
73         $(MAKEINFO) -I $(src-dir) -I $(outdir) --no-split --no-headers --output $@ $<
74
75 $(outdir)/%.texi: %.texi
76         rm -f $@
77         cp $< $@
78
79
80