diff en/Makefile @ 746:d0160b0b1a9e

Merge with http://hg.serpentine.com/mercurial/book
author Dongsheng Song <dongsheng.song@gmail.com>
date Wed, 18 Mar 2009 20:32:37 +0800
parents 9038da8b2d22 5bfa0df6aaed
children 7e7c47481e4f
line wrap: on
line diff
--- a/en/Makefile	Wed Mar 18 19:50:36 2009 +0800
+++ b/en/Makefile	Wed Mar 18 20:32:37 2009 +0800
@@ -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) \