Optimize building script.
[docbook-zh.git] / defguide5 / build.xml
bloba771b0b46d9990b4f4fb104c07fff9d2e9a29834
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Usage:
4     Building 'The Definitive Guide (5.0)' - all
5         $ ant
7     Building 'The Definitive Guide (5.0)' - en(html & pdf)
8         $ ant en
10     Building 'The Definitive Guide (5.0)' - zh(html & pdf)
11         $ ant zh
13 Dependency(en):
14     *) jdk 1.6
15     *) ant 1.7
16     *) bsf 2.4
17     *) beanshell 2.0b4
18     *) saxon 6.5 & 9.1
19     *) RELAX NG Support(jing)
20     *) DocBook XSL
21     *) xsltproc 1.1.24
22     *) python 2.5
23     *) python-libxml2 2.6.32
24     *) gettext 0.17
25     *) fop trunk 2008-10-27(r708012), pdf only
26     *) chinese font files, chinese pdf only
28 Dependency(zh only):
29     *) python 2.4
30     *) python-libxml2 2.6.27
31     *) gettext 0.16
32     *) chinese font files, pdf only
33 -->
34 <project default="all" name="defguide5">
36     <property file="build-common.properties"/>
37     <import file="build-common.xml"/>
39     <target name="properties" description="Print runtime properties">
40         <echo message="Print runtime properties"/>
41         <echo message="ant.java.version: ${ant.java.version}"/>
42         <echo message="ant.version: ${ant.version}"/>
43         <echo message="ant.file: ${ant.file}"/>
44         <echo message="ant.project.name: ${ant.project.name}"/>
45         <echo message="os.name: ${os.name}"/>
46         <echo message="os.arch: ${os.arch}"/>
47         <echo message="os.version: ${os.version}"/>
48         <echo message="file.encoding: ${file.encoding}"/>
49         <echo message="file.separator: ${file.separator}"/>
50         <echo message="path.separator: ${path.separator}"/>
51         <echo message="user.home: ${user.home}"/>
52         <echo message="basedir: ${basedir}"/>
53     </target>
55     <target name="usage">
56         <echo message="Use the -projecthelp option instead"/>
57     </target>
59     <target name="clean" description="Clean the build directory">
60         <ant dir="en" target="clean"/>
61         <ant dir="zh" target="clean"/>
62     </target>
64     <target name="init" depends="init-avail" description="Check runtime configuration">
65         <echo message="java.version: ${java.version}"/>
67         <fail>
68             <condition>
69                 <not><available file="build-common.properties"/></not>
70             </condition>
71             Please create your build-common.properties from build-common.properties.tmpl !
72         </fail>
73     </target>
75     <target name="validate" depends="init" description="Validate source document">
76         <ant dir="en" target="validate"/>
77         <ant dir="zh" target="validate"/>
78     </target>
80     <target name="en" depends="init" description="Generate document - en">
81         <echo message="Building 'The Definitive Guide (5.0)' - en ..."/>
82         <ant dir="en"/>
83     </target>
85     <target name="zh" depends="init" description="Generate document - zh">
86         <echo message="Building 'The Definitive Guide (5.0)' - zh ..."/>
87         <ant dir="zh"/>
88     </target>
90     <target name="all" description="Generate document - en,zh">
91         <antcall target="en"/>
92         <antcall target="zh"/>
93     </target>
94 </project>