ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/build.xml
(Generate patch)

Comparing projects/cms/source/server/build.xml (file contents):
Revision 1.2 by tdb, Mon May 14 02:43:23 2001 UTC vs.
Revision 1.7 by tdb, Fri May 18 01:32:15 2001 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines