1 |
|
<!-- build file for server --> |
2 |
|
<project name="iscream-server" default="usage"> |
3 |
|
|
4 |
– |
<!-- |
5 |
– |
TODO: |
6 |
– |
install target |
7 |
– |
cvs version build (including cleanup) |
8 |
– |
--> |
9 |
– |
|
4 |
|
<!-- |
5 |
|
===================================================== |
6 |
|
Initialisation & Configuration |
27 |
|
These are the targets supported by this ANT build script: |
28 |
|
|
29 |
|
fetch - fetch all the JAR library files |
30 |
+ |
|
31 |
|
idl - generate java source from IDL |
32 |
|
build - compile all source code |
33 |
|
package - generate JAR package and distributions |
34 |
|
packageutil - generate UTIL JAR package |
35 |
+ |
|
36 |
+ |
cvsbuild - build from cvs tag |
37 |
+ |
use -Drev=TAG switch to specify cvs tag |
38 |
+ |
|
39 |
|
javadoc - generate javadoc API |
40 |
+ |
install - install server |
41 |
+ |
use -Dprefix=/path/ switch to specify dest |
42 |
+ |
run - run the server |
43 |
+ |
|
44 |
|
clean - clean all generated files |
45 |
|
distclean - remove 'fetched' libraries + clean |
43 |
– |
run - run the server |
46 |
|
</echo> |
47 |
|
</target> |
48 |
|
|
184 |
|
<target name="clean" depends="config"> |
185 |
|
<delete dir="${IDLDIR}/${ROOTPKG}"/> |
186 |
|
<delete dir="${BUILDDIR}/${ROOTPKG}"/> |
185 |
– |
<delete file="${BUILDDIR}/${SERVERJAR}"/> |
186 |
– |
<delete file="${BUILDDIR}/${UTILJAR}"/> |
187 |
– |
<delete file="${BUILDDIR}/${TARFILE}"/> |
188 |
– |
<delete file="${BUILDDIR}/${TARGZFILE}"/> |
189 |
– |
<delete file="${BUILDDIR}/${ZIPFILE}"/> |
187 |
|
<delete dir="${JDOCDIR}"/> |
188 |
+ |
<delete dir="${CVSBUILDTEMP}"/> |
189 |
+ |
<delete> |
190 |
+ |
<fileset dir="${BUILDDIR}"> |
191 |
+ |
<include name="${SERVERJAR}"/> |
192 |
+ |
<include name="${UTILJAR}"/> |
193 |
+ |
<include name="${ARCNAME}*${TAREXT}"/> |
194 |
+ |
<include name="${ARCNAME}*${TARGZEXT}"/> |
195 |
+ |
<include name="${ARCNAME}*${ZIPEXT}"/> |
196 |
+ |
</fileset> |
197 |
+ |
</delete> |
198 |
|
</target> |
199 |
|
|
200 |
|
<target name="distclean" depends="clean"> |
273 |
|
basedir="${BUILDDIR}" |
274 |
|
includes="uk/**/*.class" |
275 |
|
/> |
276 |
+ |
</target> |
277 |
+ |
|
278 |
+ |
<!-- |
279 |
+ |
===================================================== |
280 |
+ |
Install |
281 |
+ |
===================================================== |
282 |
+ |
--> |
283 |
+ |
|
284 |
+ |
<target name="install" depends="config, makejar"> |
285 |
+ |
<mkdir dir="${INSTALLDEST}"/> |
286 |
+ |
<mkdir dir="${INSTALLDEST}/etc"/> |
287 |
+ |
<mkdir dir="${INSTALLDEST}/lib"/> |
288 |
+ |
<copy file="${BUILDDIR}/${SERVERJAR}" todir="${INSTALLDEST}"/> |
289 |
+ |
<copy file="${BUILDDIR}/run.sh" todir="${INSTALLDEST}"/> |
290 |
+ |
<copy file="${BUILDDIR}/run.bat" todir="${INSTALLDEST}"/> |
291 |
+ |
<copy todir="${INSTALLDEST}/lib" > |
292 |
+ |
<fileset dir="${LIBDIR}"> |
293 |
+ |
<include name="**/*.jar"/> |
294 |
+ |
<exclude name="**/CVS/*"/> |
295 |
+ |
</fileset> |
296 |
+ |
</copy> |
297 |
+ |
<copy todir="${INSTALLDEST}/etc" > |
298 |
+ |
<fileset dir="${BUILDDIR}/etc"> |
299 |
+ |
<include name="**/*"/> |
300 |
+ |
<exclude name="**/CVS/*"/> |
301 |
+ |
</fileset> |
302 |
+ |
</copy> |
303 |
+ |
<copy file="${BUILDDIR}/README" todir="${INSTALLDEST}"/> |
304 |
+ |
</target> |
305 |
+ |
|
306 |
+ |
<!-- |
307 |
+ |
===================================================== |
308 |
+ |
CVS Build |
309 |
+ |
===================================================== |
310 |
+ |
--> |
311 |
+ |
|
312 |
+ |
<target name="cvsbuild" depends="config"> |
313 |
+ |
<mkdir dir="${CVSBUILDTEMP}"/> |
314 |
+ |
<cvs |
315 |
+ |
cvsRoot="${CVSROOT}" |
316 |
+ |
command="export -d ${CVSBUILDTEMP}" |
317 |
+ |
tag="${REVISION}" |
318 |
+ |
package="${CVSMODULE}" |
319 |
+ |
/> |
320 |
+ |
<!-- it would be IDEAL to use the ant target here. |
321 |
+ |
BUT, it would need to use it's OWN properties. |
322 |
+ |
exec is a poor substitute. |
323 |
+ |
no idea about windows compatibility. --> |
324 |
+ |
<exec executable="ant" dir="${CVSBUILDTEMP}"> |
325 |
+ |
<arg value="fetch"/> |
326 |
+ |
</exec> |
327 |
+ |
<exec executable="ant" dir="${CVSBUILDTEMP}"> |
328 |
+ |
<arg value="packageutil"/> |
329 |
+ |
</exec> |
330 |
+ |
<exec executable="ant" dir="${CVSBUILDTEMP}"> |
331 |
+ |
<arg value="package"/> |
332 |
+ |
</exec> |
333 |
+ |
<copy file="${CVSBUILDTEMP}/build/${TARGZFILE}" |
334 |
+ |
tofile="${BUILDDIR}/${ARCNAME}-${REVISION}${TARGZEXT}"/> |
335 |
+ |
<copy file="${CVSBUILDTEMP}/build/${ZIPFILE}" |
336 |
+ |
tofile="${BUILDDIR}/${ARCNAME}-${REVISION}${ZIPEXT}"/> |
337 |
+ |
<!-- should we be overwriting any old util jar here? --> |
338 |
+ |
<copy file="${CVSBUILDTEMP}/build/${UTILJAR}" todir="${BUILDDIR}"/> |
339 |
|
</target> |
340 |
|
|
341 |
|
</project> |