hgbook

changeset 885:4fb00c894429

Minor fix
author Dongsheng Song <dongsheng.song@gmail.com>
date Thu Oct 22 11:24:54 2009 +0800 (2009-10-22)
parents 72be4a03f722
children 8a2b0994ccd9
files Makefile
line diff
     1.1 --- a/Makefile	Thu Oct 22 10:50:12 2009 +0800
     1.2 +++ b/Makefile	Thu Oct 22 11:24:54 2009 +0800
     1.3 @@ -22,17 +22,19 @@
     1.4  #rev_id = $(shell hg parents --template '{node|short} ({date|isodate})')
     1.5  rev_id = $(shell hg parents --template '{node|short} ({date|shortdate})')
     1.6  
     1.7 -images-src := $(wildcard en/figs/*.dot en/figs/*.svg en/figs/*.png)
     1.8 -
     1.9 -images-dot := $(filter %.dot, $(images-src))
    1.10 -images-svg := $(filter %.svg, $(images-src))
    1.11 -
    1.12 -images-dst := $(images-src:dot=png)
    1.13 -images-dst := $(images-dst:svg=png)
    1.14 -
    1.15 -images-out := $(images-dot:dot=svg)
    1.16 -images-out += $(images-dot:dot=png)
    1.17 -images-out += $(images-svg:svg=png)
    1.18 +images-dot := $(wildcard en/figs/*.dot)
    1.19 +
    1.20 +images-svg := $(wildcard en/figs/*.svg)
    1.21 +images-svg :=$(filter-out %-tmp.svg, $(images-svg))
    1.22 +images-svg -= $(images-dot:dot=svg)
    1.23 +
    1.24 +images-dst := $(wildcard en/figs/*.png)
    1.25 +images-dst += $(images-dot:dot=png)
    1.26 +images-dst += $(images-svg:svg=png)
    1.27 +
    1.28 +images-gen := $(images-dot:dot=png)
    1.29 +images-gen += $(images-svg:svg=png)
    1.30 +images-gen += $(wildcard en/figs/*-tmp.svg)
    1.31  
    1.32  help:
    1.33  	@echo "  make epub         [LINGUA=en|it|zh|...]"
    1.34 @@ -47,12 +49,10 @@
    1.35  	@echo "  make clean        # Remove the build files."
    1.36  
    1.37  clean:
    1.38 -	@rm -fr build hello po/*.mo en/hello en/html en/.validated-00book.xml \
    1.39 -          en/examples/.run en/examples/results en/figs/*-tmp.svg \
    1.40 -          stylesheets/system-xsl web/index-read.html.in /tmp/REV*-hello
    1.41 +	@rm -fr build hello po/*.mo /tmp/REV*-hello en/examples/results
    1.42  
    1.43  	@(for l in $(DBK_LANGUAGES); do \
    1.44 -	  rm -fr $(subst en/figs/, $$l/figs/, $(images-out)) ;\
    1.45 +	  rm -fr $(subst en/figs/, $$l/figs/, $(images-gen))  $$l/examples/.run;\
    1.46  	done)
    1.47  
    1.48  all:
    1.49 @@ -118,7 +118,7 @@
    1.50    ifneq "$(findstring $(LINGUA),$(DBK_LANGUAGES))" ""
    1.51  $(LINGUA)/examples/.run:
    1.52  	if test -x $(LINGUA)/examples/run-example; then \
    1.53 -	  (cd $(LINGUA)/examples; ./run-example -v -a); \
    1.54 +	  (cd $(LINGUA)/examples; ./run-example -a); \
    1.55  	else \
    1.56  	  touch $@; \
    1.57  	fi
    1.58 @@ -131,12 +131,12 @@
    1.59  	cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@
    1.60    else
    1.61  en/examples/.run:
    1.62 -	(cd en/examples; ./run-example -v -a)
    1.63 +	(cd en/examples; ./run-example -a)
    1.64  
    1.65  build/en/source/hgbook.xml:
    1.66  	${MAKE} LINGUA=en $@
    1.67  
    1.68 -build/$(LINGUA)/source/hgbook.xml: $(wildcard en/*.xml) po/$(LINGUA).po $(images-dst)
    1.69 +build/$(LINGUA)/source/hgbook.xml: $(wildcard en/*.xml) po/$(LINGUA).po $(images-dst) en/examples/.run
    1.70  	mkdir -p build/$(LINGUA)/source/figs
    1.71  	cp en/figs/*.png build/$(LINGUA)/source/figs
    1.72  	cp stylesheets/hgbook.css build/$(LINGUA)/source