1 |
|
<!-- build file for server --> |
2 |
< |
<project name="iscream-server" default="package"> |
2 |
> |
<project name="iscream-server" default="usage"> |
3 |
|
|
4 |
|
<!-- |
5 |
|
TODO: |
6 |
– |
build/jar util package |
6 |
|
install target |
7 |
|
cvs version build (including cleanup) |
9 |
– |
javadoc |
10 |
– |
sql table generation |
11 |
– |
run target |
12 |
– |
distclean target |
8 |
|
--> |
9 |
|
|
10 |
|
<!-- |
23 |
|
|
24 |
|
<!-- |
25 |
|
===================================================== |
26 |
< |
Main targets (shortcuts essentially) |
26 |
> |
Usage |
27 |
|
===================================================== |
28 |
|
--> |
29 |
|
|
30 |
< |
<target name="idl"> |
31 |
< |
<antcall target="genidl"/> |
30 |
> |
<target name="usage"> |
31 |
> |
<echo> |
32 |
> |
|
33 |
> |
These are the targets supported by this ANT build script: |
34 |
> |
|
35 |
> |
fetch - fetch all the JAR library files |
36 |
> |
idl - generate java source from IDL |
37 |
> |
build - compile all source code |
38 |
> |
package - generate JAR package and distributions |
39 |
> |
packageutil - generate UTIL JAR package |
40 |
> |
javadoc - generate javadoc API |
41 |
> |
clean - clean all generated files |
42 |
> |
distclean - remove 'fetched' libraries + clean |
43 |
> |
run - run the server |
44 |
> |
</echo> |
45 |
|
</target> |
46 |
|
|
47 |
< |
<target name="build"> |
48 |
< |
<antcall target="compile"/> |
47 |
> |
<target name="help"> |
48 |
> |
<antcall target="usage"/> |
49 |
|
</target> |
50 |
|
|
51 |
< |
<target name="package"> |
52 |
< |
<antcall target="makedist"/> |
53 |
< |
</target> |
51 |
> |
<!-- |
52 |
> |
===================================================== |
53 |
> |
Fetch required libraries (not in dependency tree) |
54 |
> |
===================================================== |
55 |
> |
--> |
56 |
|
|
57 |
< |
<target name="clean"> |
58 |
< |
<antcall target="cleanup"/> |
57 |
> |
<!-- this uses static names, which is messy --> |
58 |
> |
<!-- fullcleanup target has same problem --> |
59 |
> |
<target name="fetch" depends="config"> |
60 |
> |
<get |
61 |
> |
src="${LIBURL}/crimson.jar" |
62 |
> |
dest="${LIBDIR}/crimson.jar" |
63 |
> |
verbose="true" usetimestamp="true" |
64 |
> |
/> |
65 |
> |
<get |
66 |
> |
src="${LIBURL}/idl.jar" |
67 |
> |
dest="${LIBDIR}/idl.jar" |
68 |
> |
verbose="true" usetimestamp="true" |
69 |
> |
/> |
70 |
> |
<get |
71 |
> |
src="${LIBURL}/jacorb.jar" |
72 |
> |
dest="${LIBDIR}/jacorb.jar" |
73 |
> |
verbose="true" usetimestamp="true" |
74 |
> |
/> |
75 |
> |
<get |
76 |
> |
src="${LIBURL}/jaxp.jar" |
77 |
> |
dest="${LIBDIR}/jaxp.jar" |
78 |
> |
verbose="true" usetimestamp="true" |
79 |
> |
/> |
80 |
> |
<get |
81 |
> |
src="${LIBURL}/mm.mysql-2.0.4-bin.jar" |
82 |
> |
dest="${LIBDIR}/mm.mysql-2.0.4-bin.jar" |
83 |
> |
verbose="true" usetimestamp="true" |
84 |
> |
/> |
85 |
> |
<!-- also get jacorb.properties? --> |
86 |
|
</target> |
87 |
|
|
88 |
|
<!-- |
92 |
|
--> |
93 |
|
|
94 |
|
<!-- generate java code from idl files --> |
95 |
< |
<target name="genidl" depends="config"> |
95 |
> |
<target name="idl" depends="config"> |
96 |
|
<echo message="Generating Java source from IDL"/> |
97 |
|
<java classname="${IDLPARSER}"> |
98 |
|
<arg line="-d ${IDLDIR} ${IDLFILE}"/> |
106 |
|
===================================================== |
107 |
|
--> |
108 |
|
|
109 |
< |
<target name="compileidl" depends="genidl"> |
109 |
> |
<target name="buildidl" depends="idl"> |
110 |
|
<javac |
111 |
|
srcdir="${IDLDIR}" |
112 |
|
destdir="${BUILDDIR}" |
118 |
|
/> |
119 |
|
</target> |
120 |
|
|
121 |
< |
<target name="compile" depends="compileidl"> |
121 |
> |
<target name="build" depends="buildidl"> |
122 |
|
<javac |
123 |
|
srcdir="${SOURCEROOT}" |
124 |
|
destdir="${BUILDDIR}" |
136 |
|
===================================================== |
137 |
|
--> |
138 |
|
|
139 |
< |
<target name="makejar" depends="compile"> |
139 |
> |
<target name="makejar" depends="build"> |
140 |
|
<echo file="${BUILDDIR}/MANIFEST_TMP" |
141 |
|
>Manifest-Version: 1.0 |
142 |
|
Created-By: www.i-scream.org.uk |
171 |
|
/> |
172 |
|
</target> |
173 |
|
|
174 |
< |
<target name="makedist" depends="maketardist, makezipdist"/> |
174 |
> |
<target name="package" depends="maketardist, makezipdist"/> |
175 |
|
|
176 |
|
<!-- |
177 |
|
===================================================== |
179 |
|
===================================================== |
180 |
|
--> |
181 |
|
|
182 |
< |
<target name="cleanup" depends="config"> |
182 |
> |
<target name="clean" depends="config"> |
183 |
|
<delete dir="${IDLDIR}/${ROOTPKG}"/> |
184 |
|
<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}"/> |
190 |
+ |
<delete dir="${JDOCDIR}"/> |
191 |
+ |
</target> |
192 |
+ |
|
193 |
+ |
<target name="distclean" depends="clean"> |
194 |
+ |
<!-- this is messy, we should only delete specific jars --> |
195 |
+ |
<delete> |
196 |
+ |
<fileset dir="${LIBDIR}" includes="*.jar"/> |
197 |
+ |
</delete> |
198 |
+ |
</target> |
199 |
+ |
|
200 |
+ |
<!-- |
201 |
+ |
===================================================== |
202 |
+ |
Running |
203 |
+ |
===================================================== |
204 |
+ |
--> |
205 |
+ |
|
206 |
+ |
<!-- is this really the best way to do this? no... --> |
207 |
+ |
<target name="run" depends="config"> |
208 |
+ |
<java classname="${MFMAINCLASS}" dir="${BUILDDIR}" fork="yes"> |
209 |
+ |
<arg line="-f ${RUNFILTERNAME}"/> |
210 |
+ |
<classpath path="${BUILDDIR}/${SERVERJAR}"/> |
211 |
+ |
</java> |
212 |
+ |
</target> |
213 |
+ |
|
214 |
+ |
<!-- |
215 |
+ |
===================================================== |
216 |
+ |
Javadoc |
217 |
+ |
===================================================== |
218 |
+ |
--> |
219 |
+ |
|
220 |
+ |
<target name="javadoc" depends="config, idl"> |
221 |
+ |
<mkdir dir="${JDOCDIR}"/> |
222 |
+ |
<!-- link in here requires a live net link! --> |
223 |
+ |
<javadoc |
224 |
+ |
packagenames="${JDOCPKGS}" |
225 |
+ |
destdir="${JDOCDIR}" |
226 |
+ |
classpath="${JCCLASSPATH}" |
227 |
+ |
author="true" |
228 |
+ |
version="true" |
229 |
+ |
private="true" |
230 |
+ |
use="true" |
231 |
+ |
windowtitle="${JDOCTITLE}" |
232 |
+ |
header="${JDOCHEADER}" |
233 |
+ |
bottom="${JDOCBOTTOM}" |
234 |
+ |
link="${JDOCJAPI}" |
235 |
+ |
> |
236 |
+ |
<!-- need to do idl generated source too --> |
237 |
+ |
<sourcepath> |
238 |
+ |
<pathelement path="${SOURCEROOT}"/> |
239 |
+ |
<pathelement path="${IDLDIR}"/> |
240 |
+ |
</sourcepath> |
241 |
+ |
</javadoc> |
242 |
+ |
</target> |
243 |
+ |
|
244 |
+ |
<!-- |
245 |
+ |
===================================================== |
246 |
+ |
Util Package |
247 |
+ |
===================================================== |
248 |
+ |
--> |
249 |
+ |
|
250 |
+ |
<!-- MUST clean here to ensure util package is tidy --> |
251 |
+ |
<target name="buildutil" depends="config, clean"> |
252 |
+ |
<javac |
253 |
+ |
srcdir="${SOURCEROOT}" |
254 |
+ |
destdir="${BUILDDIR}" |
255 |
+ |
classpath="${JCCLASSPATH}" |
256 |
+ |
includes="${UTILSRC}" |
257 |
+ |
debug="${JCDEBUG}" |
258 |
+ |
optimize="${JCOPTIM}" |
259 |
+ |
deprecation="${JCDEPRE}" |
260 |
+ |
/> |
261 |
+ |
</target> |
262 |
+ |
|
263 |
+ |
<target name="packageutil" depends="buildutil"> |
264 |
+ |
<jar |
265 |
+ |
jarfile="${BUILDDIR}/${UTILJAR}" |
266 |
+ |
basedir="${BUILDDIR}" |
267 |
+ |
includes="uk/**/*.class" |
268 |
+ |
/> |
269 |
|
</target> |
270 |
|
|
271 |
|
</project> |