comparison Makefile @ 756:1e020cb7d417

Remove tools
author Dongsheng Song <songdongsheng@live.cn>
date Mon, 30 Mar 2009 21:36:31 +0800
parents 1c13ed2130a7
children 8d130de70ebe
comparison
equal deleted inserted replaced
755:4e8f302ae313 756:1e020cb7d417
1 # 1 #
2 # Makefile for the hgbook, top-level 2 # Makefile for the hgbook, top-level
3 # 3 #
4 include Makefile.vars
4 5
5 FORMATS=html html-single pdf 6 FORMATS=html html-single pdf
6 7
7 PO_LANGUAGES := zh 8 PO_LANGUAGES := zh
8 DBK_LANGUAGES := en 9 DBK_LANGUAGES := en
9 LANGUAGES := $(DBK_LANGUAGES) $(PO_LANGUAGES) 10 LANGUAGES := $(DBK_LANGUAGES) $(PO_LANGUAGES)
10 11
11 UPDATEPO = PERLLIB=../tools/po4a/lib/ ../tools/po4a/po4a-updatepo -M UTF-8 \ 12 UPDATEPO = PERLLIB=$(PO4A_LIB) $(PO4A_HOME)/po4a-updatepo -M UTF-8 \
12 -f docbook -o doctype='docbook' -o includeexternal \ 13 -f docbook -o doctype='docbook' -o includeexternal \
13 -o nodefault='<programlisting> <screen>' \ 14 -o nodefault='<programlisting> <screen>' \
14 -o untranslated='<programlisting> <screen>' 15 -o untranslated='<programlisting> <screen>'
15 TRANSLATE = PERLLIB=tools/po4a/lib/ tools/po4a/po4a-translate -M UTF-8 \ 16 TRANSLATE = PERLLIB=$(PO4A_LIB) $(PO4A_HOME)/po4a-translate -M UTF-8 \
16 -f docbook -o doctype='docbook' \ 17 -f docbook -o doctype='docbook' \
17 -k 0 18 -k 0
18 19
19 #rev_id = $(shell hg parents --template '{node|short} ({date|isodate})') 20 #rev_id = $(shell hg parents --template '{node|short} ({date|isodate})')
20 rev_id = $(shell hg parents --template '{node|short} ({date|shortdate})') 21 rev_id = $(shell hg parents --template '{node|short} ({date|shortdate})')
148 build/en/source/hgbook.xml: 149 build/en/source/hgbook.xml:
149 ${MAKE} LINGUA=en $@ 150 ${MAKE} LINGUA=en $@
150 151
151 build/$(LINGUA)/source/hgbook.xml: build/en/source/hgbook.xml po/$(LINGUA).po $(images) 152 build/$(LINGUA)/source/hgbook.xml: build/en/source/hgbook.xml po/$(LINGUA).po $(images)
152 mkdir -p build/$(LINGUA)/source/figs 153 mkdir -p build/$(LINGUA)/source/figs
154 cp en/figs/*.png build/$(LINGUA)/source/figs
153 $(TRANSLATE) -m build/en/source/hgbook.xml -p po/$(LINGUA).po -l $@.tmp 155 $(TRANSLATE) -m build/en/source/hgbook.xml -p po/$(LINGUA).po -l $@.tmp
154 cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@ 156 cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@
155 endif 157 endif
156 158
157 endif 159 endif
196 else 198 else
197 pdf: build/$(LINGUA)/pdf/hgbook.pdf 199 pdf: build/$(LINGUA)/pdf/hgbook.pdf
198 200
199 build/$(LINGUA)/pdf/hgbook.pdf: build/$(LINGUA)/source/hgbook.xml stylesheets/fo.xsl stylesheets/$(LINGUA)/fo.xsl 201 build/$(LINGUA)/pdf/hgbook.pdf: build/$(LINGUA)/source/hgbook.xml stylesheets/fo.xsl stylesheets/$(LINGUA)/fo.xsl
200 mkdir -p build/$(LINGUA)/pdf 202 mkdir -p build/$(LINGUA)/pdf
201 java -classpath tools/fop/lib/saxon65.jar:tools/fop/lib/saxon65-dbxsl.jar:tools/fop/lib/xml-commons-resolver-1.2.jar:tools/fop/conf \ 203 java -classpath $(JAVA_SHARE)/saxon65.jar:$(JAVA_SHARE)/saxon65-dbxsl.jar:$(JAVA_SHARE)/xml-commons-resolver-1.2.jar:$(JAVA_SHARE) \
202 com.icl.saxon.StyleSheet \ 204 com.icl.saxon.StyleSheet \
203 -x org.apache.xml.resolver.tools.ResolvingXMLReader \ 205 -x org.apache.xml.resolver.tools.ResolvingXMLReader \
204 -y org.apache.xml.resolver.tools.ResolvingXMLReader \ 206 -y org.apache.xml.resolver.tools.ResolvingXMLReader \
205 -r org.apache.xml.resolver.tools.CatalogResolver \ 207 -r org.apache.xml.resolver.tools.CatalogResolver \
206 -o build/$(LINGUA)/source/hgbook.fo \ 208 -o build/$(LINGUA)/source/hgbook.fo \
207 build/$(LINGUA)/source/hgbook.xml \ 209 build/$(LINGUA)/source/hgbook.xml \
208 stylesheets/$(LINGUA)/fo.xsl \ 210 stylesheets/$(LINGUA)/fo.xsl \
209 fop1.extensions=1 211 fop1.extensions=1
210 212
211 (cd build/$(LINGUA)/source && ../../../tools/fop/fop.sh hgbook.fo ../pdf/hgbook.pdf) 213 (cd build/$(LINGUA)/source && $(FOP_HOME)/fop.sh hgbook.fo ../pdf/hgbook.pdf)
212 endif 214 endif
213 215
214 en/figs/%.png: en/figs/%.svg en/fixsvg 216 en/figs/%.png: en/figs/%.svg en/fixsvg
215 en/fixsvg $< 217 en/fixsvg $<
216 inkscape -D -d 120 -e $@ $<-tmp.svg 218 inkscape -D -d 120 -e $@ $<-tmp.svg