root/tags/0.11.3RC2/build.xml

Revision 2248, 11.2 KB (checked in by dominik, 12 months ago)

converted leading spaces to tabs

  • Property svn:keywords set to Id
Line 
1<?xml version="1.0"?>
2
3<project name="agavi" basedir="." default="main">
4
5  <!-- set up some stuff -->
6  <property environment="env"/>
7  <property file="build.properties"/>
8  <property name="package"  value="${phing.project.name}" override="true" />
9  <property name="builddir" value="build" override="true" />
10  <property name="srcdir"   value="${project.basedir}" override="true" />
11  <taskdef classname="etc.phing.AgaviPackageTask" name="agavipackage"/>
12  <taskdef classname="etc.phing.AgaviOlsonCompileTask" name="agaviolsoncompile"/>
13  <taskdef classname="src.buildtools.phing.AgaviTestTask" name="agavitest"/>
14
15  <!-- fileset for -dist files -->
16  <fileset dir="." id="distfiles">
17    <include name="**/*-dist"/>
18  </fileset>
19
20  <!-- main target -->
21  <target name="main" description="main target">
22    <echo msg="available targets: " />
23    <echo msg=" docs             : regenerate all documentation" />
24    <echo msg="  apidocs         : regenerate API docs" />
25    <echo msg="  manuals         : regenerate manuals (-Doutput=html|html-onepage|fo)" />
26    <echo msg=" packages         : generate all packages" />
27    <echo msg="  package-zip     : generate .zip package" />
28    <echo msg="  package-pear    : generate PEAR package" />
29    <echo msg="  package-apidocs : generate API docs package" />
30    <echo msg="  package-manuals : generate manuals package" />
31    <echo msg=" test    : run unit test suite" />
32    <echo msg=" clean   : clean out cruft" />
33  </target>
34
35  <target name="docs" description="generate API docs and manuals">
36    <phingcall target="apidocs" />
37    <phingcall target="manuals" />
38  </target>
39
40  <target name="apidocs" description="API docs">
41    <!-- HAXOR! we need to inject an 'ignore' cmdline argument to prevent the inclusion of the compiled timezone data and the buildtools, hence the weird 'output' attribute contents - the phing phpdoc task doesn't have an 'ignore' attribute -->
42    <phpdoc title="Agavi Documentation" destdir="apidocs" sourcepath="src" output="HTML:frames:DOM/earthli -i buildtools/,translation/data/timezones/"/>
43  </target>
44
45  <target name="manuals" description="generate all manuals">
46    <property name="output" value="html" override="false" />
47    <phingcall target="cookbook-${output}" />
48    <phingcall target="introduction-${output}" />
49    <phingcall target="guide-${output}" />
50  </target>
51
52  <!--target name="manual-cookbook">
53    <phingcall target="cookbook-${output}" />
54  </target>
55
56  <target name="manual-introduction">
57    <phingcall target="introduction-${output}" />
58  </target>
59
60  <target name="manual-guide">
61    <phingcall target="guide-${output}" />
62  </target-->
63
64  <!-- Agavi Cookbook -->
65  <target name="cookbook-html" >
66    <mkdir dir="manuals/cookbook/html/multipage" />
67    <copy file="docs/lib/agavi-manual.css" todir="manuals/cookbook/html/multipage" overwrite="true" />
68    <xslt file="docs/docbook/cookbook.xml" todir="manuals/cookbook/html/multipage" style="docs/lib/agavi-manual-html.xsl">
69      <param name="onechunk" expression="0" />
70      <param name="base.dir" expression="manuals/cookbook/html/multipage/" /><!-- end slash required -->
71      <param name="root.filename" expression="index" />
72      <param name="html.stylesheet" expression="agavi-manual.css" />
73      <param name="chunker.output.encoding" expression="UTF-8" />
74      <param name="id.warnings" expression="0" />
75      <param name="header.rule" expression="0" />
76      <param name="footer.rule" expression="0" />
77      <param name="suppress.navigation" expression="1" />
78    </xslt>
79  </target>
80
81  <target name="cookbook-html-onepage" >
82    <mkdir dir="manuals/cookbook/html/onepage" />
83    <copy file="docs/lib/agavi-manual.css" todir="manuals/cookbook/html/onepage" overwrite="true" />
84    <xslt file="docs/docbook/cookbook.xml" todir="manuals/cookbook/html/onepage" style="docs/lib/agavi-manual-html-onepage.xsl">
85      <param name="onechunk" expression="1" />
86      <param name="base.dir" expression="manuals/cookbook/html/onepage/" /><!-- end slash required -->
87      <param name="root.filename" expression="index" />
88      <param name="html.stylesheet" expression="agavi-manual.css" />
89      <param name="chunker.output.encoding" expression="UTF-8" />
90      <param name="id.warnings" expression="0" />
91      <param name="header.rule" expression="0" />
92      <param name="footer.rule" expression="0" />
93      <param name="suppress.navigation" expression="1" />
94    </xslt>
95  </target>
96
97  <!-- Introduction to Agavi -->
98  <target name="introduction-html" >
99    <mkdir dir="manuals/introduction/html/multipage" />
100    <copy file="docs/lib/agavi-manual.css" todir="manuals/introduction/html/multipage" overwrite="true" />
101    <xslt file="docs/docbook/introduction.xml" todir="manuals/introduction/html/multipage" style="docs/lib/agavi-manual-html.xsl">
102      <param name="onechunk" expression="0" />
103      <param name="base.dir" expression="manuals/introduction/html/multipage/" /><!-- end slash required -->
104      <param name="root.filename" expression="index" />
105      <param name="html.stylesheet" expression="agavi-manual.css" />
106      <param name="chunker.output.encoding" expression="UTF-8" />
107      <param name="id.warnings" expression="0" />
108      <param name="header.rule" expression="0" />
109      <param name="footer.rule" expression="0" />
110      <param name="suppress.navigation" expression="1" />
111    </xslt>
112  </target>
113
114  <target name="introduction-html-onepage" >
115    <mkdir dir="manuals/introduction/html/onepage" />
116    <copy file="docs/lib/agavi-manual.css" todir="manuals/introduction/html/onepage" overwrite="true" />
117    <xslt file="docs/docbook/introduction.xml" todir="manuals/introduction/html/onepage" style="docs/lib/agavi-manual-html-onepage.xsl">
118      <param name="onechunk" expression="1" />
119      <param name="base.dir" expression="manuals/introduction/html/onepage/" /><!-- end slash required -->
120      <param name="root.filename" expression="index" />
121      <param name="html.stylesheet" expression="agavi-manual.css" />
122      <param name="chunker.output.encoding" expression="UTF-8" />
123      <param name="id.warnings" expression="0" />
124      <param name="header.rule" expression="0" />
125      <param name="footer.rule" expression="0" />
126      <param name="suppress.navigation" expression="1" />
127    </xslt>
128  </target>
129
130  <!-- Definitive Guide -->
131  <target name="guide-html" >
132    <mkdir dir="manuals/guide/html/multipage" />
133    <copy file="docs/lib/agavi-manual.css" todir="manuals/guide/html/multipage" overwrite="true" />
134    <xslt file="docs/docbook/manual.xml" todir="manuals/guide/html/multipage" style="docs/lib/agavi-manual-html.xsl">
135      <param name="onechunk" expression="0" />
136      <param name="base.dir" expression="manuals/guide/html/multipage/" /><!-- end slash required -->
137      <param name="root.filename" expression="index" />
138      <param name="html.stylesheet" expression="agavi-manual.css" />
139      <param name="chunker.output.encoding" expression="UTF-8" />
140      <param name="id.warnings" expression="0" />
141      <param name="header.rule" expression="0" />
142      <param name="footer.rule" expression="0" />
143      <param name="suppress.navigation" expression="1" />
144    </xslt>
145  </target>
146
147  <target name="guide-html-onepage" >
148    <mkdir dir="manuals/guide/html/onepage" />
149    <copy file="docs/lib/agavi-manual.css" todir="manuals/guide/html/onepage" overwrite="true" />
150    <xslt file="docs/docbook/manual.xml" todir="manuals/guide/html/onepage" style="docs/lib/agavi-manual-html-onepage.xsl">
151      <param name="onechunk" expression="1" />
152      <param name="base.dir" expression="manuals/guide/html/onepage/" /><!-- end slash required -->
153      <param name="root.filename" expression="index" />
154      <param name="html.stylesheet" expression="agavi-manual.css" />
155      <param name="chunker.output.encoding" expression="UTF-8" />
156      <param name="id.warnings" expression="0" />
157      <param name="header.rule" expression="0" />
158      <param name="footer.rule" expression="0" />
159      <param name="suppress.navigation" expression="1" />
160    </xslt>
161  </target>
162
163  <!-- manuals FO -->
164
165  <target name="cookbook-fo" >
166    <mkdir dir="manuals/guide/fo" />
167    <xslt file="docs/docbook/manual.xml" tofile="manuals/guide/fo/cookbook.fo" style="docs/lib/agavi-manual-fo.xsl" >
168      <param name="base.dir" expression="manuals/guide/fo/" />
169      <param name="paper.type" expression="A4" />
170    </xslt>
171  </target>
172
173  <target name="introduction-fo" >
174    <mkdir dir="manuals/guide/fo" />
175    <xslt file="docs/docbook/manual.xml" tofile="manuals/guide/fo/introduction.fo" style="docs/lib/agavi-manual-fo.xsl" >
176      <param name="base.dir" expression="manuals/guide/fo/" />
177      <param name="paper.type" expression="A4" />
178    </xslt>
179  </target>
180
181  <target name="guide-fo" >
182    <mkdir dir="manuals/guide/fo" />
183    <xslt file="docs/docbook/manual.xml" tofile="manuals/guide/fo/guide.fo" style="docs/lib/agavi-manual-fo.xsl" >
184      <param name="base.dir" expression="manuals/guide/fo/" />
185      <param name="paper.type" expression="A4" />
186    </xslt>
187  </target>
188
189  <target name="package-zip">
190    <!-- zip a release package -->
191  </target>
192
193  <target name="package-apidocs">
194    <phingcall target="apidocs" />
195    <!-- now zip that -->
196  </target>
197
198  <target name="package-manuals">
199    <phingcall target="manuals" />
200    <!-- now zip that -->
201  </target>
202
203  <target name="package-pear" description="build pear package">
204    <!-- prepare -->
205    <delete dir="${builddir}" includeemptydirs="true" verbose="true" failonerror="false" />
206    <mkdir dir="${builddir}" />
207    <copy todir="${builddir}">
208      <fileset dir="src/">
209        <exclude name="**/*.svn" />
210        <include name="**/**" />
211      </fileset>
212    </copy>
213    <mkdir dir="${builddir}/samples" />
214    <copy todir="${builddir}/samples">
215      <fileset dir="samples/">
216        <exclude name="**/*.svn" />
217        <include name="**/**" />
218      </fileset>
219    </copy>
220    <copy file="API_CHANGELOG" todir="${builddir}" />
221    <copy file="CHANGELOG" todir="${builddir}" />
222    <copy file="COPYRIGHT" todir="${builddir}" />
223    <copy file="INSTALL" todir="${builddir}" />
224    <copy file="KNOWN_ISSUES" todir="${builddir}" />
225    <copy file="LICENSE" todir="${builddir}" />
226    <copy file="LICENSE-AGAVI" todir="${builddir}" />
227    <copy file="LICENSE-ICU" todir="${builddir}" />
228    <copy file="LICENSE-TANGO_ICON_THEME" todir="${builddir}" />
229    <copy file="LICENSE-UNICODE_CLDR" todir="${builddir}" />
230    <copy file="RELEASE_NOTES" todir="${builddir}" />
231    <copy file="TODO" todir="${builddir}" />
232    <mkdir dir="${builddir}/scripts" />
233    <copy file="etc/agavi-dist" todir="${builddir}/scripts" />
234    <copy file="etc/agavi.bat-dist" todir="${builddir}/scripts" />
235
236    <!-- generate package.xml -->
237    <agavipackage dir="${builddir}" />
238
239    <echo msg="package.xml generated to '${builddir}'. Use &quot;pear package&quot; in build/ to create the package." />
240  </target>
241
242  <target name="test" description="run test suite">
243    <agavitest exit="true"/>
244  </target>
245
246  <target name="clean" description="clean out the cruft">
247    <delete dir="manuals" includeemptydirs="true" failonerror="true" />
248    <delete dir="build" includeemptydirs="true" failonerror="true" />
249    <delete dir="apidocs" includeemptydirs="true" quiet="true" failonerror="false" />
250    <delete file="tests.html" includeemptydirs="true" quiet="true" failonerror="false" />
251  </target>
252
253  <target name="olson" description="build timezone datebase">
254    <agaviolsoncompile olsonDir="${srcdir}/etc/olson/tzdata" outputDir="${srcdir}/src/translation/data/timezones" />
255  </target>
256
257  <target name="damagecontrol" description="damagecontrol target">
258    <phingcall target="docs"/>
259    <phingcall target="package"/>
260    <agavitest exit="true" outfile="tests.html" reporter="html"/>
261    <!-- sync docs, packages, tests.html -->
262  </target>
263
264</project>
Note: See TracBrowser for help on using the browser.