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 |
8 |
|
--> |
9 |
|
|
10 |
|
<!-- |
23 |
|
|
24 |
|
<!-- |
25 |
|
===================================================== |
26 |
< |
Main targets (shortcuts essentially) |
26 |
> |
Usage |
27 |
|
===================================================== |
28 |
|
--> |
29 |
|
|
30 |
< |
<target name="fetch"> |
31 |
< |
<antcall target="getlibs"/> |
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="idl"> |
48 |
< |
<antcall target="genidl"/> |
47 |
> |
<target name="help"> |
48 |
> |
<antcall target="usage"/> |
49 |
|
</target> |
50 |
|
|
41 |
– |
<target name="build"> |
42 |
– |
<antcall target="compile"/> |
43 |
– |
</target> |
44 |
– |
|
45 |
– |
<target name="package"> |
46 |
– |
<antcall target="makedist"/> |
47 |
– |
</target> |
48 |
– |
|
49 |
– |
<target name="run"> |
50 |
– |
<antcall target="runserver"/> |
51 |
– |
</target> |
52 |
– |
|
53 |
– |
<target name="clean"> |
54 |
– |
<antcall target="cleanup"/> |
55 |
– |
</target> |
56 |
– |
|
57 |
– |
<target name="distclean"> |
58 |
– |
<antcall target="fullcleanup"/> |
59 |
– |
</target> |
60 |
– |
|
51 |
|
<!-- |
52 |
|
===================================================== |
53 |
|
Fetch required libraries (not in dependency tree) |
56 |
|
|
57 |
|
<!-- this uses static names, which is messy --> |
58 |
|
<!-- fullcleanup target has same problem --> |
59 |
< |
<target name="getlibs" depends="config"> |
59 |
> |
<target name="fetch" depends="config"> |
60 |
|
<get |
61 |
|
src="${LIBURL}/crimson.jar" |
62 |
|
dest="${LIBDIR}/crimson.jar" |
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="fullcleanup" depends="cleanup"> |
193 |
> |
<target name="distclean" depends="clean"> |
194 |
|
<!-- this is messy, we should only delete specific jars --> |
195 |
|
<delete> |
196 |
|
<fileset dir="${LIBDIR}" includes="*.jar"/> |
199 |
|
|
200 |
|
<!-- |
201 |
|
===================================================== |
202 |
< |
Running (not in dependency tree) |
202 |
> |
Running |
203 |
|
===================================================== |
204 |
|
--> |
205 |
|
|
206 |
< |
<!-- is this really the best way to do this? --> |
207 |
< |
<target name="runserver" depends="config"> |
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> |