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 # python/auxiliar/postprocess_html.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: $(OUT_TEXI_FILES)
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) && $(buildscript-dir)/mass-link symbolic .. . [a-f0-9][a-f0-9]
26 $(outdir)/%.texi: $(src-dir)/%.texi
29 $(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi
30 ifeq ($(WEB_VERSION),yes)
31 $(MAKEINFO) -I$(src-dir) -I$(outdir) -D web_version --output=$@ $<
33 $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<
36 $(outdir)/%-big-page.html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.xref-map $(outdir)/version.itexi
37 ifeq ($(WEB_VERSION),yes)
38 $(TEXI2HTML) $(TEXI2HTML_FLAGS) -D bigpage -D web_version --output=$@ $<
40 $(TEXI2HTML) $(TEXI2HTML_FLAGS) -D bigpage --output=$@ $<
43 $(outdir)/%.html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.xref-map $(outdir)/version.itexi
44 $(TEXI2HTML) $(TEXI2HTML_FLAGS) --output=$@ $<
46 $(outdir)/%/index.html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.xref-map $(outdir)/version.itexi $(outdir)/%.html.omf
48 ifeq ($(WEB_VERSION),yes)
49 $(TEXI2HTML) $(TEXI2HTML_SPLIT) $(TEXI2HTML_FLAGS) -D web_version --output=$(dir $@) $<
51 $(TEXI2HTML) $(TEXI2HTML_SPLIT) $(TEXI2HTML_FLAGS) --output=$(dir $@) $<
53 cp $(top-src-dir)/Documentation/css/*.css $(dir $@)
55 $(XREF_MAPS_DIR)/%.xref-map: $(outdir)/%.texi
56 $(buildscript-dir)/extract_texi_filenames $(XREF_MAP_FLAGS) -o $(XREF_MAPS_DIR) $<
58 $(outdir)/%.info: %.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi
59 $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<
61 $(outdir)/%.pdf: $(outdir)/%.texi $(outdir)/version.itexi $(outdir)/%.pdf.omf
62 ifeq ($(WEB_VERSION),yes)
63 cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) -D web_version -I $(abs-src-dir) --batch $(TEXINFO_PAPERSIZE_OPTION) $(<F)
65 cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) -I $(abs-src-dir) --batch $(TEXINFO_PAPERSIZE_OPTION) $(<F)
68 $(outdir)/%.txt: $(outdir)/%.texi $(outdir)/version.itexi
69 $(MAKEINFO) -I$(src-dir) -I$(outdir) --no-split --no-headers --output $@ $<
71 $(outdir)/%.html.omf: %.texi
72 $(call GENERATE_OMF,html)
74 $(outdir)/%.pdf.omf: %.texi
75 $(call GENERATE_OMF,pdf)
77 $(outdir)/version.%: $(top-src-dir)/VERSION
78 echo '@macro version'> $@
79 echo $(TOPLEVEL_VERSION)>> $@
80 echo '@end macro'>> $@
82 $(PYTHON) $(top-src-dir)/scripts/build/create-version-itexi.py >> $@
84 .SECONDARY: $(outdir)/version.itexi $(outdir)/version.texi \
85 $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep \