X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fstepmake%2Ftexinfo-rules.make;h=53ff4bce5366bf564117c1387b69f41ae95d82d0;hb=e6ccd1c536b89e965e0bde1d298bd9388fb5dea9;hp=88a4fe47a2d122078fa1dde8de0a1d96323619b5;hpb=ce199fe53b8b0277d38215a850cf99fb34d93460;p=lilypond.git diff --git a/stepmake/stepmake/texinfo-rules.make b/stepmake/stepmake/texinfo-rules.make index 88a4fe47a2..53ff4bce53 100644 --- a/stepmake/stepmake/texinfo-rules.make +++ b/stepmake/stepmake/texinfo-rules.make @@ -6,38 +6,67 @@ # $(outdir)/$(INFO_IMAGES_DIR)/*.png symlinks are only needed to view # out-www/*.info with Emacs -- HTML docs no longer need these # symlinks, see replace_symlinks_urls in -# buildscripts/add_html_footer.py. - -ifneq ($(INFO_IMAGES_DIR),) +# python/auxiliar/postprocess_html.py. # make dereferences symlinks, and $(INFO_IMAGES_DIR) is a symlink # to $(outdir), so we can't use directly $(INFO_IMAGES_DIR) as a # prerequisite, otherwise %.info are always outdated (because older -# than $(outdir), hence this .dep file - -$(outdir)/%.info-images-dir.dep: $(outdir)/%.texi - rm -f $* - ln -s $(outdir) $* - mkdir -p $(outdir)/$* - find $(outdir)/$*/ -name '*'.png | xargs rm -f - (cd $(outdir)/$*/ ; ln -sf ../*.png . ) +# than $(outdir)), hence this .dep file + +$(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep: $(OUT_TEXI_FILES) +ifneq ($(INFO_IMAGES_DIR),) + rm -f $(INFO_IMAGES_DIR) + ln -s $(outdir) $(INFO_IMAGES_DIR) + mkdir -p $(outdir)/$(INFO_IMAGES_DIR) + rm -f $(outdir)/$(INFO_IMAGES_DIR)/[a-f0-9][a-f0-9] + cd $(outdir)/$(INFO_IMAGES_DIR) && $(buildscript-dir)/mass-link symbolic .. . [a-f0-9][a-f0-9] +endif touch $@ +$(outdir)/%.texi: $(src-dir)/%.texi + cp -p $< $@ + +$(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi $(outdir)/weblinks.itexi +ifeq ($(WEB_VERSION),yes) + $(MAKEINFO) -I$(src-dir) -I$(outdir) -D web_version --output=$@ $< else + $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $< +endif -$(outdir)/.info-images-dir.dep: - touch $@ +$(outdir)/%-big-page.html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.xref-map $(outdir)/version.itexi $(outdir)/weblinks.itexi +ifeq ($(WEB_VERSION),yes) + DEPTH=$(depth) AJAX_SEARCH=$(AJAX_SEARCH) $(TEXI2HTML) $(TEXI2HTML_FLAGS) -D bigpage -D web_version --output=$@ $< +else + DEPTH=$(depth) AJAX_SEARCH=$(AJAX_SEARCH) $(TEXI2HTML) $(TEXI2HTML_FLAGS) -D bigpage --output=$@ $< +endif + +$(outdir)/%.html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.xref-map $(outdir)/version.itexi $(outdir)/weblinks.itexi + DEPTH=$(depth) AJAX_SEARCH=$(AJAX_SEARCH) $(TEXI2HTML) $(TEXI2HTML_FLAGS) --output=$@ $< +$(outdir)/%/index.html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.xref-map $(outdir)/version.itexi $(outdir)/weblinks.itexi $(outdir)/%.html.omf + mkdir -p $(dir $@) +ifeq ($(WEB_VERSION),yes) + DEPTH=$(depth)/../ AJAX_SEARCH=$(AJAX_SEARCH) $(TEXI2HTML) $(TEXI2HTML_SPLIT) $(TEXI2HTML_FLAGS) -D web_version --output=$(dir $@) $< +else + DEPTH=$(depth)/../ AJAX_SEARCH=$(AJAX_SEARCH) $(TEXI2HTML) $(TEXI2HTML_SPLIT) $(TEXI2HTML_FLAGS) --output=$(dir $@) $< endif + cp $(top-src-dir)/Documentation/css/*.css $(dir $@) + +$(XREF_MAPS_DIR)/%.xref-map: $(outdir)/%.texi + $(buildscript-dir)/extract_texi_filenames $(XREF_MAP_FLAGS) -o $(XREF_MAPS_DIR) $< -$(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir.dep - $(MAKEINFO) -I$(outdir) --output=$@ $< +$(outdir)/%.info: %.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi $(outdir)/weblinks.itexi + $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $< -$(outdir)/%-big-page.html: $(outdir)/%.texi - $(MAKEINFO) -I $(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $< +$(outdir)/%.pdf: $(outdir)/%.texi $(outdir)/version.itexi $(outdir)/%.pdf.omf $(outdir)/weblinks.itexi +ifeq ($(WEB_VERSION),yes) + cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) -D web_version -I $(abs-src-dir) --quiet $(TEXINFO_PAPERSIZE_OPTION) $( $@ +$(outdir)/weblinks.%: $(top-src-dir)/VERSION + $(PYTHON) $(top-src-dir)/scripts/build/create-weblinks-itexi.py > $@ +.SECONDARY: $(outdir)/version.itexi $(outdir)/version.texi \ + $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep \ + $(outdir)/*.texi