diff en/Makefile @ 124:c9aad709bd3a

Document the backout command.
author Bryan O'Sullivan <bos@serpentine.com>
date Tue, 26 Dec 2006 13:08:20 -0800
parents 3af28630fe8c
children 153efeaa8f57
line wrap: on
line diff
--- a/en/Makefile	Tue Dec 26 09:59:12 2006 -0800
+++ b/en/Makefile	Tue Dec 26 13:08:20 2006 -0800
@@ -33,15 +33,22 @@
 	tour-merge-merge.svg \
 	tour-merge-pull.svg \
 	tour-merge-sep-repos.svg \
+	undo-manual.dot \
+	undo-manual-merge.dot \
+	undo-non-tip.dot \
+	undo-simple.dot \
 	wdir.svg \
 	wdir-after-commit.svg \
 	wdir-branch.svg \
 	wdir-merge.svg \
 	wdir-pre-branch.svg
 
+image-dot := $(filter %.dot,$(image-sources))
 image-svg := $(filter %.svg,$(image-sources))
+image-png := $(filter %.png,$(image-sources))
 
 example-sources := \
+	backout \
 	daily.copy \
 	daily.files \
 	daily.rename \
@@ -82,7 +89,9 @@
 	if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi
 endef
 
-pdf/hgbook.pdf: $(sources) $(image-sources:%.svg=%.pdf) examples
+image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png)
+
+pdf/hgbook.pdf: $(sources) $(image-pdf) examples
 	$(call pdf)
 
 html: html/onepage/hgbook.html html/split/hgbook.html
@@ -107,11 +116,13 @@
 	perl -pi -e 's/&#x00([0-7][0-9a-f]);/chr(hex($$1))/egi' $(dir $(1))/*.html
 endef
 
-html/onepage/hgbook.html: $(sources) $(image-sources:%.svg=%.png) examples
+image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png)
+
+html/onepage/hgbook.html: $(sources) $(image-html) examples
 	$(call htlatex,$@,$<)
 	cp $(image-sources:%.svg=%.png) $(dir $@)
 
-html/split/hgbook.html: $(sources) $(image-sources:%.svg=%.png) examples
+html/split/hgbook.html: $(sources) $(image-html) examples
 	$(call htlatex,$@,$<,2)
 	cp $(image-sources:%.svg=%.png) $(dir $@)
 
@@ -136,6 +147,9 @@
 %.png: %.svg
 	inkscape -D -e $@ $<
 
+%.svg: %.dot
+	dot -Tsvg -o $@ $<
+
 # Produce eps & pdf for the pdf
 
 %.pdf: %.eps
@@ -144,6 +158,9 @@
 %.eps: %.svg
 	inkscape -E $@ $<
 
+%.eps: %.dot
+	dot -Tps -o $@ $<
+
 examples: examples/.run
 
 examples/.run: $(example-sources:%=examples/%.run)
@@ -157,6 +174,8 @@
 
 clean:
 	rm -rf beta html pdf \
+		$(image-dot:%.dot=%.pdf) \
+		$(image-dot:%.dot=%.png) \
 		$(image-svg:%.svg=%.pdf) \
 		$(image-svg:%.svg=%.png) \
 		examples/*.{out,run} examples/.run build_id.tex