1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
<?xml version="1.0" encoding="UTF-8"?>
<project name="gryle" basedir="." default="build">
<!--
Copyright (C) 2007 Chris Lamb <chris@chris-lamb.co.uk>
See the file COPYING for details.
-->
<description>
Build Gryle.
</description>
<property name="distprefix" value="gryle-0.1"/>
<property name="src" location="src"/>
<property name="bin" location="bin"/>
<property name="dist" location="dist"/>
<property name="javadoc" location="javadoc"/>
<property name="classes" location="uk/org/wuglug/gryle"/>
<property name="mainclass" value="uk.org.wuglug.gryle.Main"/>
<!-- Clean -->
<target name="clean">
<delete dir="${bin}"/>
<delete dir="${javadoc}"/>
<delete dir="${dist}"/>
</target>
<!-- Build -->
<target name="build" depends="clean" description="Build Gryle">
<mkdir dir="${bin}"/>
<javac debug="true" debuglevel="source,lines,vars" destdir="bin" source="1.5" target="1.5">
<src path="${src}"/>
</javac>
</target>
<!-- Run -->
<target name="run" depends="jars" description="Run Gryle">
<java jar="${dist}/gryle.jar" fork="true"/>
</target>
<!-- Javadoc -->
<target name="javadoc" description="Generate documentation">
<mkdir dir="${javadoc}"/>
<javadoc destdir="${javadoc">
<packageset dir="${src}" includes="${classes}"/>
</javadoc>
</target>
<!-- Jars -->
<target name="jars" depends="build" description="Creates JAR files">
<mkdir dir="${dist}"/>
<jar destfile="${dist}/gryle.jar" basedir="${bin}">
<manifest>
<attribute name="Main-Class" value="${mainclass}"/>
</manifest>
</jar>
</target>
<!-- Dist -->
<target name="dist" depends="jars" description="Generate distribution tarballs">
<tar destfile="${dist}/gryle.tar">
<tarfileset dir="." prefix="${distprefix}">
<include name="COPYING"/>
<include name="TODO"/>
</tarfileset>
<tarfileset dir="contrib" prefix="${distprefix}">
<include name="gryle.bat"/>
<include name="gryle"/>
</tarfileset>
<tarfileset dir="${dist}" prefix="${distprefix}">
<include name="*.jar"/>
</tarfileset>
</tar>
<gzip src="${dist}/gryle.tar" destfile="${dist}/${distprefix}.tar.gz"/>
<delete file="${dist}/gryle.tar"/>
<delete dir="${bin}"/>
</target>
</project>
|