1 |
ajm |
1.1 |
<!-- build file for i-scream CMS CORBA Services --> |
2 |
tdb |
1.3 |
<!-- $Id: build.xml,v 1.2 2001/06/14 17:03:04 ajm Exp $ --> |
3 |
ajm |
1.1 |
|
4 |
|
|
<project name="iscream-corbaservices" default="usage"> |
5 |
|
|
|
6 |
|
|
<!-- |
7 |
|
|
===================================================== |
8 |
|
|
Initialisation & Configuration |
9 |
|
|
===================================================== |
10 |
|
|
--> |
11 |
|
|
|
12 |
|
|
<property name="SOURCEROOT" value="${basedir}"/> |
13 |
|
|
<property name="CONFIGFILE" value="build.config"/> |
14 |
|
|
|
15 |
|
|
<target name="config"> |
16 |
|
|
<echo message="Reading build configuration"/> |
17 |
|
|
<property file="${CONFIGFILE}"/> |
18 |
|
|
</target> |
19 |
|
|
|
20 |
|
|
<!-- |
21 |
|
|
===================================================== |
22 |
|
|
Usage |
23 |
|
|
===================================================== |
24 |
|
|
--> |
25 |
|
|
|
26 |
|
|
<target name="usage"> |
27 |
|
|
<echo> |
28 |
|
|
|
29 |
|
|
These are the targets supported by this ANT build script: |
30 |
|
|
|
31 |
|
|
fetch - fetch all the JAR library files |
32 |
|
|
|
33 |
|
|
build - compile all source code |
34 |
|
|
package - generate JAR package and distributions |
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 Conient |
43 |
|
|
|
44 |
|
|
clean - clean all generated files |
45 |
|
|
distclean - remove 'fetched' libraries + clean |
46 |
|
|
|
47 |
|
|
Recommend to run the following target order: |
48 |
|
|
|
49 |
ajm |
1.2 |
fetch package javadoc install |
50 |
ajm |
1.1 |
</echo> |
51 |
|
|
</target> |
52 |
|
|
|
53 |
|
|
<target name="help"> |
54 |
|
|
<antcall target="usage"/> |
55 |
|
|
</target> |
56 |
|
|
|
57 |
|
|
<!-- |
58 |
|
|
===================================================== |
59 |
|
|
Fetch required libraries (not in dependency tree) |
60 |
|
|
===================================================== |
61 |
|
|
--> |
62 |
|
|
|
63 |
|
|
<!-- this uses static names, which is messy --> |
64 |
|
|
<!-- distclean target has same problem --> |
65 |
|
|
<target name="fetch" depends="config"> |
66 |
|
|
<get |
67 |
|
|
src="${LIBURL}/jacorb.jar" |
68 |
|
|
dest="${LIBDIR}/jacorb.jar" |
69 |
|
|
verbose="true" usetimestamp="true" |
70 |
|
|
/> |
71 |
|
|
<!-- also get jacorb.properties? --> |
72 |
|
|
</target> |
73 |
|
|
|
74 |
|
|
|
75 |
|
|
<!-- |
76 |
|
|
===================================================== |
77 |
|
|
Source code compilation |
78 |
|
|
===================================================== |
79 |
|
|
--> |
80 |
|
|
|
81 |
|
|
<target name="build" depends="config"> |
82 |
|
|
<javac |
83 |
|
|
srcdir="${SOURCEROOT}" |
84 |
|
|
destdir="${BUILDDIR}" |
85 |
|
|
classpath="${JCCLASSPATH}" |
86 |
|
|
includes="uk/**/*.java" |
87 |
|
|
debug="${JCDEBUG}" |
88 |
|
|
optimize="${JCOPTIM}" |
89 |
|
|
deprecation="${JCDEPRE}" |
90 |
|
|
/> |
91 |
|
|
</target> |
92 |
|
|
|
93 |
|
|
<!-- |
94 |
|
|
===================================================== |
95 |
|
|
Package creation |
96 |
|
|
===================================================== |
97 |
|
|
--> |
98 |
|
|
|
99 |
|
|
<target name="makejar" depends="build"> |
100 |
|
|
<echo file="${BUILDDIR}/MANIFEST_TMP" |
101 |
|
|
>Manifest-Version: 1.0 |
102 |
tdb |
1.3 |
Created-By: www.i-scream.org |
103 |
ajm |
1.1 |
Main-Class: ${MFMAINCLASS} |
104 |
|
|
Class-Path: ${MFCLPATH} |
105 |
|
|
</echo> |
106 |
|
|
<jar |
107 |
|
|
jarfile="${BUILDDIR}/${CORBASERVICESJAR}" |
108 |
|
|
basedir="${BUILDDIR}" |
109 |
|
|
includes="uk/**/*.class" |
110 |
|
|
manifest="${BUILDDIR}/MANIFEST_TMP" |
111 |
|
|
/> |
112 |
|
|
<delete file="${BUILDDIR}/MANIFEST_TMP"/> |
113 |
|
|
</target> |
114 |
|
|
|
115 |
|
|
<target name="maketardist" depends="makejar"> |
116 |
|
|
<tar |
117 |
|
|
longfile="fail" |
118 |
|
|
basedir="${BUILDDIR}" |
119 |
|
|
tarfile="${BUILDDIR}/${TARFILE}" |
120 |
|
|
includes="${CORBASERVICESJAR}, run.sh, lib/**, etc/**, README" |
121 |
|
|
/> |
122 |
|
|
<gzip src="${BUILDDIR}/${TARFILE}" zipfile="${BUILDDIR}/${TARGZFILE}"/> |
123 |
|
|
<delete file="${BUILDDIR}/${TARFILE}"/> |
124 |
|
|
</target> |
125 |
|
|
|
126 |
|
|
<target name="makezipdist" depends="makejar"> |
127 |
|
|
<zip |
128 |
|
|
basedir="${BUILDDIR}" |
129 |
|
|
zipfile="${BUILDDIR}/${ZIPFILE}" |
130 |
|
|
includes="${CORBASERVICESJAR}, run.bat, lib/**, etc/**, README" |
131 |
|
|
/> |
132 |
|
|
</target> |
133 |
|
|
|
134 |
|
|
<target name="package" depends="maketardist, makezipdist"/> |
135 |
|
|
|
136 |
|
|
<!-- |
137 |
|
|
===================================================== |
138 |
|
|
Cleaning |
139 |
|
|
===================================================== |
140 |
|
|
--> |
141 |
|
|
|
142 |
|
|
<target name="clean" depends="config"> |
143 |
|
|
<delete dir="${BUILDDIR}/${ROOTPKG}"/> |
144 |
|
|
<delete dir="${JDOCDIR}"/> |
145 |
|
|
<delete dir="${CVSBUILDTEMP}"/> |
146 |
|
|
<delete> |
147 |
|
|
<fileset dir="${BUILDDIR}"> |
148 |
|
|
<include name="${CORBASERVICESJAR}"/> |
149 |
|
|
<include name="${ARCNAME}*${TAREXT}"/> |
150 |
|
|
<include name="${ARCNAME}*${TARGZEXT}"/> |
151 |
|
|
<include name="${ARCNAME}*${ZIPEXT}"/> |
152 |
|
|
</fileset> |
153 |
|
|
</delete> |
154 |
|
|
</target> |
155 |
|
|
|
156 |
|
|
<target name="distclean" depends="clean"> |
157 |
|
|
<!-- this is messy, we should only delete specific jars --> |
158 |
|
|
<delete> |
159 |
|
|
<fileset dir="${LIBDIR}" includes="*.jar"/> |
160 |
|
|
</delete> |
161 |
|
|
</target> |
162 |
|
|
|
163 |
|
|
<!-- |
164 |
|
|
===================================================== |
165 |
|
|
Running |
166 |
|
|
===================================================== |
167 |
|
|
--> |
168 |
|
|
|
169 |
|
|
<!-- is this really the best way to do this? no... --> |
170 |
|
|
<target name="run" depends="config"> |
171 |
|
|
<java classname="${MFMAINCLASS}" dir="${BUILDDIR}" fork="yes"> |
172 |
|
|
<classpath path="${BUILDDIR}/${CORBASERVICESJAR}"/> |
173 |
|
|
</java> |
174 |
|
|
</target> |
175 |
|
|
|
176 |
|
|
<!-- |
177 |
|
|
===================================================== |
178 |
|
|
Javadoc |
179 |
|
|
===================================================== |
180 |
|
|
--> |
181 |
|
|
|
182 |
|
|
<target name="javadoc" depends="config"> |
183 |
|
|
<mkdir dir="${JDOCDIR}"/> |
184 |
|
|
<!-- link in here requires a live net link! --> |
185 |
|
|
<javadoc |
186 |
|
|
packagenames="${JDOCPKGS}" |
187 |
|
|
destdir="${JDOCDIR}" |
188 |
|
|
classpath="${JCCLASSPATH}" |
189 |
|
|
author="true" |
190 |
|
|
version="true" |
191 |
|
|
private="true" |
192 |
|
|
use="true" |
193 |
|
|
windowtitle="${JDOCTITLE}" |
194 |
|
|
header="${JDOCHEADER}" |
195 |
|
|
bottom="${JDOCBOTTOM}" |
196 |
|
|
link="${JDOCJAPI}" |
197 |
|
|
> |
198 |
|
|
<sourcepath> |
199 |
|
|
<pathelement path="${SOURCEROOT}"/> |
200 |
|
|
</sourcepath> |
201 |
|
|
</javadoc> |
202 |
|
|
</target> |
203 |
|
|
|
204 |
|
|
|
205 |
|
|
<!-- |
206 |
|
|
===================================================== |
207 |
|
|
Install |
208 |
|
|
===================================================== |
209 |
|
|
--> |
210 |
|
|
|
211 |
|
|
<target name="install" depends="config, makejar"> |
212 |
|
|
<mkdir dir="${INSTALLDEST}"/> |
213 |
|
|
<mkdir dir="${INSTALLDEST}/etc"/> |
214 |
|
|
<mkdir dir="${INSTALLDEST}/lib"/> |
215 |
|
|
<copy file="${BUILDDIR}/${CORBASERVICESJAR}" todir="${INSTALLDEST}"/> |
216 |
|
|
<copy file="${BUILDDIR}/run.sh" todir="${INSTALLDEST}"/> |
217 |
|
|
<copy file="${BUILDDIR}/run.bat" todir="${INSTALLDEST}"/> |
218 |
|
|
<copy todir="${INSTALLDEST}/lib" > |
219 |
|
|
<fileset dir="${LIBDIR}"> |
220 |
|
|
<include name="**/*.jar"/> |
221 |
|
|
<exclude name="**/CVS/*"/> |
222 |
|
|
</fileset> |
223 |
|
|
</copy> |
224 |
|
|
<copy todir="${INSTALLDEST}/etc" > |
225 |
|
|
<fileset dir="${BUILDDIR}/etc"> |
226 |
|
|
<include name="**/*"/> |
227 |
|
|
<exclude name="**/CVS/*"/> |
228 |
|
|
</fileset> |
229 |
|
|
</copy> |
230 |
|
|
<copy file="${BUILDDIR}/README" todir="${INSTALLDEST}"/> |
231 |
|
|
</target> |
232 |
|
|
|
233 |
|
|
<!-- |
234 |
|
|
===================================================== |
235 |
|
|
CVS Build |
236 |
|
|
===================================================== |
237 |
|
|
--> |
238 |
|
|
|
239 |
|
|
<target name="cvsbuild" depends="config"> |
240 |
|
|
<mkdir dir="${CVSBUILDTEMP}"/> |
241 |
|
|
<cvs |
242 |
|
|
cvsRoot="${CVSROOT}" |
243 |
|
|
command="export -d ${CVSBUILDTEMP}" |
244 |
|
|
tag="${REVISION}" |
245 |
|
|
package="${CVSMODULE}" |
246 |
|
|
/> |
247 |
|
|
<!-- it would be IDEAL to use the ant target here. |
248 |
|
|
BUT, it would need to use it's OWN properties. |
249 |
|
|
exec is a poor substitute. |
250 |
|
|
no idea about windows compatibility. --> |
251 |
|
|
<exec executable="ant" dir="${CVSBUILDTEMP}"> |
252 |
|
|
<arg value="fetch"/> |
253 |
|
|
</exec> |
254 |
|
|
<exec executable="ant" dir="${CVSBUILDTEMP}"> |
255 |
|
|
<arg value="package"/> |
256 |
|
|
</exec> |
257 |
|
|
<copy file="${CVSBUILDTEMP}/build/${TARGZFILE}" |
258 |
|
|
tofile="${BUILDDIR}/${ARCNAME}-${REVISION}${TARGZEXT}"/> |
259 |
|
|
<copy file="${CVSBUILDTEMP}/build/${ZIPFILE}" |
260 |
|
|
tofile="${BUILDDIR}/${ARCNAME}-${REVISION}${ZIPEXT}"/> |
261 |
|
|
<!-- should we be overwriting any old util jar here? --> |
262 |
|
|
</target> |
263 |
|
|
|
264 |
|
|
</project> |