# HG changeset patch # User Bryan O'Sullivan # Date 1178749030 25200 # Node ID 18cffee850380ad638d9a51390619a7140b419a5 # Parent ef8a5e3931035797eb55fe68aef1338210913b18 Fix build of HTML pages with PNG images. diff -r ef8a5e393103 -r 18cffee85038 en/Makefile --- a/en/Makefile Wed May 09 14:35:23 2007 -0700 +++ b/en/Makefile Wed May 09 15:17:10 2007 -0700 @@ -52,6 +52,9 @@ image-svg := $(filter %.svg,$(image-sources)) image-png := $(filter %.png,$(image-sources)) +image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png) +image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png) + example-sources := \ backout \ bisect \ @@ -118,8 +121,6 @@ if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi endef -image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png) - pdf/hgbook.pdf: $(sources) $(image-pdf) examples $(call pdf) @@ -127,9 +128,15 @@ htlatex := /usr/bin/htlatex -onepage: $(htlatex) html/onepage/hgbook.html +onepage: $(htlatex) html/onepage/hgbook.html html/onepage/hgbook.css $(image-html:%=html/onepage/%) + +html/onepage/%: % + cp $< $@ -split: $(htlatex) html/split/hgbook.html +split: $(htlatex) html/split/hgbook.html html/split/hgbook.css $(image-html:%=html/split/%) + +html/split/%: % + cp $< $@ # This is a horrible hack to work around the fact that the htlatex # command in tex4ht is itself a horrible hack. I really don't want to @@ -145,17 +152,11 @@ ./fixhtml.py $(dir $(1))/*.html endef -image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png) - -html/onepage/hgbook.html: $(sources) $(image-html) examples hgbook.css bookhtml.cfg +html/onepage/hgbook.html: $(sources) $(image-html) examples bookhtml.cfg $(call htlatex,$@,$<) - cp $(image-sources:%.svg=%.png) $(dir $@) - cp hgbook.css $(dir $@) -html/split/hgbook.html: $(sources) $(image-html) examples hgbook.css bookhtml.cfg +html/split/hgbook.html: $(sources) examples bookhtml.cfg $(call htlatex,$@,$<,2) - cp $(image-sources:%.svg=%.png) $(dir $@) - cp hgbook.css $(dir $@) # Produce 90dpi PNGs for the web.