comparison Makefile @ 767:55e2953f82d6

Update Chinese translation
author Dongsheng Song <songdongsheng@live.cn>
date Sun, 05 Apr 2009 12:12:00 +0800
parents 605af0a90e3e
children
comparison
equal deleted inserted replaced
766:3b33dd6aba87 767:55e2953f82d6
12 UPDATEPO = PERLLIB=$(PO4A_LIB) $(PO4A_HOME)/po4a-updatepo -M UTF-8 \ 12 UPDATEPO = PERLLIB=$(PO4A_LIB) $(PO4A_HOME)/po4a-updatepo -M UTF-8 \
13 -f docbook -o doctype=docbook -o includeexternal \ 13 -f docbook -o doctype=docbook -o includeexternal \
14 -o nodefault="<programlisting> <screen>" \ 14 -o nodefault="<programlisting> <screen>" \
15 -o untranslated="<programlisting> <screen>" 15 -o untranslated="<programlisting> <screen>"
16 TRANSLATE = PERLLIB=$(PO4A_LIB) $(PO4A_HOME)/po4a-translate -M UTF-8 \ 16 TRANSLATE = PERLLIB=$(PO4A_LIB) $(PO4A_HOME)/po4a-translate -M UTF-8 \
17 -f docbook -o doctype=docbook \ 17 -f docbook -o doctype=docbook -o includeexternal \
18 -o nodefault="<programlisting> <screen>" \
19 -o untranslated="<programlisting> <screen>" \
18 -k 0 20 -k 0
19 21
20 #rev_id = $(shell hg parents --template '{node|short} ({date|isodate})') 22 #rev_id = $(shell hg parents --template '{node|short} ({date|isodate})')
21 rev_id = $(shell hg parents --template '{node|short} ({date|shortdate})') 23 rev_id = $(shell hg parents --template '{node|short} ({date|shortdate})')
22 24
120 else 122 else
121 updatepo: 123 updatepo:
122 ifneq "$(findstring $(LINGUA),$(PO_LANGUAGES))" "" 124 ifneq "$(findstring $(LINGUA),$(PO_LANGUAGES))" ""
123 (cd po; \ 125 (cd po; \
124 $(UPDATEPO) -m ../en/00book.xml -p $(LINGUA).po; \ 126 $(UPDATEPO) -m ../en/00book.xml -p $(LINGUA).po; \
125 cat $(LINGUA).po | sed 's/&emdash;/—/' > $(LINGUA).po.tmp; \
126 mv $(LINGUA).po.tmp $(LINGUA).po \
127 ) 127 )
128 $(MAKE) tidypo LINGUA=$(LINGUA) 128 $(MAKE) tidypo LINGUA=$(LINGUA)
129 endif 129 endif
130 endif 130 endif
131 131
140 140
141 ifneq "$(findstring $(LINGUA),$(DBK_LANGUAGES))" "" 141 ifneq "$(findstring $(LINGUA),$(DBK_LANGUAGES))" ""
142 $(LINGUA)/examples/.run: 142 $(LINGUA)/examples/.run:
143 (cd $(LINGUA)/examples; ./run-example -v -a) 143 (cd $(LINGUA)/examples; ./run-example -v -a)
144 144
145 build/$(LINGUA)/source/hgbook.xml: $(wildcard $(LINGUA)/*.xml) $(images) $(LINGUA)/examples/.run $(images) 145 build/$(LINGUA)/source/hgbook.xml: $(wildcard $(LINGUA)/*.xml) $(images) $(LINGUA)/examples/.run
146 mkdir -p build/$(LINGUA)/source/figs 146 mkdir -p build/$(LINGUA)/source/figs
147 cp $(LINGUA)/figs/*.png build/$(LINGUA)/source/figs 147 cp $(LINGUA)/figs/*.png build/$(LINGUA)/source/figs
148 cp stylesheets/hgbook.css build/$(LINGUA)/source 148 cp stylesheets/hgbook.css build/$(LINGUA)/source
149 (cd $(LINGUA); xmllint --nonet --noent --xinclude --postvalid --output ../$@.tmp 00book.xml) 149 (cd $(LINGUA); xmllint --nonet --noent --xinclude --postvalid --output ../$@.tmp 00book.xml)
150 cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@ 150 cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@
153 (cd en/examples; ./run-example -v -a) 153 (cd en/examples; ./run-example -v -a)
154 154
155 build/en/source/hgbook.xml: 155 build/en/source/hgbook.xml:
156 ${MAKE} LINGUA=en $@ 156 ${MAKE} LINGUA=en $@
157 157
158 build/$(LINGUA)/source/hgbook.xml: build/en/source/hgbook.xml po/$(LINGUA).po $(images) 158 build/$(LINGUA)/source/hgbook.xml: $(wildcard en/*.xml) po/$(LINGUA).po $(images)
159 mkdir -p build/$(LINGUA)/source/figs 159 mkdir -p build/$(LINGUA)/source/figs
160 cp en/figs/*.png build/$(LINGUA)/source/figs 160 cp en/figs/*.png build/$(LINGUA)/source/figs
161 cp stylesheets/hgbook.css build/$(LINGUA)/source 161 cp stylesheets/hgbook.css build/$(LINGUA)/source
162 $(TRANSLATE) -m build/en/source/hgbook.xml.tmp -p po/$(LINGUA).po -l $@.tmp 162 $(TRANSLATE) -m en/00book.xml -p po/$(LINGUA).po -l en/hgbook.xml.$(LINGUA)
163 xmllint --nonet --noent --xinclude --postvalid --output $@.tmp en/hgbook.xml.$(LINGUA)
163 cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@ 164 cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@
165 mv en/hgbook.xml.$(LINGUA) build/$(LINGUA)/source
164 endif 166 endif
165 167
166 endif 168 endif
167 169
168 ifndef LINGUA 170 ifndef LINGUA
218 else 220 else
219 pdf: build/$(LINGUA)/pdf/hgbook.pdf 221 pdf: build/$(LINGUA)/pdf/hgbook.pdf
220 222
221 build/$(LINGUA)/pdf/hgbook.pdf: build/$(LINGUA)/source/hgbook.xml stylesheets/fo.xsl stylesheets/$(LINGUA)/fo.xsl 223 build/$(LINGUA)/pdf/hgbook.pdf: build/$(LINGUA)/source/hgbook.xml stylesheets/fo.xsl stylesheets/$(LINGUA)/fo.xsl
222 mkdir -p build/$(LINGUA)/pdf 224 mkdir -p build/$(LINGUA)/pdf
223 java -classpath $(JAVA_SHARE)/saxon65.jar:$(JAVA_SHARE)/saxon65-dbxsl.jar:$(JAVA_SHARE)/xml-commons-resolver-1.2.jar:$(JAVA_SHARE) \ 225 java -classpath $(JAVA_LIB)/saxon65.jar:$(JAVA_LIB)/saxon65-dbxsl.jar:$(JAVA_LIB)/xml-commons-resolver-1.2.jar:$(JAVA_LIB) \
224 com.icl.saxon.StyleSheet \ 226 com.icl.saxon.StyleSheet \
225 -x org.apache.xml.resolver.tools.ResolvingXMLReader \ 227 -x org.apache.xml.resolver.tools.ResolvingXMLReader \
226 -y org.apache.xml.resolver.tools.ResolvingXMLReader \ 228 -y org.apache.xml.resolver.tools.ResolvingXMLReader \
227 -r org.apache.xml.resolver.tools.CatalogResolver \ 229 -r org.apache.xml.resolver.tools.CatalogResolver \
228 -o build/$(LINGUA)/source/hgbook.fo \ 230 -o build/$(LINGUA)/source/hgbook.fo \