X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fstepmake%2Ftexinfo-rules.make;h=88a4fe47a2d122078fa1dde8de0a1d96323619b5;hb=2a07e2ea1924abec1b70e2150e698e5792ae1687;hp=5cf8c2d011b254f588a2369cfc685fd6f956ee84;hpb=8f536cca6460caca6b5ac7925670b5692ac40ce5;p=lilypond.git diff --git a/stepmake/stepmake/texinfo-rules.make b/stepmake/stepmake/texinfo-rules.make index 5cf8c2d011..88a4fe47a2 100644 --- a/stepmake/stepmake/texinfo-rules.make +++ b/stepmake/stepmake/texinfo-rules.make @@ -1,8 +1,40 @@ .SUFFIXES: .html .info .texi .texinfo -$(outdir)/%.info: $(outdir)/%.texi - $(MAKEINFO) -I $(outdir) --output=$@ $< +# "makeinfo --info" MUST be able to read PNGs from CWD for info images +# to work, hence $(INFO_IMAGES_DIR) -> $(outdir)/ symlink. +# $(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),) + +# 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 . ) + touch $@ + +else + +$(outdir)/.info-images-dir.dep: + touch $@ + +endif + +$(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir.dep + $(MAKEINFO) -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)/%.html: $(outdir)/%.texi $(MAKEINFO) -I $(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $< @@ -16,9 +48,9 @@ $(outdir)/%.pdf.omf: %.texi $(outdir)/%.ps.gz.omf: %.texi $(call GENERATE_OMF,ps.gz) -# Generic rule not possible? -$(outdir)/%/%.html: $(outdir)/%.texi - $(MAKEINFO) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html $< +$(outdir)/%/index.html: $(outdir)/%.texi + mkdir -p $(dir $@) + $(MAKEINFO) -I $(outdir) --output=$(dir $@) --css-include=$(top-src-dir)/Documentation/texinfo.css --html $< $(outdir)/%.pdf: $(outdir)/%.texi cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) --batch $(TEXINFO_PAPERSIZE_OPTION) $(