hgbook

diff en/Makefile @ 124:c9aad709bd3a

Document the backout command.
author Bryan O'Sullivan <bos@serpentine.com>
date Tue Dec 26 13:08:20 2006 -0800 (2006-12-26)
parents 3af28630fe8c
children 153efeaa8f57
line diff
     1.1 --- a/en/Makefile	Wed Nov 15 16:57:29 2006 -0800
     1.2 +++ b/en/Makefile	Tue Dec 26 13:08:20 2006 -0800
     1.3 @@ -33,15 +33,22 @@
     1.4  	tour-merge-merge.svg \
     1.5  	tour-merge-pull.svg \
     1.6  	tour-merge-sep-repos.svg \
     1.7 +	undo-manual.dot \
     1.8 +	undo-manual-merge.dot \
     1.9 +	undo-non-tip.dot \
    1.10 +	undo-simple.dot \
    1.11  	wdir.svg \
    1.12  	wdir-after-commit.svg \
    1.13  	wdir-branch.svg \
    1.14  	wdir-merge.svg \
    1.15  	wdir-pre-branch.svg
    1.16  
    1.17 +image-dot := $(filter %.dot,$(image-sources))
    1.18  image-svg := $(filter %.svg,$(image-sources))
    1.19 +image-png := $(filter %.png,$(image-sources))
    1.20  
    1.21  example-sources := \
    1.22 +	backout \
    1.23  	daily.copy \
    1.24  	daily.files \
    1.25  	daily.rename \
    1.26 @@ -82,7 +89,9 @@
    1.27  	if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi
    1.28  endef
    1.29  
    1.30 -pdf/hgbook.pdf: $(sources) $(image-sources:%.svg=%.pdf) examples
    1.31 +image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png)
    1.32 +
    1.33 +pdf/hgbook.pdf: $(sources) $(image-pdf) examples
    1.34  	$(call pdf)
    1.35  
    1.36  html: html/onepage/hgbook.html html/split/hgbook.html
    1.37 @@ -107,11 +116,13 @@
    1.38  	perl -pi -e 's/&#x00([0-7][0-9a-f]);/chr(hex($$1))/egi' $(dir $(1))/*.html
    1.39  endef
    1.40  
    1.41 -html/onepage/hgbook.html: $(sources) $(image-sources:%.svg=%.png) examples
    1.42 +image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png)
    1.43 +
    1.44 +html/onepage/hgbook.html: $(sources) $(image-html) examples
    1.45  	$(call htlatex,$@,$<)
    1.46  	cp $(image-sources:%.svg=%.png) $(dir $@)
    1.47  
    1.48 -html/split/hgbook.html: $(sources) $(image-sources:%.svg=%.png) examples
    1.49 +html/split/hgbook.html: $(sources) $(image-html) examples
    1.50  	$(call htlatex,$@,$<,2)
    1.51  	cp $(image-sources:%.svg=%.png) $(dir $@)
    1.52  
    1.53 @@ -136,6 +147,9 @@
    1.54  %.png: %.svg
    1.55  	inkscape -D -e $@ $<
    1.56  
    1.57 +%.svg: %.dot
    1.58 +	dot -Tsvg -o $@ $<
    1.59 +
    1.60  # Produce eps & pdf for the pdf
    1.61  
    1.62  %.pdf: %.eps
    1.63 @@ -144,6 +158,9 @@
    1.64  %.eps: %.svg
    1.65  	inkscape -E $@ $<
    1.66  
    1.67 +%.eps: %.dot
    1.68 +	dot -Tps -o $@ $<
    1.69 +
    1.70  examples: examples/.run
    1.71  
    1.72  examples/.run: $(example-sources:%=examples/%.run)
    1.73 @@ -157,6 +174,8 @@
    1.74  
    1.75  clean:
    1.76  	rm -rf beta html pdf \
    1.77 +		$(image-dot:%.dot=%.pdf) \
    1.78 +		$(image-dot:%.dot=%.png) \
    1.79  		$(image-svg:%.svg=%.pdf) \
    1.80  		$(image-svg:%.svg=%.png) \
    1.81  		examples/*.{out,run} examples/.run build_id.tex