diff en/Makefile @ 681:5bfa0df6aaed

Automated merge with ssh://ssh.serpentine.com/hg/share/mercurial/book
author Bryan O'Sullivan <bos@serpentine.com>
date Wed, 18 Mar 2009 00:08:22 -0700
parents 1879ec732a28 8366882f67f2
children 188efaefe001 d0160b0b1a9e
line wrap: on
line diff
--- a/en/Makefile	Fri Mar 13 14:22:27 2009 -0700
+++ b/en/Makefile	Wed Mar 18 00:08:22 2009 -0700
@@ -35,7 +35,7 @@
 
 image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png)
 
-example-sources := \
+example-sources-by-name := \
 	backout \
 	bisect \
 	branching \
@@ -67,6 +67,10 @@
 	tour \
 	tour-merge-conflict
 
+example-sources := \
+	$(example-sources-by-name:%=examples/%) \
+	$(wildcard examples/ch*/*)
+
 obj-web := html
 obj-websup := html/support
 
@@ -162,11 +166,10 @@
 
 examples: $(example-prereqs) examples/.run
 
-examples/.run: $(example-sources:%=examples/%.run)
-	touch examples/.run
+examples/.run: $(example-sources)
+	cd examples && ./run-example
 
 examples/%.run: examples/% examples/run-example
-	cd examples && ./run-example $(notdir $<)
 
 clean:
 	-rm -rf dist html $(image-dot:%.dot=%.pdf) $(image-dot:%.dot=%.png) \