hgbook

diff en/Makefile @ 647:d0160b0b1a9e

Merge with http://hg.serpentine.com/mercurial/book
author Dongsheng Song <dongsheng.song@gmail.com>
date Wed Mar 18 20:32:37 2009 +0800 (2009-03-18)
parents 9038da8b2d22 5bfa0df6aaed
children 7e7c47481e4f
line diff
     1.1 --- a/en/Makefile	Mon Mar 16 17:23:05 2009 +0800
     1.2 +++ b/en/Makefile	Wed Mar 18 20:32:37 2009 +0800
     1.3 @@ -35,7 +35,7 @@
     1.4  
     1.5  image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png)
     1.6  
     1.7 -example-sources := \
     1.8 +example-sources-by-name := \
     1.9  	backout \
    1.10  	bisect \
    1.11  	branching \
    1.12 @@ -67,6 +67,10 @@
    1.13  	tour \
    1.14  	tour-merge-conflict
    1.15  
    1.16 +example-sources := \
    1.17 +	$(example-sources-by-name:%=examples/%) \
    1.18 +	$(wildcard examples/ch*/*)
    1.19 +
    1.20  obj-web := html
    1.21  obj-websup := html/support
    1.22  
    1.23 @@ -162,11 +166,10 @@
    1.24  
    1.25  examples: $(example-prereqs) examples/.run
    1.26  
    1.27 -examples/.run: $(example-sources:%=examples/%.run)
    1.28 -	touch examples/.run
    1.29 +examples/.run: $(example-sources)
    1.30 +	cd examples && ./run-example
    1.31  
    1.32  examples/%.run: examples/% examples/run-example
    1.33 -	cd examples && ./run-example $(notdir $<)
    1.34  
    1.35  clean:
    1.36  	-rm -rf dist html $(image-dot:%.dot=%.pdf) $(image-dot:%.dot=%.png) \