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.4 by tdb, Fri May 18 00:40:34 2001 UTC vs.
Revision 1.8 by tdb, Fri May 18 02:12:33 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      sql table generation
10      drop shortcut targets
11  -->
12  
4    <!--
5      =====================================================
6        Initialisation & Configuration
# Line 26 | Line 17
17    
18    <!--
19      =====================================================
20 <      Main targets (shortcuts essentially)
20 >      Usage
21      =====================================================
22    -->
23    
24 <  <target name="fetch">
25 <    <antcall target="getlibs"/>
24 >  <target name="usage">
25 >    <echo>
26 >    
27 >     These are the targets supported by this ANT build script:
28 >    
29 >     fetch        - fetch all the JAR library files
30 >    
31 >     idl          - generate java source from IDL
32 >     build        - compile all source code
33 >     package      - generate JAR package and distributions
34 >     packageutil  - generate UTIL JAR package
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 the server
43 >    
44 >     clean        - clean all generated files
45 >     distclean    - remove 'fetched' libraries + clean
46 >    </echo>
47    </target>
48    
49 <  <target name="idl">
50 <    <antcall target="genidl"/>
49 >  <target name="help">
50 >    <antcall target="usage"/>
51    </target>
52    
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  
61  <target name="javadoc">
62    <antcall target="javadocapi"/>
63  </target>
64  
53    <!--
54      =====================================================
55        Fetch required libraries (not in dependency tree)
# Line 70 | Line 58
58    
59    <!-- this uses static names, which is messy -->
60    <!-- fullcleanup target has same problem -->
61 <  <target name="getlibs" depends="config">
61 >  <target name="fetch" depends="config">
62      <get
63        src="${LIBURL}/crimson.jar"
64        dest="${LIBDIR}/crimson.jar"
# Line 106 | Line 94
94    -->
95    
96    <!-- generate java code from idl files -->
97 <  <target name="genidl" depends="config">
97 >  <target name="idl" depends="config">
98      <echo message="Generating Java source from IDL"/>
99      <java classname="${IDLPARSER}">
100        <arg line="-d ${IDLDIR} ${IDLFILE}"/>
# Line 120 | Line 108
108      =====================================================
109    -->
110  
111 <  <target name="compileidl" depends="genidl">
111 >  <target name="buildidl" depends="idl">
112      <javac
113        srcdir="${IDLDIR}"
114        destdir="${BUILDDIR}"
# Line 132 | Line 120
120      />
121    </target>
122    
123 <  <target name="compile" depends="compileidl">
123 >  <target name="build" depends="buildidl">
124      <javac
125        srcdir="${SOURCEROOT}"
126        destdir="${BUILDDIR}"
# Line 150 | Line 138
138      =====================================================
139    -->
140    
141 <  <target name="makejar" depends="compile">
141 >  <target name="makejar" depends="build">
142      <echo file="${BUILDDIR}/MANIFEST_TMP"
143   >Manifest-Version: 1.0
144   Created-By: www.i-scream.org.uk
# Line 185 | Line 173 | Class-Path: ${MFCLPATH}
173      />
174    </target>
175    
176 <  <target name="makedist" depends="maketardist, makezipdist"/>
176 >  <target name="package" depends="maketardist, makezipdist"/>
177    
178    <!--
179      =====================================================
# Line 193 | Line 181 | Class-Path: ${MFCLPATH}
181      =====================================================
182    -->
183    
184 <  <target name="cleanup" depends="config">
184 >  <target name="clean" depends="config">
185      <delete dir="${IDLDIR}/${ROOTPKG}"/>
186      <delete dir="${BUILDDIR}/${ROOTPKG}"/>
199    <delete file="${BUILDDIR}/${SERVERJAR}"/>
200    <delete file="${BUILDDIR}/${TARFILE}"/>
201    <delete file="${BUILDDIR}/${TARGZFILE}"/>
202    <delete file="${BUILDDIR}/${ZIPFILE}"/>
187      <delete dir="${JDOCDIR}"/>
188 +    <delete dir="${CVSBUILDTEMP}"/>
189 +    <delete>
190 +      <fileset dir="${BUILDDIR}">
191 +        <include name="${SERVERJAR}"/>
192 +        <include name="${UTILJAR}"/>
193 +        <include name="${ARCNAME}*${TAREXT}"/>
194 +        <include name="${ARCNAME}*${TARGZEXT}"/>
195 +        <include name="${ARCNAME}*${ZIPEXT}"/>
196 +      </fileset>
197 +    </delete>
198    </target>
199    
200 <  <target name="fullcleanup" depends="cleanup">
200 >  <target name="distclean" depends="clean">
201      <!-- this is messy, we should only delete specific jars -->
202      <delete>
203        <fileset dir="${LIBDIR}" includes="*.jar"/>
# Line 212 | Line 206 | Class-Path: ${MFCLPATH}
206    
207    <!--
208      =====================================================
209 <      Running (not in dependency tree)
209 >      Running
210      =====================================================
211    -->
212    
213    <!-- is this really the best way to do this? no... -->
214 <  <target name="runserver" depends="config">
214 >  <target name="run" depends="config">
215      <java classname="${MFMAINCLASS}" dir="${BUILDDIR}" fork="yes">
216        <arg line="-f ${RUNFILTERNAME}"/>
217        <classpath path="${BUILDDIR}/${SERVERJAR}"/>
# Line 226 | Line 220 | Class-Path: ${MFCLPATH}
220    
221    <!--
222      =====================================================
223 <      Javadoc (not in dependency tree)
223 >      Javadoc
224      =====================================================
225    -->
226    
227 <  <target name="javadocapi" depends="config, genidl">
227 >  <target name="javadoc" depends="config, idl">
228      <mkdir dir="${JDOCDIR}"/>
229      <!-- link in here requires a live net link! -->
230      <javadoc
# Line 252 | Line 246 | Class-Path: ${MFCLPATH}
246          <pathelement path="${IDLDIR}"/>
247        </sourcepath>
248      </javadoc>
249 +  </target>
250 +  
251 +  <!--
252 +    =====================================================
253 +      Util Package
254 +    =====================================================
255 +  -->
256 +  
257 +  <!-- MUST clean here to ensure util package is tidy -->
258 +  <target name="buildutil" depends="config, clean">
259 +    <javac
260 +      srcdir="${SOURCEROOT}"
261 +      destdir="${BUILDDIR}"
262 +      classpath="${JCCLASSPATH}"
263 +      includes="${UTILSRC}"
264 +      debug="${JCDEBUG}"
265 +      optimize="${JCOPTIM}"
266 +      deprecation="${JCDEPRE}"
267 +    />
268 +  </target>
269 +  
270 +  <target name="packageutil" depends="buildutil">
271 +    <jar
272 +      jarfile="${BUILDDIR}/${UTILJAR}"
273 +      basedir="${BUILDDIR}"
274 +      includes="uk/**/*.class"
275 +    />
276 +  </target>
277 +  
278 +  <!--
279 +    =====================================================
280 +      Install
281 +    =====================================================
282 +  -->
283 +  
284 +  <target name="install" depends="config, makejar">
285 +    <mkdir dir="${INSTALLDEST}"/>
286 +    <mkdir dir="${INSTALLDEST}/etc"/>
287 +    <mkdir dir="${INSTALLDEST}/lib"/>
288 +    <copy file="${BUILDDIR}/${SERVERJAR}" todir="${INSTALLDEST}"/>
289 +    <copy file="${BUILDDIR}/run.sh" todir="${INSTALLDEST}"/>
290 +    <copy file="${BUILDDIR}/run.bat" todir="${INSTALLDEST}"/>
291 +    <copy todir="${INSTALLDEST}/lib" >
292 +      <fileset dir="${LIBDIR}">
293 +        <include name="**/*.jar"/>
294 +        <exclude name="**/CVS/*"/>
295 +      </fileset>
296 +    </copy>
297 +    <copy todir="${INSTALLDEST}/etc" >
298 +      <fileset dir="${BUILDDIR}/etc">
299 +        <include name="**/*"/>
300 +        <exclude name="**/CVS/*"/>
301 +      </fileset>
302 +    </copy>
303 +    <copy file="${BUILDDIR}/README" todir="${INSTALLDEST}"/>
304 +  </target>
305 +  
306 +  <!--
307 +    =====================================================
308 +      CVS Build
309 +    =====================================================
310 +  -->
311 +  
312 +  <target name="cvsbuild" depends="config">
313 +    <mkdir dir="${CVSBUILDTEMP}"/>
314 +    <cvs
315 +      cvsRoot="${CVSROOT}"
316 +      command="export -d ${CVSBUILDTEMP}"
317 +      tag="${REVISION}"
318 +      package="${CVSMODULE}"
319 +    />
320 +    <!-- it would be IDEAL to use the ant target here.
321 +         BUT, it would need to use it's OWN properties.
322 +         exec is a poor substitute.
323 +         no idea about windows compatibility. -->
324 +    <exec executable="ant" dir="${CVSBUILDTEMP}">
325 +      <arg value="fetch"/>
326 +    </exec>
327 +    <exec executable="ant" dir="${CVSBUILDTEMP}">
328 +      <arg value="packageutil"/>
329 +    </exec>
330 +    <exec executable="ant" dir="${CVSBUILDTEMP}">
331 +      <arg value="package"/>
332 +    </exec>
333 +    <copy file="${CVSBUILDTEMP}/build/${TARGZFILE}"
334 +          tofile="${BUILDDIR}/${ARCNAME}-${REVISION}${TARGZEXT}"/>
335 +    <copy file="${CVSBUILDTEMP}/build/${ZIPFILE}"
336 +          tofile="${BUILDDIR}/${ARCNAME}-${REVISION}${ZIPEXT}"/>
337 +    <!-- should we be overwriting any old util jar here? -->
338 +    <copy file="${CVSBUILDTEMP}/build/${UTILJAR}" todir="${BUILDDIR}"/>
339    </target>
340    
341   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines