comparison 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
comparison
equal deleted inserted replaced
745:c2cefd9f9893 746:d0160b0b1a9e
33 image-svg := $(filter %.svg,$(image-sources)) 33 image-svg := $(filter %.svg,$(image-sources))
34 image-png := $(filter %.png,$(image-sources)) 34 image-png := $(filter %.png,$(image-sources))
35 35
36 image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png) 36 image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png)
37 37
38 example-sources := \ 38 example-sources-by-name := \
39 backout \ 39 backout \
40 bisect \ 40 bisect \
41 branching \ 41 branching \
42 branch-named \ 42 branch-named \
43 branch-repo \ 43 branch-repo \
65 template.simple \ 65 template.simple \
66 template.svnstyle \ 66 template.svnstyle \
67 tour \ 67 tour \
68 tour-merge-conflict 68 tour-merge-conflict
69 69
70 example-sources := \
71 $(example-sources-by-name:%=examples/%) \
72 $(wildcard examples/ch*/*)
73
70 obj-web := html 74 obj-web := html
71 obj-websup := html/support 75 obj-websup := html/support
72 76
73 extras-web-base := \ 77 extras-web-base := \
74 $(obj-web)/index.html \ 78 $(obj-web)/index.html \
160 %.svg: %.dot 164 %.svg: %.dot
161 dot -Tsvg -o $@ $< 165 dot -Tsvg -o $@ $<
162 166
163 examples: $(example-prereqs) examples/.run 167 examples: $(example-prereqs) examples/.run
164 168
165 examples/.run: $(example-sources:%=examples/%.run) 169 examples/.run: $(example-sources)
166 touch examples/.run 170 cd examples && ./run-example
167 171
168 examples/%.run: examples/% examples/run-example 172 examples/%.run: examples/% examples/run-example
169 cd examples && ./run-example $(notdir $<)
170 173
171 clean: 174 clean:
172 -rm -rf dist html $(image-dot:%.dot=%.pdf) $(image-dot:%.dot=%.png) \ 175 -rm -rf dist html $(image-dot:%.dot=%.pdf) $(image-dot:%.dot=%.png) \
173 $(image-svg:%.svg=%.png) examples/*.{lxo,run} examples/.run 176 $(image-svg:%.svg=%.png) examples/*.{lxo,run} examples/.run
174 177