1 <?xml version="1.0" encoding="UTF-8"?>
4 Building 'The Definitive Guide (5.0)' - all(html, chm & pdf)
7 Building 'The Definitive Guide (5.0)' - html
10 Building 'The Definitive Guide (5.0)' - chm
13 Building 'The Definitive Guide (5.0)' - pdf
16 <project name="defguide5-en" default="all">
18 <property file="../build-common.properties"/>
19 <import file="../build-common.xml"/>
21 <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"/>
24 <echo message="Use the -projecthelp option instead"/>
27 <target name="clean" description="Clean the build directory">
29 <delete file="bookinfo.xml"/>
30 <ant dir="refpages" target="clean"/>
33 <target name="init" description="Check runtime configuration">
34 <echo message="java.version: ${java.version}"/>
38 <not><available file="../build-common.properties"/></not>
40 Please create your ../build-common.properties from ../build-common.properties.tmpl !
43 <antcall target="init-avail"/>
46 <target name="validate" depends="xinclude" description="Validate document">
47 <jing rngfile="${docbook5.home}/rng/docbook.rng" checkid="false">
48 <fileset dir="src" includes="**/*.xml"/>
50 <!--ant dir="refpages" target="validate"/-->
51 <jing rngfile="${docbook5.home}/rng/docbook.rng"
52 file="../en/build/defguide5.xml"/>
55 <target name="all" description="Generate document - pdf,html,chm">
56 <antcall target="pdf"/>
57 <antcall target="html"/>
58 <antcall target="chm"/>
61 <target name="xinclude.init">
62 <uptodate property="xinclude.isUpToDate" targetfile="build/defguide5.xml">
63 <srcfiles dir="." includes="book.xml, VERSION.xml"/>
64 <srcfiles dir="src" includes="*.xml"/>
65 <srcfiles dir="refpages" includes="intro-elements.xml, references.xml, elements/**/*.xml"/>
69 <target name="xinclude" depends="init, xinclude.init" unless="xinclude.isUpToDate" description="XInclude processing on document">
70 <ant dir="refpages" target="all"/>
72 <copy todir="build/graphics">
73 <fileset dir="graphics" includes="*.eps,*.gif,*.png,*.svg"/>
75 <copy todir="build/figures">
76 <fileset dir="figures" includes="*.eps,*.gif,*.png,*.svg"/>
79 <exec dir="${basedir}" executable="xsltproc" failonerror="true">
80 <arg value="--nonet"/>
81 <arg value="--output"/>
82 <arg value="bookinfo.xml"/>
83 <arg value="VERSION.xml"/>
84 <arg value="VERSION.xml"/>
87 <exec dir="${basedir}" executable="xmllint">
88 <arg value="--nonet"/>
89 <arg value="--xinclude"/>
90 <arg value="--output"/>
91 <arg value="build/defguide5.xml"/>
92 <arg value="book.xml"/>
96 <target name="html.init">
97 <uptodate property="html.isUpToDate" targetfile="build/defguide5/.done">
98 <srcfiles dir="." includes="book.xml, VERSION.xml"/>
99 <srcfiles dir="src" includes="*.xml"/>
100 <srcfiles dir="refpages" includes="intro-elements.xml, references.xml, elements/**/*.xml"/>
101 <srcfiles dir="stylesheets" includes="html.xsl"/>
105 <!-- Total time: 9 minutes 10 seconds -->
106 <target name="html" depends="xinclude,html.init" unless="html.isUpToDate" description="Generate document - html">
107 <copy file="html/defguide.css" todir="build/defguide5"/>
109 <copy todir="build/defguide5/src/examples">
110 <fileset dir="examples"/>
112 <copy todir="build/defguide5/images">
113 <fileset dir="${docbook.xsl}/images" includes="**/*.png,**/*.svg"/>
115 <copy todir="build/defguide5/graphics">
116 <fileset dir="graphics" includes="*.eps,*.gif,*.png,*.svg"/>
118 <copy todir="build/defguide5/figures">
119 <fileset dir="figures" includes="*.eps,*.gif,*.png,*.svg"/>
122 <java classname="com.icl.saxon.StyleSheet" fork="true" maxmemory="1024m" failonerror="true" dir="build/defguide5">
123 <jvmarg value="-Xss512k"/>
124 <classpath refid="lib.classpath"/>
126 <arg value="org.apache.xml.resolver.tools.ResolvingXMLReader"/>
128 <arg value="org.apache.xml.resolver.tools.ResolvingXMLReader"/>
130 <arg value="org.apache.xml.resolver.tools.CatalogResolver"/>
131 <arg value="../defguide5.xml"/>
132 <arg value="../../stylesheets/html.xsl"/>
134 <!--exec dir="build/defguide5" executable="xsltproc" failonerror="true">
135 <arg value="- -nonet"/>
136 <arg value="stylesheets/html.xsl"/>
137 <arg value="build/defguide5.xml"/>
140 <touch file="build/defguide5/.done"/>
143 <target name="chm.init">
144 <uptodate property="chm.isUpToDate" targetfile="build/defguide5.chm">
145 <srcfiles dir="." includes="book.xml, VERSION.xml"/>
146 <srcfiles dir="src" includes="*.xml"/>
147 <srcfiles dir="refpages" includes="intro-elements.xml, references.xml, elements/**/*.xml"/>
148 <srcfiles dir="stylesheets" includes="htmlhelp.xsl"/>
152 <target name="chm" depends="xinclude,chm.init" unless="chm.isUpToDate" description="Generate document - chm">
155 <not><os family="windows"/></not>
157 This target only work on windows !
160 <copy file="html/defguide.css" todir="build/chm/htmlhelp"/>
162 <copy todir="build/src/examples">
163 <fileset dir="examples"/>
165 <copy todir="build/chm/htmlhelp/images">
166 <fileset dir="${docbook.xsl}/images" includes="**/*.png,**/*.svg"/>
168 <copy todir="build/chm/htmlhelp/graphics">
169 <fileset dir="graphics" includes="*.eps,*.gif,*.png,*.svg"/>
171 <copy todir="build/chm/htmlhelp/figures">
172 <fileset dir="figures" includes="*.eps,*.gif,*.png,*.svg"/>
175 <exec dir="build/chm" executable="xsltproc" failonerror="true">
176 <arg value="--nonet"/>
177 <arg value="stylesheets/chm.xsl"/>
178 <arg value="build/defguide5.xml"/>
180 <exec dir="build/chm" executable="hhc" failonerror="false">
181 <arg value="htmlhelp.hhp"/>
184 <move file="build/chm/defguide5.chm" tofile="build/defguide5.chm"/>
187 <target name="pdf.init">
188 <uptodate property="pdf.isUpToDate" targetfile="build/defguide5.pdf">
189 <srcfiles dir="." includes="book.xml, VERSION.xml"/>
190 <srcfiles dir="src" includes="*.xml"/>
191 <srcfiles dir="refpages" includes="intro-elements.xml, references.xml, elements/**/*.xml"/>
192 <srcfiles dir="stylesheets" includes="fo.xsl"/>
196 <target name="pdf" depends="xinclude,pdf.init" unless="pdf.isUpToDate" description="Generate document - pdf">
197 <copy todir="build/src/examples">
198 <fileset dir="examples"/>
200 <copy todir="build/pdf/images">
201 <fileset dir="${docbook.xsl}/images" includes="**/*.png,**/*.svg"/>
203 <copy todir="build/refpages/graphics">
204 <fileset dir="graphics" includes="*.eps,*.gif,*.png,*.svg"/>
206 <copy todir="build/refpages/elements/build/figures">
207 <fileset dir="figures" includes="*.eps,*.gif,*.png,*.svg"/>
210 <echo message="Making fo ..."/>
211 <java classname="com.icl.saxon.StyleSheet" fork="true" maxmemory="1024m"
212 failonerror="true" dir="build/pdf">
213 <jvmarg value="-Xss512k"/>
214 <classpath refid="lib.classpath"/>
216 <arg value="org.apache.xml.resolver.tools.ResolvingXMLReader"/>
218 <arg value="org.apache.xml.resolver.tools.ResolvingXMLReader"/>
220 <arg value="org.apache.xml.resolver.tools.CatalogResolver"/>
222 <arg value="defguide5.fo"/>
223 <arg value="../defguide5.xml"/>
224 <arg value="../../stylesheets/fo.xsl"/>
225 <arg value="fop1.extensions=1"/>
226 <arg value="title.font.family=${fop.title.font.family}"/>
227 <arg value="body.font.family=${fop.body.font.family}"/>
228 <arg value="sans.font.family=${fop.sans.font.family}"/>
229 <arg value="ingbat.font.family=${fop.ingbat.font.family}"/>
230 <arg value="monospace.font.family=${fop.monospace.font.family}"/>
233 <echo message="Making pdf ..."/>
234 <java classname="${fop.class}" fork="true" maxmemory="1024m" failonerror="true"
236 <jvmarg value="-Djava.awt.headless=true"/>
237 <classpath refid="lib.classpath"/>
239 <arg value="${fop.home}/conf/userconfig.xml"/>
240 <arg value="defguide5.fo"/>
241 <arg value="../defguide5.pdf"/>
245 <target name="pdf-xep" depends="xinclude,pdf.init" unless="pdf.isUpToDate" description="Generate document - pdf - xep">
246 <copy todir="build/src/examples">
247 <fileset dir="examples"/>
249 <copy todir="build/pdf/images">
250 <fileset dir="${docbook.xsl}/images" includes="**/*.png,**/*.svg"/>
252 <copy todir="build/refpages/graphics">
253 <fileset dir="graphics" includes="*.eps,*.gif,*.png,*.svg"/>
255 <copy todir="build/refpages/elements/build/figures">
256 <fileset dir="figures" includes="*.eps,*.gif,*.png,*.svg"/>
259 <echo message="Making fo ..."/>
260 <java classname="com.icl.saxon.StyleSheet" fork="true" maxmemory="1024m"
261 failonerror="true" dir="build/pdf">
262 <jvmarg value="-Xss512k"/>
263 <classpath refid="lib.classpath"/>
265 <arg value="org.apache.xml.resolver.tools.ResolvingXMLReader"/>
267 <arg value="org.apache.xml.resolver.tools.ResolvingXMLReader"/>
269 <arg value="org.apache.xml.resolver.tools.CatalogResolver"/>
271 <arg value="defguide5.fo"/>
272 <arg value="../defguide5.xml"/>
273 <arg value="../../stylesheets/fo.xsl"/>
274 <arg value="xep.extensions=1"/>
277 <echo message="Making pdf ..."/>
278 <java classname="com.renderx.xep.XSLDriver" fork="true" maxmemory="1536m"
279 failonerror="true" dir="build/pdf">
280 <jvmarg value="-Xss512k"/>
281 <classpath refid="xep.classpath"/>
282 <arg value="-DCONFIG=${xep.home}/xep.xml"/>
283 <arg value="-quiet"/>
284 <arg value="defguide5.fo"/>
285 <arg value="../defguide5.pdf"/>