2 .SUFFIXES: .html .info .texi .texinfo
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.
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
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]
26 # Settings for texi2html:
28 TEXI2HTML_LANG = --lang=$ISOLANG
30 TEXI2HTML_FLAGS += --css-ref=lilypond.css $(DOCUMENTATION_INCLUDES)
31 TEXI2HTML = $(TEXI2HTML_PROGRAM) $(TEXI2HTML_FLAGS) $(TEXI2HTML_LANG)
35 $(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir.dep
36 $(MAKEINFO) -I$(outdir) --output=$@ $<
39 $(outdir)/%/index.html: $(outdir)/%.texi
41 $(TEXI2HTML) --I=$(outdir) --output=$(dir $@) --prefix=index --split=section $(TEXI2HTML_INIT) $<
42 cp $(top-src-dir)/Documentation/lilypond.css $(dir $@)
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 $@)
48 $(outdir)/%.html: $(outdir)/%.texi
49 $(TEXI2HTML) --I=$(outdir) --output=$@ $(TEXI2HTML_INIT) $<
50 cp $(top-src-dir)/Documentation/lilypond.css $(dir $@)
52 $(outdir)/%.html.omf: %.texi
53 $(call GENERATE_OMF,html)
55 $(outdir)/%.pdf.omf: %.texi
56 $(call GENERATE_OMF,pdf)
58 $(outdir)/%.ps.gz.omf: %.texi
59 $(call GENERATE_OMF,ps.gz)
61 $(outdir)/%.pdf: $(outdir)/%.texi
62 cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) --batch $(TEXINFO_PAPERSIZE_OPTION) $(<F)
64 $(outdir)/%.txt: $(outdir)/%.texi
65 $(MAKEINFO) -I $(src-dir) -I $(outdir) --no-split --no-headers --output $@ $<
67 $(outdir)/%.texi: %.texi