]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/texinfo-rules.make
f676dc69f2716083693cc1fb1dcee042b2be79c8
[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 $(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir.dep $(outdir)/version.texi
34         $(MAKEINFO) -I$(outdir) --output=$@ $<
35
36
37 $(outdir)/%/index.html: $(outdir)/%.texi $(outdir)/version.texi
38         mkdir -p $(dir $@)
39         $(TEXI2HTML) --I=$(outdir) --output=$(dir $@) --prefix=index --split=section $(TEXI2HTML_INIT) $<
40         cp $(top-src-dir)/Documentation/lilypond.css $(dir $@)
41
42 $(outdir)/%-big-page.html: $(outdir)/%.texi $(outdir)/version.texi
43         $(TEXI2HTML) --I=$(outdir) -D bigpage --output=$@ $(TEXI2HTML_INIT) $< 
44         cp $(top-src-dir)/Documentation/lilypond.css $(dir $@)
45
46 $(outdir)/%.html: $(outdir)/%.texi $(outdir)/version.texi
47         $(TEXI2HTML) --I=$(outdir) --output=$@ $(TEXI2HTML_INIT) $<
48         cp $(top-src-dir)/Documentation/lilypond.css $(dir $@)
49
50 $(outdir)/%.html.omf: %.texi
51         $(call GENERATE_OMF,html)
52
53 $(outdir)/%.pdf.omf: %.texi
54         $(call GENERATE_OMF,pdf)
55
56 $(outdir)/%.ps.gz.omf: %.texi
57         $(call GENERATE_OMF,ps.gz)
58
59 $(outdir)/%.pdf: $(outdir)/%.texi $(outdir)/version.texi
60         cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) --batch $(TEXINFO_PAPERSIZE_OPTION) $(<F)
61
62 $(outdir)/%.txt: $(outdir)/%.texi $(outdir)/version.texi
63         $(MAKEINFO) -I $(src-dir) -I $(outdir) --no-split --no-headers --output $@ $<
64
65 $(outdir)/%.texi: %.texi
66         rm -f $@
67         cp $< $@
68
69 $(outdir)/version.%: $(top-src-dir)/VERSION
70         echo '@macro version'> $@
71         echo $(TOPLEVEL_VERSION)>> $@
72         echo '@end macro'>> $@
73