source: trunk/build.xml@ 304

Last change on this file since 304 was 304, checked in by ra33, 16 years ago
File size: 4.2 KB
Line 
1<!--
2
3ANT build script for both the Apollo and Expeditee project.
4
5Originally created for the apollo project - but can be used for
6creating expeditee distributions.
7
8This does not include the lib jars within the distributed jar -
9such resources would have to be handled specially in code
10(i.e. jar loaders...).
11
12-->
13<project name="Expeditee" default="fresh_dist_exp">
14
15 <property name="sourcelevel" value="1.5" />
16 <property name="targetlevel" value="1.5" />
17
18 <property name="src.dir.exp" location="src" /> <!-- source files for expeditee -->
19 <property name="src.dir.apollo" location="src_apollo" /> <!-- source files for apollo -->
20
21 <property name="build.dir" location="bin" /> <!-- compiled class files directory -->
22
23 <property name="lib.dir.exp" location="releases/jars" /> <!-- external dependencies -->
24 <property name="lib.dir.apollo" location="jars_apollo" /> <!-- external dependencies -->
25
26 <property name="dist.dir.exp" location="releases" /> <!-- Put the output jar file into the same directory as the others. The manifest file needs to be edited with relative dependencies if another directory structure is desired. -->
27 <property name="dist.dir.apollo" location="releases/apollo" /> <!-- Put the output jar file into the same directory as the others. The manifest file needs to be edited with relative dependencies if another directory structure is desired. -->
28
29
30 <property name="dist.filename.exp" value="Expeditee.jar" />
31 <property name="dist.filename.apollo" value="Apollo_jvm${targetlevel}.jar" />
32
33 <property name="manifest.path.exp" value="makeFiles/Manifest.txt" />
34 <property name="manifest.path.apollo" value="${lib.dir.apollo}/dist_manifest.mf" />
35
36 <property name="resources.dir.apollo" location="resources_apollo" /> <!-- resources files for apollo -->
37
38
39 <path id="classpath.exp">
40 <!-- link with all jar files we can find in our defined lib directory -->
41 <fileset dir="${lib.dir.exp}">
42 <include name="*.jar" />
43 </fileset>
44 </path>
45
46 <path id="classpath.apollo">
47 <!-- link with all jar files we can find in our defined lib directory -->
48 <fileset dir="${lib.dir.exp}">
49 <include name="*.jar" />
50 </fileset>
51 <fileset dir="${lib.dir.apollo}">
52 <include name="*.jar" />
53 </fileset>
54 </path>
55
56
57 <!-- TARGETS -->
58 <target name="clean" description="Deletes contents of build directory.">
59 <delete dir="${build.dir}" />
60 <mkdir dir="${build.dir}" />
61 </target>
62
63
64 <!-- Set up directories that are needed for building." -->
65 <target name="init_expeditee">
66 <mkdir dir="${build.dir}" />
67 <mkdir dir="${lib.dir.exp}" />
68 </target>
69
70 <target name="init_apollo" depends="init_expeditee">
71 <mkdir dir="${lib.dir.apollo}" />
72 </target>
73
74
75 <!-- Do the actual compilation." -->
76 <target name="compile_exp" depends="init_expeditee">
77 <javac srcdir="${src.dir.exp}"
78 destdir="${build.dir}"
79 debug="off"
80 optimize="on"
81 source="${sourcelevel}"
82 target="${targetlevel}"
83 compiler="modern"
84 listfiles="true">
85 <classpath refid="classpath.exp" />
86 <compilerarg value="-Xlint:unchecked"/>
87 </javac>
88 </target>
89
90 <target name="compile_apollo" depends="init_apollo, compile_exp">
91 <javac srcdir="${src.dir.apollo}"
92 destdir="${build.dir}"
93 debug="off"
94 optimize="on"
95 source="${sourcelevel}"
96 target="${targetlevel}"
97 compiler="modern"
98 listfiles="true">
99 <classpath refid="classpath.apollo" />
100 <compilerarg value="-Xlint:unchecked"/>
101 </javac>
102 </target>
103
104
105 <!-- Jaring up the projects." -->
106 <target name="lazy_dist_exp" depends="compile_exp" description="Warning: Does not clean before compile.">
107 <jar destfile="${dist.dir.exp}/${dist.filename.exp}" manifest="${manifest.path.exp}">
108 <fileset dir="${build.dir}"/>
109 </jar>
110 </target>
111
112 <target name="fresh_dist_exp" depends="clean, lazy_dist_exp"/>
113
114 <target name="lazy_dist_apollo" depends="compile_apollo" description="Warning: Does not clean before compile.">
115 <jar destfile="${dist.dir.apollo}/${dist.filename.apollo}" manifest="${manifest.path.apollo}">
116 <fileset dir="${build.dir}"/>
117 <fileset dir="${resources.dir.apollo}"/>
118 </jar>
119 </target>
120
121 <target name="fresh_dist_apollo" depends="clean, lazy_dist_apollo"/>
122
123</project>
Note: See TracBrowser for help on using the repository browser.