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 $(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir.dep $(outdir)/version.itexi
27 $(MAKEINFO) -I$(outdir) --output=$@ $<
29 $(outdir)/%-big-page.html: $(outdir)/%.texi $(outdir)/version.itexi
30 $(MAKEINFO) -I $(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
32 $(outdir)/%.html: $(outdir)/%.texi $(outdir)/version.itexi
33 $(MAKEINFO) -I $(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
35 $(outdir)/%.html.omf: %.texi
36 $(call GENERATE_OMF,html)
38 $(outdir)/%.pdf.omf: %.texi
39 $(call GENERATE_OMF,pdf)
41 $(outdir)/%.ps.gz.omf: %.texi
42 $(call GENERATE_OMF,ps.gz)
44 $(outdir)/%/index.html: $(outdir)/%.texi $(outdir)/version.itexi
46 $(MAKEINFO) -I $(outdir) --output=$(dir $@) --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
48 $(outdir)/%.pdf: $(outdir)/%.texi $(outdir)/version.itexi
49 cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) --batch $(TEXINFO_PAPERSIZE_OPTION) $(<F)
51 $(outdir)/%.txt: $(outdir)/%.texi $(outdir)/version.itexi
52 $(MAKEINFO) -I $(src-dir) -I $(outdir) --no-split --no-headers --output $@ $<
54 $(outdir)/%.texi: %.texi
58 $(outdir)/version.%: $(top-src-dir)/VERSION
59 echo '@macro version'> $@
60 echo $(TOPLEVEL_VERSION)>> $@
61 echo '@end macro'>> $@
63 .SECONDARY: $(outdir)/version.itexi $(outdir)/version.texi