root/tags/1.0.0beta1/build.xml

Revision 2603, 10.7 KB (checked in by impl, 6 months ago)

merge [2599:2600/branches/0.11], updating PEAR package task, and moving build system files around so that PEAR works correctly, with a few minor bugfixes

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