22 |
|
|
23 |
|
<!-- Compilation options --> |
24 |
|
<property name="build.sourcelevel" value="1.5"/> |
25 |
– |
<property name="build.docsourcelevel" value="1.4"/> |
25 |
|
<property name="build.debug" value="true"/> |
26 |
|
<property name="build.debuglevel" value="source,lines,vars"/> |
27 |
|
<property name="build.deprecation" value="false"/> |
29 |
|
<!-- Build locations --> |
30 |
|
<property name="build.dir" location="build"/> |
31 |
|
<property name="build.classes.dir" location="${build.dir}/classes"/> |
33 |
– |
<property name="build.emulation.dir" location="${build.dir}/emulation"/> |
32 |
|
<property name="build.testcases.dir" location="${build.dir}/testcases"/> |
33 |
|
<property name="build.lib.dir" location="${build.dir}/lib"/> |
34 |
|
<property name="build.ant.dir" location="${build.dir}/ant"/> |
35 |
|
<property name="build.javadocs.dir" location="${build.dir}/javadocs"/> |
38 |
– |
<property name="build.sinjdocs.dir" location="${build.dir}/sinjdocs"/> |
39 |
– |
<property name="build.stripped.dir" location="${build.dir}/stripped"/> |
36 |
|
<property name="build.reports.dir" location="${build.dir}/reports"/> |
37 |
+ |
<property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/> |
38 |
|
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
39 |
|
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
40 |
< |
<property name="build.filter.doccheck.dir" location="${build.dir}/filterdocchk"/> |
40 |
> |
<property name="build.dc-filter.dir" location="${build.dir}/filterdocchk"/> |
41 |
|
|
42 |
|
<!-- Source locations --> |
43 |
|
<property name="src.dir" location="${basedir}/src/main"/> |
47 |
– |
<property name="emulation.src.dir" location="${basedir}/src/emulation"/> |
44 |
|
<property name="test.src.dir" location="${basedir}/src/test"/> |
45 |
|
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
46 |
|
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
53 |
|
<!-- Jar locations --> |
54 |
|
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
55 |
|
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
56 |
< |
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
57 |
< |
<property name="sinjdoc.jar" location="${lib.dir}/sinjdoc.jar"/> |
58 |
< |
|
56 |
> |
|
57 |
> |
<!-- Bootclasspath argument --> |
58 |
> |
<property name="bootclasspath.args" value="-Xbootclasspath/p:${product.jar}"/> |
59 |
|
|
60 |
< |
<!-- Files excluded from dist-docs and emulation jar --> |
61 |
< |
<patternset id="unsafe.exclusion"> |
62 |
< |
<exclude name="java/util/Random.*"/> |
63 |
< |
<exclude name="sun/misc/Unsafe.*"/> |
64 |
< |
</patternset> |
69 |
< |
|
70 |
< |
<!-- Files excludes from emulation jar --> |
71 |
< |
<patternset id="atomic.exclusion"> |
72 |
< |
<exclude name="java/util/concurrent/atomic/AtomicBoolean*"/> |
73 |
< |
<exclude name="java/util/concurrent/atomic/AtomicInteger*"/> |
74 |
< |
<exclude name="java/util/concurrent/atomic/AtomicLong*"/> |
75 |
< |
<exclude name="java/util/concurrent/atomic/AtomicReference*"/> |
76 |
< |
<exclude name="java/util/concurrent/locks/LockSupport*"/> |
77 |
< |
<exclude name="java/util/concurrent/locks/ReentrantLock*"/> |
78 |
< |
</patternset> |
60 |
> |
<!-- Test classpath --> |
61 |
> |
<path id="test.classpath"> |
62 |
> |
<pathelement location="${build.testcases.dir}"/> |
63 |
> |
<pathelement location="${junit.jar}"/> |
64 |
> |
</path> |
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
<!-- Main targets --> |
69 |
|
|
70 |
+ |
|
71 |
|
<target name="compile" |
72 |
|
depends="init, configure-compiler, prepare-src" |
73 |
|
description="Compiles main sources to build folder"> |
74 |
|
|
88 |
– |
<property name="prepare.src.dir" value="${src.dir}"/> |
89 |
– |
|
75 |
|
<mkdir dir="${build.classes.dir}"/> |
76 |
|
|
92 |
– |
<!-- |
93 |
– |
<echo>javac ${gjc.args}</echo> |
94 |
– |
<echo>bootclasspath=${compile.bootclasspath}</echo> |
95 |
– |
--> |
96 |
– |
|
77 |
|
<javac srcdir="${prepare.src.dir}" |
78 |
|
destdir="${build.classes.dir}" |
79 |
|
debug="${build.debug}" |
82 |
|
source="${build.sourcelevel}" |
83 |
|
fork="true"> |
84 |
|
|
85 |
< |
<compilerarg line="${gjc.args}"/> |
106 |
< |
<!-- |
107 |
< |
<bootclasspath refid="compile.bootclasspath"/> |
108 |
< |
--> |
85 |
> |
<compilerarg line="${build.args}"/> |
86 |
|
|
87 |
|
</javac> |
88 |
|
|
89 |
|
</target> |
90 |
|
|
91 |
|
|
115 |
– |
<target name="jar" |
116 |
– |
depends="configure-emulation, init-jar, native-jar, emulation-jar" |
117 |
– |
description="Builds library jar from compiled sources"/> |
118 |
– |
|
92 |
|
|
93 |
< |
<target name="test" |
94 |
< |
depends="init, configure-tests, report-tests" |
95 |
< |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
123 |
< |
|
124 |
< |
|
125 |
< |
<target name="checkstyle" |
126 |
< |
depends="filter-src" |
127 |
< |
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
93 |
> |
<target name="jar" |
94 |
> |
depends="compile" |
95 |
> |
description="Builds library jar from compiled sources"> |
96 |
|
|
97 |
< |
<taskdef resource="checkstyletask.properties" |
130 |
< |
classpath="${lib.dir}/checkstyle-all-2.4.jar"/> |
97 |
> |
<mkdir dir="${build.lib.dir}"/> |
98 |
|
|
99 |
< |
<checkstyle> |
100 |
< |
<formatter type="plain"/> <!-- also available: type="xml" --> |
101 |
< |
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
135 |
< |
</checkstyle> |
99 |
> |
<jar destfile="${product.jar}"> |
100 |
> |
<fileset dir="${build.classes.dir}"/> |
101 |
> |
</jar> |
102 |
|
|
103 |
|
</target> |
104 |
|
|
105 |
|
|
140 |
– |
<target name="doccheck" |
141 |
– |
depends="filter-doccheck" |
142 |
– |
description="Reports on javadoc style errors"> |
143 |
– |
|
144 |
– |
<delete dir="${build.doccheck.dir}"/> |
145 |
– |
<mkdir dir="${build.doccheck.dir}"/> |
106 |
|
|
107 |
< |
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
108 |
< |
docletpath="${lib.dir}/doccheck.jar" |
109 |
< |
destdir="${build.doccheck.dir}"> |
150 |
< |
<packageset dir="${build.filter.doccheck.dir}"/> |
151 |
< |
</javadoc> |
152 |
< |
|
153 |
< |
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
107 |
> |
<target name="test" |
108 |
> |
depends="init, configure-tests, report-tests" |
109 |
> |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
110 |
|
|
155 |
– |
</target> |
111 |
|
|
112 |
|
|
113 |
|
<target name="docs" |
159 |
– |
depends="filter-src" |
114 |
|
description="Builds javadocs with custom tags to build folder"> |
115 |
|
|
116 |
|
<delete dir="${build.javadocs.dir}"/> |
119 |
|
<javadoc destdir="${build.javadocs.dir}" |
120 |
|
link="http://java.sun.com/j2se/1.4.1/docs/api" |
121 |
|
overview="${src.dir}/intro.html" |
122 |
< |
source="${build.docsourcelevel}"> |
122 |
> |
source="${build.sourcelevel}"> |
123 |
|
|
124 |
|
<tag name="revised" description="Last revised:"/> |
125 |
|
<tag name="spec" description="Specified by:"/> |
172 |
– |
<tag name="editor" description="Last edited by:"/> |
173 |
– |
<tag name="fixme" description="FIX ME:"/> |
126 |
|
|
127 |
< |
<packageset dir="${build.filter.src.dir}"/> |
127 |
> |
<packageset dir="${src.dir}"/> |
128 |
|
|
129 |
|
</javadoc> |
130 |
|
|
131 |
|
</target> |
132 |
|
|
133 |
|
|
182 |
– |
<target name="sinjdocs" |
183 |
– |
depends="configure-tests" |
184 |
– |
description="Builds javadocs with custom tags to build folder"> |
185 |
– |
|
186 |
– |
<delete dir="${build.sinjdocs.dir}"/> |
187 |
– |
<mkdir dir="${build.sinjdocs.dir}"/> |
134 |
|
|
135 |
< |
<java classname="net.cscott.sinjdoc.Main" fork="true"> |
135 |
> |
<target name="checkstyle" |
136 |
> |
depends="filter-src" |
137 |
> |
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
138 |
|
|
139 |
< |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
139 |
> |
<taskdef resource="checkstyletask.properties" |
140 |
> |
classpath="${lib.dir}/checkstyle-all-3.1.jar"/> |
141 |
|
|
142 |
< |
<classpath> |
143 |
< |
<pathelement location="${sinjdoc.jar}"/> |
144 |
< |
<pathelement location="${lib.dir}/jutil.jar"/> |
145 |
< |
<pathelement location="${lib.dir}/cup.jar"/> |
146 |
< |
<path refid="test.classpath"/> |
147 |
< |
</classpath> |
148 |
< |
|
149 |
< |
|
150 |
< |
<arg value="-d"/> <arg value="${build.sinjdocs.dir}"/> |
151 |
< |
<arg value="-sourcepath"/> <arg value="${src.dir}"/> |
152 |
< |
<arg value="-overview"/> <arg value="${src.dir}/intro.html"/> |
204 |
< |
<arg value="-source"/> <arg value="${build.sourcelevel}"/> |
205 |
< |
<!-- <arg value="-verbose"/> --> |
206 |
< |
<!-- <arg value="-link"/> <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> --> |
207 |
< |
<arg value="java.lang"/> |
208 |
< |
<arg value="java.util"/> |
209 |
< |
<arg value="java.util.concurrent"/> |
210 |
< |
<arg value="java.util.concurrent.atomic"/> |
211 |
< |
<arg value="java.util.concurrent.locks"/> |
142 |
> |
<mkdir dir="${build.checkstyle.dir}"/> |
143 |
> |
|
144 |
> |
<checkstyle config="etc/checkstyle/sun_checks.xml" |
145 |
> |
failOnViolation="false"> |
146 |
> |
<formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/> |
147 |
> |
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
148 |
> |
</checkstyle> |
149 |
> |
|
150 |
> |
<style in="${build.checkstyle.dir}/checkstyle-report.xml" |
151 |
> |
out="${build.checkstyle.dir}/checkstyle-report.html" |
152 |
> |
style="${stylesheet.dir}/checkstyle-frames.xsl"/> |
153 |
|
|
154 |
< |
<!-- |
214 |
< |
<arg value="-help"/> |
215 |
< |
--> |
154 |
> |
</target> |
155 |
|
|
217 |
– |
</java> |
156 |
|
|
219 |
– |
</target> |
157 |
|
|
158 |
+ |
<target name="doccheck" |
159 |
+ |
depends="filter-doccheck" |
160 |
+ |
description="Reports on javadoc style errors"> |
161 |
|
|
162 |
< |
<target name="strip" |
163 |
< |
depends="init, configure-compiler" |
224 |
< |
description="Strip generics from java source (not working yet)"> |
225 |
< |
|
226 |
< |
<mkdir dir="${build.stripped.dir}"/> |
227 |
< |
|
228 |
< |
<!-- |
229 |
< |
# javac -s doesn't reliably generate compilable code. It generates |
230 |
< |
# bridge methods (marked as "synthetic") that can have identical |
231 |
< |
# signatures to existing methods except for the return value. |
232 |
< |
--> |
233 |
< |
<javac srcdir="${src.dir}" |
234 |
< |
destdir="${build.stripped.dir}" |
235 |
< |
debug="${build.debug}" |
236 |
< |
debuglevel="${build.debuglevel}" |
237 |
< |
deprecation="${build.deprecation}" |
238 |
< |
source="${build.sourcelevel}" |
239 |
< |
fork="true"> |
162 |
> |
<delete dir="${build.doccheck.dir}"/> |
163 |
> |
<mkdir dir="${build.doccheck.dir}"/> |
164 |
|
|
165 |
< |
<compilerarg line="${gjc.args} -s"/> |
166 |
< |
<!-- |
167 |
< |
<bootclasspath refid="compile.bootclasspath"/> |
168 |
< |
--> |
165 |
> |
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
166 |
> |
docletpath="${lib.dir}/doccheck.jar" |
167 |
> |
destdir="${build.doccheck.dir}"> |
168 |
> |
<packageset dir="${build.dc-filter.dir}"/> |
169 |
> |
</javadoc> |
170 |
|
|
171 |
< |
</javac> |
171 |
> |
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
172 |
|
|
173 |
|
</target> |
174 |
|
|
175 |
+ |
|
176 |
|
|
177 |
|
<target name="dist" |
178 |
|
depends="init, dist-clean, dist-jar, dist-docs" |
179 |
|
description="Puts all distributable products in single hierarchy"/> |
180 |
|
|
181 |
+ |
|
182 |
+ |
|
183 |
|
<target name="release" |
184 |
|
depends="dist" |
185 |
|
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
186 |
|
|
259 |
– |
<!-- |
260 |
– |
#keep build dir? - dl |
261 |
– |
<delete dir="${build.dir}"/> |
262 |
– |
--> |
187 |
|
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
188 |
|
|
189 |
|
<jar basedir="${basedir}" destfile="${release.jar}"> |
190 |
+ |
<!-- <exclude name="build/**"/> --> |
191 |
|
<exclude name="${release.jar}"/> |
192 |
|
<exclude name="user.properties"/> |
193 |
|
<exclude name="etc/notes/**"/> |
194 |
< |
<exclude name="lib/gjc/2.1/**"/> |
194 |
> |
<exclude name="src/emulation/**"/> |
195 |
|
<exclude name="**/SyntaxTest.java"/> |
196 |
+ |
<exclude name="**/SuperfluousAbstract.java"/> |
197 |
|
</jar> |
198 |
|
|
199 |
|
</target> |
200 |
|
|
201 |
+ |
|
202 |
+ |
|
203 |
|
<target name="clean" |
204 |
|
description="Removes all build products"> |
205 |
|
|
210 |
|
</target> |
211 |
|
|
212 |
|
|
213 |
+ |
|
214 |
|
<target name="dist-clean" |
215 |
|
description="Removes all build and distribution products"> |
216 |
|
|
219 |
|
</target> |
220 |
|
|
221 |
|
|
222 |
+ |
|
223 |
|
<target name="dist-docs" |
294 |
– |
depends="filter-src" |
224 |
|
description="Builds javadocs without custom tags to dist folder"> |
225 |
|
|
226 |
|
<delete dir="${dist.javadocs.dir}"/> |
227 |
|
<mkdir dir="${dist.javadocs.dir}"/> |
228 |
|
|
229 |
|
<javadoc destdir="${dist.javadocs.dir}" |
230 |
< |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
230 |
> |
link="http://java.sun.com/j2se/1.4.2/docs/api" |
231 |
|
overview="${src.dir}/intro.html" |
232 |
< |
source="${build.docsourcelevel}"> |
232 |
> |
source="${build.sourcelevel}"> |
233 |
|
|
234 |
< |
<packageset dir="${build.filter.src.dir}"/> |
234 |
> |
<packageset dir="${src.dir}"/> |
235 |
|
|
236 |
|
</javadoc> |
237 |
|
|
252 |
|
</target> |
253 |
|
|
254 |
|
|
326 |
– |
<target name="init-jar"> |
327 |
– |
|
328 |
– |
<mkdir dir="${build.lib.dir}"/> |
329 |
– |
|
330 |
– |
</target> |
331 |
– |
|
332 |
– |
|
333 |
– |
<target name="native-jar" |
334 |
– |
depends="compile" |
335 |
– |
unless="build.emulation.true"> |
336 |
– |
|
337 |
– |
<jar destfile="${product.jar}"> |
338 |
– |
<fileset dir="${build.classes.dir}"/> |
339 |
– |
</jar> |
340 |
– |
|
341 |
– |
</target> |
342 |
– |
|
343 |
– |
|
344 |
– |
<target name="compile-emulation" |
345 |
– |
depends="init, configure-compiler" |
346 |
– |
if="build.emulation.true"> |
347 |
– |
|
348 |
– |
<mkdir dir="${build.emulation.dir}"/> |
349 |
– |
|
350 |
– |
<javac srcdir="${emulation.src.dir}" |
351 |
– |
destdir="${build.emulation.dir}" |
352 |
– |
debug="${build.debug}" |
353 |
– |
debuglevel="${build.debuglevel}" |
354 |
– |
deprecation="${build.deprecation}" |
355 |
– |
source="${build.sourcelevel}" |
356 |
– |
fork="true"> |
357 |
– |
|
358 |
– |
<compilerarg line="${gjc.args}"/> |
359 |
– |
<!-- |
360 |
– |
<bootclasspath refid="compile.bootclasspath"/> |
361 |
– |
--> |
362 |
– |
|
363 |
– |
</javac> |
364 |
– |
|
365 |
– |
</target> |
366 |
– |
|
367 |
– |
|
368 |
– |
<target name="emulation-jar" |
369 |
– |
depends="compile-emulation" |
370 |
– |
if="build.emulation.true"> |
371 |
– |
|
372 |
– |
|
373 |
– |
<jar destfile="${product.jar}" duplicate="add"> |
374 |
– |
<fileset dir="${build.classes.dir}"> |
375 |
– |
<patternset refid="atomic.exclusion"/> |
376 |
– |
<patternset refid="unsafe.exclusion"/> |
377 |
– |
</fileset> |
378 |
– |
<fileset dir="${build.emulation.dir}"/> |
379 |
– |
</jar> |
380 |
– |
|
381 |
– |
</target> |
382 |
– |
|
383 |
– |
|
255 |
|
<target name="dist-jar" |
256 |
|
depends="clean, jar"> |
257 |
|
|
287 |
|
<copy todir="${build.filter.src.dir}"> |
288 |
|
<fileset dir="${src.dir}"> |
289 |
|
<exclude name="**/*.html"/> |
290 |
< |
<patternset refid="unsafe.exclusion"/> |
290 |
> |
<!-- Files excluded from dist-docs --> |
291 |
> |
<exclude name="java/util/Random.*"/> |
292 |
> |
<exclude name="sun/misc/Unsafe.*"/> |
293 |
|
</fileset> |
294 |
+ |
<!-- |
295 |
|
<filterchain> |
296 |
+ |
--> |
297 |
|
|
298 |
|
<!-- |
299 |
|
# This filter gets rid of angle-bracketed type parameters |
307 |
|
# tweaking.) |
308 |
|
--> |
309 |
|
|
310 |
+ |
<!-- |
311 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
312 |
|
classpath="${build.ant.dir}"> |
313 |
|
<param name="notmatching" value="^\s+\*\s.*$"/> |
314 |
|
<param name="pattern" value="<[^|>()]+?>+"/> |
315 |
|
<param name="replacement" value=" "/> |
316 |
|
</filterreader> |
317 |
+ |
--> |
318 |
|
|
319 |
< |
|
443 |
< |
<!-- |
444 |
< |
# This filter uncomments lines beginning with "//@" so that |
445 |
< |
# javadoc can see imports that are needed to resolve links |
446 |
< |
# but that shouldn't be in the compiled code. |
447 |
< |
--> |
448 |
< |
|
449 |
< |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
450 |
< |
classpath="${build.ant.dir}"> |
451 |
< |
<param name="matching" value="^//@.*$"/> |
452 |
< |
<param name="pattern" value="^//@"/> |
453 |
< |
<param name="replacement" value=""/> |
454 |
< |
</filterreader> |
319 |
> |
<!-- |
320 |
|
</filterchain> |
321 |
+ |
--> |
322 |
|
</copy> |
323 |
|
|
324 |
|
</target> |
325 |
|
|
326 |
|
|
461 |
– |
|
462 |
– |
|
327 |
|
<target name="filter-doccheck" |
328 |
|
depends="filter-src"> |
329 |
|
|
330 |
< |
<mkdir dir="${build.filter.doccheck.dir}"/> |
330 |
> |
<mkdir dir="${build.dc-filter.dir}"/> |
331 |
|
|
332 |
< |
<copy todir="${build.filter.doccheck.dir}"> |
332 |
> |
<copy todir="${build.dc-filter.dir}"> |
333 |
|
<fileset dir="${build.filter.src.dir}"> |
334 |
|
<include name="**/*.html"/> |
335 |
|
</fileset> |
339 |
|
value="/** Fake type parameter. */ public interface E {} /** Fake type parameter. */ public interface T {} /** Fake type parameter. */ public interface K {} /** Fake type parameter. */ public interface V {}" |
340 |
|
/> |
341 |
|
|
342 |
< |
<copy todir="${build.filter.doccheck.dir}"> |
342 |
> |
<copy todir="${build.dc-filter.dir}"> |
343 |
|
<fileset dir="${build.filter.src.dir}"> |
344 |
|
<exclude name="**/*.html"/> |
345 |
|
</fileset> |
377 |
|
|
378 |
|
<mkdir dir="${build.testcases.dir}"/> |
379 |
|
|
380 |
< |
<!-- |
517 |
< |
<echo>javac ${gjc.args}</echo> |
518 |
< |
<echo>bootclasspath=${test.compile.bootclasspath}</echo> |
519 |
< |
<echo>classpath="${test.classpath}"</echo> |
520 |
< |
--> |
521 |
< |
|
522 |
< |
<javac srcdir="${test.src.dir}" |
380 |
> |
<javac srcdir="${test.src.dir}/tck" |
381 |
|
destdir="${build.testcases.dir}" |
382 |
|
debug="${build.debug}" |
383 |
|
debuglevel="${build.debuglevel}" |
385 |
|
source="${build.sourcelevel}" |
386 |
|
fork="true"> |
387 |
|
|
388 |
< |
<compilerarg line="${gjc.args}"/> |
389 |
< |
<!-- |
532 |
< |
<bootclasspath refid="test.compile.bootclasspath"/> |
533 |
< |
--> |
534 |
< |
<classpath refid="test.classpath"/> |
388 |
> |
<compilerarg value="${bootclasspath.args}"/> |
389 |
> |
<compilerarg line="${build.args}"/> |
390 |
|
|
391 |
< |
<include name="java/**"/> |
537 |
< |
<include name="jsr166/**"/> |
391 |
> |
<classpath refid="test.classpath"/> |
392 |
|
|
393 |
|
</javac> |
394 |
|
|
410 |
|
dir="${build.reports.dir}" |
411 |
|
fork="true"> |
412 |
|
|
413 |
< |
<jvmarg value="-Xbootclasspath:${test.run.bootclasspath}"/> |
413 |
> |
<jvmarg value="${bootclasspath.args}"/> |
414 |
> |
|
415 |
> |
<classpath refid="test.classpath"/> |
416 |
|
|
417 |
|
<formatter type="xml"/> |
418 |
|
|
419 |
|
<batchtest todir="${build.reports.dir}"> |
420 |
< |
<fileset dir="${test.src.dir}"> |
421 |
< |
<include name="java/**/${testcase}Test.java"/> |
566 |
< |
<include name="jsr166/**/${testcase}Test.java"/> |
420 |
> |
<fileset dir="${test.src.dir}/tck"> |
421 |
> |
<include name="${testcase}Test.java"/> |
422 |
|
</fileset> |
423 |
|
</batchtest> |
424 |
|
|
455 |
|
|
456 |
|
<target name="configure-compiler"> |
457 |
|
|
603 |
– |
<property name="gjc.version" |
604 |
– |
value="2.2"/> |
605 |
– |
|
606 |
– |
<condition property="novariance.arg" value="-novariance"> |
607 |
– |
<and> |
608 |
– |
<equals arg1="${gjc.version}" arg2="2.0"/> |
609 |
– |
<or> |
610 |
– |
<not><isset property="gjc.novariance"/></not> |
611 |
– |
<istrue value="${gjc.novariance}"/> |
612 |
– |
</or> |
613 |
– |
</and> |
614 |
– |
</condition> |
615 |
– |
|
616 |
– |
<property name="novariance.arg" |
617 |
– |
value=""/> |
618 |
– |
|
619 |
– |
<property name="gjc.dir" |
620 |
– |
value="${lib.dir}/gjc"/> |
621 |
– |
|
622 |
– |
<property name="javac.jar" |
623 |
– |
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
624 |
– |
|
625 |
– |
<property name="collect.jar" |
626 |
– |
location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/> |
627 |
– |
|
628 |
– |
<!-- |
629 |
– |
<property name="unchecked.option" value="-warnunchecked"/> |
630 |
– |
--> |
631 |
– |
|
458 |
|
<property name="unchecked.option" value="-Xlint:unchecked"/> |
459 |
|
|
460 |
|
<condition property="warnunchecked.arg" value="${unchecked.option}"> |
461 |
< |
<istrue value="${gjc.warnunchecked}"/> |
461 |
> |
<istrue value="${build.warnunchecked}"/> |
462 |
|
</condition> |
463 |
|
|
464 |
|
<property name="warnunchecked.arg" value=""/> |
466 |
|
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
467 |
|
<istrue value="${build.nothreads}"/> |
468 |
|
</condition> |
469 |
< |
|
470 |
< |
|
645 |
< |
<!-- |
646 |
< |
! Bootclasspath munging for source compilation. |
647 |
< |
--> |
648 |
< |
|
649 |
< |
<path id="pre.bootclasspath"> |
650 |
< |
<!-- |
651 |
< |
<pathelement location="${javac.jar}"/> |
652 |
< |
--> |
653 |
< |
</path> |
654 |
< |
|
655 |
< |
<path id="compile.bootclasspath"> |
656 |
< |
<pathelement location="${build.classes.dir}"/> |
657 |
< |
<!-- |
658 |
< |
<pathelement location="${collect.jar}"/> |
659 |
< |
--> |
660 |
< |
<pathelement location="${rt.jar}"/> |
661 |
< |
</path> |
662 |
< |
|
663 |
< |
<!-- Flatten paths into platform-appropriate strings --> |
664 |
< |
<property name="pre.bootclasspath" refid="pre.bootclasspath"/> |
665 |
< |
<property name="compile.bootclasspath" refid="compile.bootclasspath"/> |
469 |
> |
|
470 |
> |
<property name="prepare.src.dir" value="${src.dir}"/> |
471 |
|
|
472 |
|
|
473 |
|
<!-- Common options in javac invocations --> |
474 |
< |
<!-- |
670 |
< |
<property name="gjc.args" |
671 |
< |
value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}" |
672 |
< |
/> |
673 |
< |
--> |
674 |
< |
<property name="gjc.args" value="${warnunchecked.arg} ${novariance.arg}"/> |
474 |
> |
<property name="build.args" value="${warnunchecked.arg}"/> |
475 |
|
|
476 |
|
</target> |
477 |
|
|
490 |
|
</target> |
491 |
|
|
492 |
|
|
693 |
– |
<target name="configure-emulation"> |
694 |
– |
|
695 |
– |
<condition property="build.emulation.true"> |
696 |
– |
<or> |
697 |
– |
<and> |
698 |
– |
<os family="windows"/> |
699 |
– |
<not> |
700 |
– |
<isset property="build.emulation"/> |
701 |
– |
</not> |
702 |
– |
</and> |
703 |
– |
<istrue value="${build.emulation}"/> |
704 |
– |
</or> |
705 |
– |
</condition> |
706 |
– |
|
707 |
– |
</target> |
708 |
– |
|
709 |
– |
|
493 |
|
<target name="configure-tests" |
494 |
|
depends="configure-compiler"> |
495 |
|
|
497 |
|
<available property="junit.available" |
498 |
|
classname="junit.framework.Protectable"/> |
499 |
|
|
717 |
– |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
718 |
– |
unless="junit.available"/> |
719 |
– |
|
500 |
|
<!-- Xalan --> |
501 |
|
<available property="xalan.available" |
502 |
|
classname="org.apache.xalan.Version"/> |
503 |
|
|
504 |
+ |
|
505 |
+ |
<!-- Ant 1.6beta and later don't need or want this check --> |
506 |
+ |
<!-- |
507 |
+ |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
508 |
+ |
unless="junit.available"/> |
509 |
+ |
|
510 |
|
<fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests" |
511 |
|
unless="xalan.available"/> |
512 |
< |
|
727 |
< |
|
728 |
< |
<!-- |
729 |
< |
! Bootclasspath munging for testing, so JUnit can test our local |
730 |
< |
! modifications to java.*. |
731 |
< |
--> |
732 |
< |
|
733 |
< |
<path id="test.classpath"> |
734 |
< |
<pathelement location="${product.jar}"/> |
735 |
< |
<pathelement location="${rt.jar}"/> |
736 |
< |
<pathelement location="${build.testcases.dir}"/> |
737 |
< |
<pathelement location="${junit.jar}"/> |
738 |
< |
</path> |
739 |
< |
|
740 |
< |
<path id="test.compile.bootclasspath"> |
741 |
< |
<pathelement location="${javac.jar}"/> |
742 |
< |
<pathelement location="${collect.jar}"/> |
743 |
< |
<pathelement location="${rt.jar}"/> |
744 |
< |
</path> |
745 |
< |
|
746 |
< |
<path id="test.run.bootclasspath"> |
747 |
< |
<!-- |
748 |
< |
<pathelement location="${javac.jar}"/> |
749 |
< |
--> |
750 |
< |
<path refid="test.classpath"/> |
751 |
< |
</path> |
752 |
< |
|
753 |
< |
<!-- Flatten test classpaths into platform-appropriate strings --> |
754 |
< |
<property name="test.classpath" refid="test.classpath"/> |
755 |
< |
<property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/> |
756 |
< |
<property name="test.run.bootclasspath" refid="test.run.bootclasspath"/> |
512 |
> |
--> |
513 |
|
|
514 |
|
</target> |
515 |
|
|
518 |
|
<!-- Anthill targets --> |
519 |
|
|
520 |
|
<target name="anthill-build"> |
521 |
+ |
|
522 |
+ |
<!-- Override this in user.properties --> |
523 |
+ |
<property name="tiger.home" location="e:/j2sdk1.5.0"/> |
524 |
+ |
|
525 |
|
<exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java"> |
526 |
|
<arg value="-Xmx256000000"/> |
527 |
|
<!-- classpath of new JVM --> |
561 |
|
</target> |
562 |
|
|
563 |
|
|
804 |
– |
<target name="ng" depends="test"> |
805 |
– |
<java classname="SuperfluousAbstract" fork="true"> |
564 |
|
|
565 |
< |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
565 |
> |
<!-- Backward compatibility, work in progress --> |
566 |
> |
|
567 |
|
|
568 |
+ |
<target name="compat" depends="jar"> |
569 |
+ |
|
570 |
+ |
<mkdir dir="${build.testcases.dir}"/> |
571 |
+ |
|
572 |
+ |
<javac srcdir="${test.src.dir}" |
573 |
+ |
destdir="${build.testcases.dir}" |
574 |
+ |
debug="${build.debug}" |
575 |
+ |
debuglevel="${build.debuglevel}" |
576 |
+ |
deprecation="${build.deprecation}" |
577 |
+ |
source="${build.sourcelevel}" |
578 |
+ |
fork="true"> |
579 |
+ |
|
580 |
+ |
<compilerarg value="${bootclasspath.args}"/> |
581 |
+ |
<compilerarg line="${build.args}"/> |
582 |
+ |
|
583 |
+ |
<classpath refid="test.classpath"/> |
584 |
+ |
|
585 |
+ |
<include name="Compatibility.java"/> |
586 |
+ |
|
587 |
+ |
</javac> |
588 |
+ |
|
589 |
+ |
|
590 |
+ |
<java classname="Compatibility" fork="true"> |
591 |
+ |
<jvmarg value="${bootclasspath.args}"/> |
592 |
+ |
<classpath refid="test.classpath"/> |
593 |
|
</java> |
594 |
|
</target> |
595 |
|
|
596 |
|
|
597 |
+ |
|
598 |
+ |
<property name="pretiger.src.dir" location="${build.dir}/pretiger/src"/> |
599 |
+ |
<property name="build.pretiger.dir" location="${build.dir}/pretiger/classes"/> |
600 |
+ |
<property name="pretiger.jar" location="${build.lib.dir}/jsr166-pretiger.jar"/> |
601 |
+ |
<property name="pretiger.sourcelevel" value="1.4"/> |
602 |
+ |
|
603 |
+ |
<target name="defang" |
604 |
+ |
depends="init" |
605 |
+ |
description="Generates pre-Tiger compatible source"> |
606 |
+ |
|
607 |
+ |
<delete dir="${pretiger.src.dir}"/> |
608 |
+ |
<mkdir dir="${pretiger.src.dir}"/> |
609 |
+ |
|
610 |
+ |
<exec executable="perl"> |
611 |
+ |
<arg file="etc/defang.pl"/> |
612 |
+ |
<!-- <arg value="-v"/> --> |
613 |
+ |
<arg value="-s"/> <arg file="${src.dir}"/> |
614 |
+ |
<arg value="-t"/> <arg file="${pretiger.src.dir}"/> |
615 |
+ |
</exec> |
616 |
+ |
|
617 |
+ |
</target> |
618 |
+ |
|
619 |
+ |
<target name="compile-pretiger" |
620 |
+ |
depends="init, configure-compiler, defang" |
621 |
+ |
description="Compiles pre-Tiger sources to build folder"> |
622 |
+ |
|
623 |
+ |
<mkdir dir="${build.pretiger.dir}"/> |
624 |
+ |
|
625 |
+ |
<javac srcdir="${pretiger.src.dir}" |
626 |
+ |
destdir="${build.pretiger.dir}" |
627 |
+ |
debug="${build.debug}" |
628 |
+ |
debuglevel="${build.debuglevel}" |
629 |
+ |
deprecation="${build.deprecation}" |
630 |
+ |
source="${pretiger.sourcelevel}" |
631 |
+ |
fork="true"> |
632 |
+ |
|
633 |
+ |
<compilerarg line="${build.args}"/> |
634 |
+ |
<exclude name="**/Thread.java"/> |
635 |
+ |
|
636 |
+ |
</javac> |
637 |
+ |
|
638 |
+ |
</target> |
639 |
+ |
|
640 |
+ |
<target name="pretiger" depends="compile-pretiger"> |
641 |
+ |
|
642 |
+ |
<mkdir dir="${build.lib.dir}"/> |
643 |
+ |
|
644 |
+ |
<jar destfile="${pretiger.jar}"> |
645 |
+ |
<fileset dir="${build.pretiger.dir}"> |
646 |
+ |
</fileset> |
647 |
+ |
</jar> |
648 |
+ |
|
649 |
+ |
</target> |
650 |
+ |
|
651 |
|
</project> |