2 |
|
|
3 |
|
<description> |
4 |
|
Build file for JSR-166 |
5 |
+ |
|
6 |
+ |
Note that junit.jar must be in ${ant.home}/lib for the |
7 |
+ |
test target to work. [FIXME: This should be automatically |
8 |
+ |
enforced by this build file by failing with a message if |
9 |
+ |
junit.jar is not in the right place.] |
10 |
|
</description> |
11 |
|
|
12 |
|
<!-- Compilation options --> |
13 |
|
<property name="build.debug" value="true"/> |
14 |
|
<property name="build.debuglevel" value="source,lines,vars"/> |
15 |
|
<property name="build.deprecation" value="false"/> |
16 |
< |
<property name="build.sourcelevel" value="1.4"/> |
16 |
> |
<property name="build.sourcelevel" value="1.5"/> |
17 |
|
|
18 |
|
<!-- Build locations --> |
19 |
|
<property name="build.dir" location="build"/> |
31 |
|
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
32 |
|
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
33 |
|
<property name="lib.dir" location="${basedir}/lib"/> |
34 |
+ |
<property name="dist.dir" location="${basedir}/dist"/> |
35 |
+ |
|
36 |
+ |
<!-- Distribution locations --> |
37 |
+ |
<property name="dist.javadocs.dir" location="${dist.dir}/docs"/> |
38 |
|
|
39 |
|
<!-- Jar locations --> |
40 |
|
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
44 |
|
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
45 |
|
|
46 |
|
<property name="gj.compiler.args" |
47 |
< |
value='-J-Xbootclasspath/p:${javac.jar} -bootclasspath ${collect.jar};${rt.jar} -gj' |
47 |
> |
value='-J-Xbootclasspath/p:${javac.jar} -deprecation -warnunchecked' |
48 |
|
/> |
49 |
|
|
50 |
+ |
<path id="gj.compiler.bootclasspath"> |
51 |
+ |
<pathelement location="${collect.jar}"/> |
52 |
+ |
<pathelement location="${rt.jar}"/> |
53 |
+ |
</path> |
54 |
+ |
|
55 |
+ |
<path id="test.classpath"> |
56 |
+ |
<pathelement location="${product.jar}"/> |
57 |
+ |
</path> |
58 |
+ |
|
59 |
|
|
60 |
|
<target name="compile"> |
61 |
|
<mkdir dir="${build.classes.dir}"/> |
67 |
|
source="${build.sourcelevel}" |
68 |
|
fork="true"> |
69 |
|
|
70 |
+ |
<bootclasspath refid="gj.compiler.bootclasspath"/> |
71 |
|
<compilerarg line="${gj.compiler.args}"/> |
72 |
|
|
73 |
|
<!-- need this because srcdir is basedir! --> |
88 |
|
<target name="test" depends="report-tests"/> |
89 |
|
|
90 |
|
|
91 |
< |
<target name="docs" depends="filter-src"> |
91 |
> |
<target name="docs" depends="clean-filtered-src, filter-src" |
92 |
> |
description="Builds javadocs with custom tags to build folder"> |
93 |
|
<delete dir="${build.javadocs.dir}"/> |
94 |
|
<mkdir dir="${build.javadocs.dir}"/> |
95 |
|
<javadoc destdir="${build.javadocs.dir}" |
99 |
|
|
100 |
|
<tag name="revised" description="Last revised:"/> |
101 |
|
<tag name="spec" description="Specified by:"/> |
102 |
+ |
<tag name="editor" description="Last edited by:"/> |
103 |
+ |
<tag name="fixme" description="FIX ME:"/> |
104 |
+ |
<packageset dir="${build.filter.src.dir}"> |
105 |
+ |
<include name="java/**"/> |
106 |
+ |
</packageset> |
107 |
+ |
|
108 |
+ |
</javadoc> |
109 |
+ |
</target> |
110 |
+ |
|
111 |
+ |
|
112 |
+ |
<target name="dist-docs" depends="clean-filtered-src, filter-src" |
113 |
+ |
description="Builds javadocs without custom tags to dist folder"> |
114 |
+ |
<delete dir="${dist.javadocs.dir}"/> |
115 |
+ |
<mkdir dir="${dist.javadocs.dir}"/> |
116 |
+ |
<javadoc destdir="${dist.javadocs.dir}" |
117 |
+ |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
118 |
+ |
overview="${src.dir}/intro.html" |
119 |
+ |
source="${build.sourcelevel}"> |
120 |
|
|
121 |
|
<packageset dir="${build.filter.src.dir}"> |
122 |
|
<include name="java/**"/> |
126 |
|
</target> |
127 |
|
|
128 |
|
|
129 |
+ |
<target name="dist" depends="clean, jar, dist-docs"> |
130 |
+ |
<!-- nothing to do here yet --> |
131 |
+ |
</target> |
132 |
+ |
|
133 |
+ |
|
134 |
|
<target name="clean"> |
135 |
|
<delete dir="${build.dir}"/> |
136 |
|
<delete dir="${build.classes.dir}"/> |
137 |
|
<delete dir="${build.lib.dir}"/> |
138 |
< |
<delete dir="${build.javadocs.dir}"/> |
138 |
> |
</target> |
139 |
> |
|
140 |
> |
|
141 |
> |
<target name="dist-clean" depends="clean"> |
142 |
> |
<delete dir="${dist.dir}"/> |
143 |
> |
</target> |
144 |
> |
|
145 |
> |
|
146 |
> |
<target name="clean-filtered-src"> |
147 |
> |
<delete dir="${build.filter.src.dir}"/> |
148 |
|
</target> |
149 |
|
|
150 |
|
|
212 |
|
source="${build.sourcelevel}" |
213 |
|
fork="true"> |
214 |
|
|
215 |
+ |
<bootclasspath refid="gj.compiler.bootclasspath"/> |
216 |
|
<compilerarg line="${gj.compiler.args}"/> |
217 |
< |
|
165 |
< |
<classpath id="test.classpath"> |
166 |
< |
<pathelement location="${product.jar}"/> |
167 |
< |
<pathelement location="${junit.jar}"/> |
168 |
< |
</classpath> |
169 |
< |
|
217 |
> |
<classpath refid="test.classpath"/> |
218 |
|
<include name="**/*Test.java"/> |
219 |
|
|
220 |
|
</javac> |