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"/> |
30 |
|
<property name="build.dir" location="build"/> |
31 |
|
<property name="build.classes.dir" location="${build.dir}/classes"/> |
32 |
|
<property name="build.testcases.dir" location="${build.dir}/testcases"/> |
33 |
+ |
<property name="build.j1.dir" location="${build.dir}/j1"/> |
34 |
+ |
<property name="build.loops.dir" location="${build.dir}/loops"/> |
35 |
|
<property name="build.lib.dir" location="${build.dir}/lib"/> |
36 |
|
<property name="build.ant.dir" location="${build.dir}/ant"/> |
37 |
|
<property name="build.javadocs.dir" location="${build.dir}/javadocs"/> |
37 |
– |
<property name="build.sinjdocs.dir" location="${build.dir}/sinjdocs"/> |
38 |
– |
<property name="build.stripped.dir" location="${build.dir}/stripped"/> |
38 |
|
<property name="build.reports.dir" location="${build.dir}/reports"/> |
39 |
+ |
<property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/> |
40 |
|
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
41 |
|
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
42 |
|
<property name="build.dc-filter.dir" location="${build.dir}/filterdocchk"/> |
43 |
< |
<property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/> |
43 |
> |
<property name="build.jsr166x.dir" location="${build.dir}/jsr166x"/> |
44 |
> |
<property name="build.jsr166xlib.dir" location="${build.dir}/jsr166xlib"/> |
45 |
> |
<property name="build.jsr166xjavadocs.dir" location="${build.dir}/jsr166xjavadocs"/> |
46 |
|
|
47 |
|
<!-- Source locations --> |
48 |
|
<property name="src.dir" location="${basedir}/src/main"/> |
49 |
|
<property name="test.src.dir" location="${basedir}/src/test"/> |
50 |
+ |
<property name="j1.src.dir" location="${basedir}/src/javaone"/> |
51 |
+ |
<property name="loops.src.dir" location="${basedir}/src/loops"/> |
52 |
+ |
<property name="tck.src.dir" location="${test.src.dir}/tck"/> |
53 |
+ |
<property name="jtreg.src.dir" location="${test.src.dir}/jtreg"/> |
54 |
|
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
55 |
|
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
56 |
|
<property name="lib.dir" location="${basedir}/lib"/> |
57 |
|
<property name="dist.dir" location="${basedir}/dist"/> |
58 |
+ |
<property name="topsrc.dir" location="${basedir}/src"/> |
59 |
+ |
<property name="jsr166xsrc.dir" location="${basedir}/src/jsr166x"/> |
60 |
|
|
61 |
|
<!-- Distribution locations --> |
62 |
|
<property name="dist.javadocs.dir" location="${dist.dir}/docs"/> |
63 |
+ |
<property name="dist.jsr166xjavadocs.dir" location="${dist.dir}/jsr166xdocs"/> |
64 |
|
|
65 |
|
<!-- Jar locations --> |
66 |
|
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
67 |
+ |
<property name="jsr166xproduct.jar" location="${build.jsr166xlib.dir}/jsr166x.jar"/> |
68 |
|
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
69 |
< |
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
60 |
< |
<property name="sinjdoc.jar" location="${lib.dir}/sinjdoc.jar"/> |
69 |
> |
<property name="concurrent.jar" location="${lib.dir}/concurrent.jar"/> |
70 |
|
|
71 |
+ |
<!-- Bootclasspath argument --> |
72 |
+ |
<property name="bootclasspath.args" value="-Xbootclasspath/p:${product.jar}"/> |
73 |
|
|
74 |
< |
<!-- Files excluded from dist-docs --> |
75 |
< |
<patternset id="docs.exclusion"> |
76 |
< |
<exclude name="java/util/Random.*"/> |
77 |
< |
<exclude name="sun/misc/Unsafe.*"/> |
78 |
< |
</patternset> |
79 |
< |
|
74 |
> |
<!-- Test classpath --> |
75 |
> |
<path id="test.classpath"> |
76 |
> |
<pathelement location="${build.testcases.dir}"/> |
77 |
> |
<pathelement location="${junit.jar}"/> |
78 |
> |
</path> |
79 |
> |
|
80 |
> |
<!-- ALoops classpath --> |
81 |
> |
<path id="loops.classpath"> |
82 |
> |
<pathelement location="${build.loops.dir}"/> |
83 |
> |
</path> |
84 |
> |
|
85 |
> |
<!-- J1 classpath --> |
86 |
> |
<path id="j1.classpath"> |
87 |
> |
<pathelement location="${build.classes.dir}"/> |
88 |
> |
<pathelement location="${build.j1.dir}"/> |
89 |
> |
<pathelement location="${junit.jar}"/> |
90 |
> |
|
91 |
> |
<!-- Include dl.u.c for BoundedBuffer comparison --> |
92 |
> |
<pathelement location="${concurrent.jar}"/> |
93 |
> |
</path> |
94 |
|
|
95 |
|
|
96 |
|
<!-- Main targets --> |
97 |
|
|
98 |
+ |
|
99 |
|
<target name="compile" |
100 |
< |
depends="init, configure-compiler, prepare-src" |
100 |
> |
depends="init, configure-compiler" |
101 |
|
description="Compiles main sources to build folder"> |
102 |
|
|
77 |
– |
<property name="prepare.src.dir" value="${src.dir}"/> |
78 |
– |
|
103 |
|
<mkdir dir="${build.classes.dir}"/> |
104 |
|
|
105 |
< |
<javac srcdir="${prepare.src.dir}" |
105 |
> |
<javac srcdir="${src.dir}" |
106 |
|
destdir="${build.classes.dir}" |
107 |
|
debug="${build.debug}" |
108 |
|
debuglevel="${build.debuglevel}" |
110 |
|
source="${build.sourcelevel}" |
111 |
|
fork="true"> |
112 |
|
|
113 |
+ |
<include name="**/*.java"/> |
114 |
+ |
<exclude name="java/lang/**"/> |
115 |
|
<compilerarg line="${build.args}"/> |
116 |
|
|
117 |
|
</javac> |
119 |
|
</target> |
120 |
|
|
121 |
|
|
122 |
+ |
|
123 |
|
<target name="jar" |
124 |
< |
depends="init-jar, native-jar" |
125 |
< |
description="Builds library jar from compiled sources"/> |
124 |
> |
depends="compile" |
125 |
> |
description="Builds library jar from compiled sources"> |
126 |
> |
|
127 |
> |
<mkdir dir="${build.lib.dir}"/> |
128 |
> |
|
129 |
> |
<jar destfile="${product.jar}"> |
130 |
> |
<fileset dir="${build.classes.dir}"/> |
131 |
> |
</jar> |
132 |
> |
|
133 |
> |
</target> |
134 |
> |
|
135 |
|
|
136 |
|
|
137 |
|
<target name="test" |
139 |
|
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
140 |
|
|
141 |
|
|
106 |
– |
<target name="checkstyle" |
107 |
– |
depends="filter-src" |
108 |
– |
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
142 |
|
|
143 |
< |
<taskdef resource="checkstyletask.properties" |
144 |
< |
classpath="${lib.dir}/checkstyle-all-3.1.jar"/> |
143 |
> |
<target name="docs" |
144 |
> |
description="Builds javadocs with custom tags to build folder"> |
145 |
|
|
146 |
< |
<mkdir dir="${build.checkstyle.dir}"/> |
147 |
< |
|
148 |
< |
<checkstyle config="etc/checkstyle/sun_checks.xml" |
149 |
< |
failOnViolation="false"> |
150 |
< |
<formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/> |
151 |
< |
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
152 |
< |
</checkstyle> |
153 |
< |
|
154 |
< |
<style in="${build.checkstyle.dir}/checkstyle-report.xml" |
155 |
< |
out="${build.checkstyle.dir}/checkstyle-report.html" |
156 |
< |
style="${stylesheet.dir}/checkstyle-frames.xsl"/> |
146 |
> |
<delete dir="${build.javadocs.dir}"/> |
147 |
> |
<mkdir dir="${build.javadocs.dir}"/> |
148 |
> |
|
149 |
> |
<javadoc destdir="${build.javadocs.dir}" |
150 |
> |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
151 |
> |
overview="${src.dir}/intro.html" |
152 |
> |
source="${build.sourcelevel}"> |
153 |
> |
|
154 |
> |
<tag name="revised" description="Last revised:"/> |
155 |
> |
<tag name="spec" description="Specified by:"/> |
156 |
> |
|
157 |
> |
<packageset dir="${src.dir}"/> |
158 |
> |
|
159 |
> |
</javadoc> |
160 |
|
|
161 |
|
</target> |
162 |
|
|
163 |
|
|
164 |
+ |
|
165 |
|
<target name="doccheck" |
166 |
|
depends="filter-doccheck" |
167 |
|
description="Reports on javadoc style errors"> |
180 |
|
</target> |
181 |
|
|
182 |
|
|
146 |
– |
<target name="docs" |
147 |
– |
depends="filter-src" |
148 |
– |
description="Builds javadocs with custom tags to build folder"> |
183 |
|
|
184 |
< |
<delete dir="${build.javadocs.dir}"/> |
185 |
< |
<mkdir dir="${build.javadocs.dir}"/> |
184 |
> |
<target name="checkstyle" |
185 |
> |
depends="filter-src" |
186 |
> |
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
187 |
|
|
188 |
< |
<javadoc destdir="${build.javadocs.dir}" |
189 |
< |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
155 |
< |
overview="${src.dir}/intro.html" |
156 |
< |
source="${build.docsourcelevel}"> |
188 |
> |
<taskdef resource="checkstyletask.properties" |
189 |
> |
classpath="${lib.dir}/checkstyle-all-3.1.jar"/> |
190 |
|
|
191 |
< |
<tag name="revised" description="Last revised:"/> |
159 |
< |
<tag name="spec" description="Specified by:"/> |
191 |
> |
<mkdir dir="${build.checkstyle.dir}"/> |
192 |
|
|
193 |
< |
<packageset dir="${build.filter.src.dir}"/> |
193 |
> |
<checkstyle config="etc/checkstyle/sun_checks.xml" |
194 |
> |
failOnViolation="false"> |
195 |
> |
<formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/> |
196 |
> |
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
197 |
> |
</checkstyle> |
198 |
|
|
199 |
< |
</javadoc> |
199 |
> |
<style in="${build.checkstyle.dir}/checkstyle-report.xml" |
200 |
> |
out="${build.checkstyle.dir}/checkstyle-report.html" |
201 |
> |
style="${stylesheet.dir}/checkstyle-frames.xsl"/> |
202 |
|
|
203 |
|
</target> |
204 |
|
|
205 |
|
|
168 |
– |
<target name="sinjdocs" |
169 |
– |
depends="configure-tests" |
170 |
– |
description="Builds javadocs with custom tags to build folder"> |
171 |
– |
|
172 |
– |
<delete dir="${build.sinjdocs.dir}"/> |
173 |
– |
<mkdir dir="${build.sinjdocs.dir}"/> |
174 |
– |
|
175 |
– |
<java classname="net.cscott.sinjdoc.Main" fork="true"> |
176 |
– |
|
177 |
– |
<jvmarg value="-Xbootclasspath/p:${test.bootclasspath}"/> |
178 |
– |
|
179 |
– |
<classpath> |
180 |
– |
<pathelement location="${sinjdoc.jar}"/> |
181 |
– |
<pathelement location="${lib.dir}/jutil.jar"/> |
182 |
– |
<pathelement location="${lib.dir}/cup.jar"/> |
183 |
– |
<path refid="test.classpath"/> |
184 |
– |
</classpath> |
185 |
– |
|
186 |
– |
<!-- <arg value="-help"/> --> |
187 |
– |
<!-- <arg value="-verbose"/> --> |
188 |
– |
<!-- <arg value="-link"/> <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> --> |
189 |
– |
|
190 |
– |
<arg value="-d"/> <arg value="${build.sinjdocs.dir}"/> |
191 |
– |
<arg value="-sourcepath"/> <arg value="${src.dir}"/> |
192 |
– |
<arg value="-overview"/> <arg value="${src.dir}/intro.html"/> |
193 |
– |
<arg value="-source"/> <arg value="${build.sourcelevel}"/> |
194 |
– |
|
195 |
– |
<arg value="java.lang"/> |
196 |
– |
<arg value="java.util"/> |
197 |
– |
<arg value="java.util.concurrent"/> |
198 |
– |
<arg value="java.util.concurrent.atomic"/> |
199 |
– |
<arg value="java.util.concurrent.locks"/> |
200 |
– |
|
201 |
– |
|
202 |
– |
</java> |
203 |
– |
|
204 |
– |
</target> |
205 |
– |
|
206 |
|
|
207 |
|
<target name="dist" |
208 |
|
depends="init, dist-clean, dist-jar, dist-docs" |
209 |
|
description="Puts all distributable products in single hierarchy"/> |
210 |
|
|
211 |
|
|
212 |
+ |
|
213 |
|
<target name="release" |
214 |
|
depends="dist" |
215 |
|
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
228 |
|
|
229 |
|
</target> |
230 |
|
|
231 |
+ |
|
232 |
+ |
|
233 |
|
<target name="clean" |
234 |
|
description="Removes all build products"> |
235 |
|
|
240 |
|
</target> |
241 |
|
|
242 |
|
|
243 |
+ |
|
244 |
|
<target name="dist-clean" |
245 |
|
description="Removes all build and distribution products"> |
246 |
|
|
249 |
|
</target> |
250 |
|
|
251 |
|
|
252 |
+ |
|
253 |
|
<target name="dist-docs" |
249 |
– |
depends="filter-src" |
254 |
|
description="Builds javadocs without custom tags to dist folder"> |
255 |
|
|
256 |
|
<delete dir="${dist.javadocs.dir}"/> |
257 |
|
<mkdir dir="${dist.javadocs.dir}"/> |
258 |
|
|
259 |
|
<javadoc destdir="${dist.javadocs.dir}" |
260 |
< |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
260 |
> |
link="http://java.sun.com/j2se/1.4.2/docs/api" |
261 |
|
overview="${src.dir}/intro.html" |
262 |
< |
source="${build.docsourcelevel}"> |
262 |
> |
source="${build.sourcelevel}"> |
263 |
|
|
264 |
< |
<packageset dir="${build.filter.src.dir}"/> |
264 |
> |
<packageset dir="${src.dir}"/> |
265 |
|
|
266 |
|
</javadoc> |
267 |
|
|
282 |
|
</target> |
283 |
|
|
284 |
|
|
281 |
– |
<target name="init-jar"> |
282 |
– |
|
283 |
– |
<mkdir dir="${build.lib.dir}"/> |
284 |
– |
|
285 |
– |
</target> |
286 |
– |
|
287 |
– |
|
288 |
– |
<target name="native-jar" |
289 |
– |
depends="compile"> |
290 |
– |
|
291 |
– |
<jar destfile="${product.jar}"> |
292 |
– |
<fileset dir="${build.classes.dir}"/> |
293 |
– |
</jar> |
294 |
– |
|
295 |
– |
</target> |
296 |
– |
|
297 |
– |
|
285 |
|
<target name="dist-jar" |
286 |
|
depends="clean, jar"> |
287 |
|
|
297 |
|
|
298 |
|
<javac srcdir="${ant.src.dir}" |
299 |
|
destdir="${build.ant.dir}" |
300 |
< |
source="1.4" |
314 |
< |
/> |
300 |
> |
source="1.4"/> |
301 |
|
|
302 |
|
</target> |
303 |
|
|
316 |
|
<copy todir="${build.filter.src.dir}"> |
317 |
|
<fileset dir="${src.dir}"> |
318 |
|
<exclude name="**/*.html"/> |
319 |
< |
<patternset refid="docs.exclusion"/> |
319 |
> |
<!-- Files excluded from dist-docs --> |
320 |
> |
<exclude name="java/util/Random.*"/> |
321 |
> |
<exclude name="sun/misc/Unsafe.*"/> |
322 |
|
</fileset> |
323 |
+ |
<!-- |
324 |
|
<filterchain> |
325 |
+ |
--> |
326 |
|
|
327 |
|
<!-- |
328 |
|
# This filter gets rid of angle-bracketed type parameters |
336 |
|
# tweaking.) |
337 |
|
--> |
338 |
|
|
339 |
+ |
<!-- |
340 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
341 |
|
classpath="${build.ant.dir}"> |
342 |
|
<param name="notmatching" value="^\s+\*\s.*$"/> |
343 |
|
<param name="pattern" value="<[^|>()]+?>+"/> |
344 |
|
<param name="replacement" value=" "/> |
345 |
|
</filterreader> |
346 |
+ |
--> |
347 |
|
|
348 |
+ |
<!-- |
349 |
|
</filterchain> |
350 |
+ |
--> |
351 |
|
</copy> |
352 |
|
|
353 |
|
</target> |
406 |
|
|
407 |
|
<mkdir dir="${build.testcases.dir}"/> |
408 |
|
|
409 |
+ |
<javac srcdir="${tck.src.dir}" |
410 |
+ |
destdir="${build.testcases.dir}" |
411 |
+ |
debug="${build.debug}" |
412 |
+ |
debuglevel="${build.debuglevel}" |
413 |
+ |
deprecation="${build.deprecation}" |
414 |
+ |
source="${build.sourcelevel}" |
415 |
+ |
fork="true"> |
416 |
+ |
|
417 |
+ |
<compilerarg value="${bootclasspath.args}"/> |
418 |
+ |
<compilerarg line="${build.args}"/> |
419 |
+ |
|
420 |
+ |
<classpath refid="test.classpath"/> |
421 |
+ |
|
422 |
+ |
</javac> |
423 |
+ |
|
424 |
|
<javac srcdir="${test.src.dir}" |
425 |
|
destdir="${build.testcases.dir}" |
426 |
|
debug="${build.debug}" |
429 |
|
source="${build.sourcelevel}" |
430 |
|
fork="true"> |
431 |
|
|
432 |
+ |
<include name="jsr166/test/**"/> |
433 |
+ |
|
434 |
+ |
<compilerarg value="${bootclasspath.args}"/> |
435 |
|
<compilerarg line="${build.args}"/> |
436 |
+ |
|
437 |
|
<classpath refid="test.classpath"/> |
425 |
– |
|
426 |
– |
<include name="java/**"/> |
427 |
– |
<include name="jsr166/**"/> |
438 |
|
|
439 |
|
</javac> |
440 |
|
|
441 |
+ |
<!-- |
442 |
+ |
<javac srcdir="${jtreg.src.dir}" |
443 |
+ |
destdir="${build.testcases.dir}" |
444 |
+ |
debug="${build.debug}" |
445 |
+ |
debuglevel="${build.debuglevel}" |
446 |
+ |
deprecation="${build.deprecation}" |
447 |
+ |
source="${build.sourcelevel}" |
448 |
+ |
fork="true"> |
449 |
+ |
|
450 |
+ |
<compilerarg value="${bootclasspath.args}"/> |
451 |
+ |
<compilerarg line="${build.args}"/> |
452 |
+ |
|
453 |
+ |
<classpath refid="test.classpath"/> |
454 |
+ |
|
455 |
+ |
</javac> |
456 |
+ |
--> |
457 |
+ |
|
458 |
|
</target> |
459 |
|
|
460 |
|
|
473 |
|
dir="${build.reports.dir}" |
474 |
|
fork="true"> |
475 |
|
|
476 |
< |
<jvmarg value="-Xbootclasspath:${test.bootclasspath}"/> |
476 |
> |
<jvmarg value="${bootclasspath.args}"/> |
477 |
> |
<jvmarg value="-server"/> |
478 |
> |
<jvmarg value="-showversion"/> |
479 |
> |
|
480 |
> |
<classpath refid="test.classpath"/> |
481 |
|
|
482 |
|
<formatter type="xml"/> |
483 |
|
|
484 |
< |
<batchtest todir="${build.reports.dir}"> |
484 |
> |
<batchtest todir="${build.reports.dir}" unless="no.test.tck"> |
485 |
> |
<fileset dir="${tck.src.dir}"> |
486 |
> |
<include name="**/${testcase}Test.java"/> |
487 |
> |
</fileset> |
488 |
> |
</batchtest> |
489 |
> |
|
490 |
> |
<batchtest todir="${build.reports.dir}" if="do.test.old"> |
491 |
|
<fileset dir="${test.src.dir}"> |
492 |
< |
<include name="java/**/${testcase}Test.java"/> |
456 |
< |
<include name="jsr166/**/${testcase}Test.java"/> |
492 |
> |
<include name="jsr166/test/**/${testcase}Test.java"/> |
493 |
|
</fileset> |
494 |
|
</batchtest> |
495 |
|
|
496 |
+ |
<!-- |
497 |
+ |
<batchtest todir="${build.reports.dir}" if="do.test.jtreg"> |
498 |
+ |
<fileset dir="${jtreg.src.dir}"> |
499 |
+ |
<include name="**/${testcase}Test.java"/> |
500 |
+ |
</fileset> |
501 |
+ |
</batchtest> |
502 |
+ |
--> |
503 |
+ |
|
504 |
|
</junit> |
505 |
|
|
506 |
|
</target> |
541 |
|
</condition> |
542 |
|
|
543 |
|
<property name="warnunchecked.arg" value=""/> |
500 |
– |
|
501 |
– |
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
502 |
– |
<istrue value="${build.nothreads}"/> |
503 |
– |
</condition> |
544 |
|
|
545 |
|
|
546 |
|
<!-- Common options in javac invocations --> |
549 |
|
</target> |
550 |
|
|
551 |
|
|
512 |
– |
<target name="prepare-src" |
513 |
– |
depends="configure-compiler" |
514 |
– |
if="prepare.src.dir"> |
515 |
– |
|
516 |
– |
<mkdir dir="${prepare.src.dir}"/> |
517 |
– |
<copy todir="${prepare.src.dir}"> |
518 |
– |
<fileset dir="${src.dir}"> |
519 |
– |
<exclude name="java/lang/**"/> |
520 |
– |
</fileset> |
521 |
– |
</copy> |
522 |
– |
|
523 |
– |
</target> |
524 |
– |
|
525 |
– |
|
552 |
|
<target name="configure-tests" |
553 |
|
depends="configure-compiler"> |
554 |
|
|
556 |
|
<available property="junit.available" |
557 |
|
classname="junit.framework.Protectable"/> |
558 |
|
|
533 |
– |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
534 |
– |
unless="junit.available"/> |
535 |
– |
|
559 |
|
<!-- Xalan --> |
560 |
|
<available property="xalan.available" |
561 |
|
classname="org.apache.xalan.Version"/> |
562 |
|
|
540 |
– |
<fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests" |
541 |
– |
unless="xalan.available"/> |
542 |
– |
|
563 |
|
|
564 |
+ |
<!-- Ant 1.6beta and later don't need or want this check --> |
565 |
|
<!-- |
566 |
< |
! Bootclasspath munging for testing, so JUnit can test our local |
567 |
< |
! modifications to java.*. |
547 |
< |
--> |
548 |
< |
|
549 |
< |
<path id="test.classpath"> |
550 |
< |
<pathelement location="${product.jar}"/> |
551 |
< |
<pathelement location="${rt.jar}"/> |
552 |
< |
<pathelement location="${junit.jar}"/> |
553 |
< |
<pathelement location="${build.testcases.dir}"/> |
554 |
< |
</path> |
555 |
< |
|
556 |
< |
<path id="test.bootclasspath"> |
557 |
< |
<path refid="test.classpath"/> |
558 |
< |
</path> |
566 |
> |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
567 |
> |
unless="junit.available"/> |
568 |
|
|
569 |
< |
<!-- Flatten test classpaths into platform-appropriate strings --> |
570 |
< |
<property name="test.classpath" refid="test.classpath"/> |
571 |
< |
<property name="test.bootclasspath" refid="test.bootclasspath"/> |
569 |
> |
<fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests" |
570 |
> |
unless="xalan.available"/> |
571 |
> |
--> |
572 |
|
|
573 |
|
</target> |
574 |
|
|
577 |
|
<!-- Anthill targets --> |
578 |
|
|
579 |
|
<target name="anthill-build"> |
580 |
< |
|
580 |
> |
|
581 |
|
<!-- Override this in user.properties --> |
582 |
|
<property name="tiger.home" location="e:/j2sdk1.5.0"/> |
583 |
< |
|
583 |
> |
|
584 |
|
<exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java"> |
585 |
|
<arg value="-Xmx256000000"/> |
586 |
|
<!-- classpath of new JVM --> |
596 |
|
<arg value="do-anthill-build"/> |
597 |
|
</exec> |
598 |
|
</target> |
599 |
< |
|
599 |
> |
|
600 |
|
<target name="do-anthill-build" |
601 |
|
depends="jar, test, docs, dist-docs"/> |
602 |
|
|
620 |
|
</target> |
621 |
|
|
622 |
|
|
614 |
– |
<target name="ng" depends="test"> |
615 |
– |
<java classname="SuperfluousAbstract" fork="true"> |
623 |
|
|
624 |
< |
<jvmarg value="-Xbootclasspath/p:${test.bootclasspath}"/> |
624 |
> |
<!-- Various demos and test programs --> |
625 |
> |
|
626 |
> |
|
627 |
> |
<target name="sample" depends="init, configure-compiler" |
628 |
> |
description="Standalone demo program"> |
629 |
> |
|
630 |
> |
<mkdir dir="${build.testcases.dir}"/> |
631 |
> |
|
632 |
> |
<javac srcdir="${test.src.dir}" |
633 |
> |
destdir="${build.testcases.dir}" |
634 |
> |
debug="${build.debug}" |
635 |
> |
debuglevel="${build.debuglevel}" |
636 |
> |
deprecation="${build.deprecation}" |
637 |
> |
source="${build.sourcelevel}" |
638 |
> |
fork="true"> |
639 |
> |
|
640 |
> |
<include name="jsr166/test/Sample.java"/> |
641 |
> |
|
642 |
> |
</javac> |
643 |
> |
|
644 |
> |
<copy todir="${build.testcases.dir}"> |
645 |
> |
<fileset dir="${test.src.dir}"> |
646 |
> |
<include name="**/*.properties"/> |
647 |
> |
</fileset> |
648 |
> |
</copy> |
649 |
> |
|
650 |
> |
|
651 |
> |
<java classname="jsr166.test.Sample" fork="true"> |
652 |
> |
<classpath refid="test.classpath"/> |
653 |
> |
<!-- <jvmarg value="-ea"/> --> |
654 |
> |
<!-- <jvmarg value="-server"/> --> |
655 |
> |
<!-- <arg value="1000"/> --> |
656 |
> |
</java> |
657 |
> |
</target> |
658 |
> |
|
659 |
> |
|
660 |
> |
<target name="loops" depends="init, configure-compiler" |
661 |
> |
description="Benchmark from Doug Lea's AQS paper"> |
662 |
> |
|
663 |
> |
<mkdir dir="${build.loops.dir}"/> |
664 |
> |
|
665 |
> |
<javac srcdir="${loops.src.dir}" |
666 |
> |
destdir="${build.loops.dir}" |
667 |
> |
debug="${build.debug}" |
668 |
> |
debuglevel="${build.debuglevel}" |
669 |
> |
deprecation="${build.deprecation}" |
670 |
> |
source="${build.sourcelevel}" |
671 |
> |
fork="true"> |
672 |
> |
|
673 |
> |
<compilerarg line="${build.args}"/> |
674 |
> |
<classpath refid="loops.classpath"/> |
675 |
> |
|
676 |
> |
</javac> |
677 |
> |
|
678 |
> |
<java classname="ALoops" fork="true"> |
679 |
> |
<classpath refid="loops.classpath"/> |
680 |
> |
</java> |
681 |
> |
|
682 |
> |
</target> |
683 |
> |
|
684 |
> |
|
685 |
> |
<target name="compile-j1" depends="init, configure-compiler, compile"> |
686 |
> |
|
687 |
> |
<mkdir dir="${build.j1.dir}"/> |
688 |
> |
|
689 |
> |
<javac srcdir="${j1.src.dir}" |
690 |
> |
destdir="${build.j1.dir}" |
691 |
> |
debug="${build.debug}" |
692 |
> |
debuglevel="${build.debuglevel}" |
693 |
> |
deprecation="${build.deprecation}" |
694 |
> |
source="${build.sourcelevel}" > |
695 |
> |
|
696 |
> |
<include name="**/*.java"/> |
697 |
> |
<exclude name="**/dijkstra/**"/> |
698 |
> |
|
699 |
> |
<compilerarg line="${build.args}"/> |
700 |
> |
<classpath refid="j1.classpath"/> |
701 |
> |
|
702 |
> |
</javac> |
703 |
> |
|
704 |
> |
</target> |
705 |
> |
|
706 |
> |
|
707 |
> |
<target name="sw" depends="compile-j1" |
708 |
> |
description="Runs the SwingWorker demo"> |
709 |
> |
|
710 |
> |
<!-- |
711 |
> |
<java classname="jsr166.swing.SwingWorkerDemo" fork="true"> |
712 |
> |
<classpath refid="j1.classpath"/> |
713 |
> |
</java> |
714 |
> |
--> |
715 |
> |
|
716 |
> |
<copy todir="${build.j1.dir}" file="${j1.src.dir}/jsr166/swing/SwingWorker.html"/> |
717 |
> |
|
718 |
> |
<exec dir="${build.j1.dir}" executable="appletviewer.exe"> |
719 |
> |
<arg value="${build.j1.dir}/SwingWorker.html"/> |
720 |
> |
</exec> |
721 |
> |
|
722 |
> |
</target> |
723 |
> |
|
724 |
> |
<target name="j1" depends="compile-j1" |
725 |
> |
description="Runs a standalone JavaOne program"> |
726 |
> |
|
727 |
> |
<java classname="${j1.test}" fork="true"> |
728 |
> |
<classpath refid="j1.classpath"/> |
729 |
> |
<jvmarg value="-client"/> |
730 |
> |
|
731 |
> |
<!-- TestPseudoRandom args --> |
732 |
> |
<arg value="2"/> |
733 |
> |
<arg value="25"/> |
734 |
> |
<arg value="100000"/> |
735 |
> |
|
736 |
> |
<!-- WebCrawler args --> |
737 |
> |
<!-- |
738 |
> |
<arg value="jsr166.webcrawler.WebCrawler3"/> |
739 |
> |
<arg value="http://www.priorartisans.com"/> |
740 |
> |
<arg value="25"/> |
741 |
> |
--> |
742 |
|
|
743 |
|
</java> |
744 |
+ |
|
745 |
|
</target> |
746 |
|
|
747 |
|
|
748 |
+ |
<target name="test-j1" depends="compile-j1" |
749 |
+ |
description="Runs testcases from the JavaOne source directories"> |
750 |
+ |
|
751 |
+ |
<junit printsummary="true" |
752 |
+ |
showoutput="true" |
753 |
+ |
errorProperty="junit.failed" |
754 |
+ |
failureProperty="junit.failed" |
755 |
+ |
dir="${build.j1.dir}" |
756 |
+ |
fork="true"> |
757 |
+ |
|
758 |
+ |
<!-- <jvmarg value="-server"/> --> |
759 |
+ |
<classpath refid="j1.classpath"/> |
760 |
+ |
<formatter type="xml"/> |
761 |
+ |
|
762 |
+ |
<batchtest todir="${build.j1.dir}"> |
763 |
+ |
<fileset dir="${j1.src.dir}"> |
764 |
+ |
<include name="**/*Test.java"/> |
765 |
+ |
</fileset> |
766 |
+ |
</batchtest> |
767 |
+ |
|
768 |
+ |
</junit> |
769 |
+ |
|
770 |
+ |
<available property="junit.report.format" |
771 |
+ |
value="frames" |
772 |
+ |
classname="org.apache.xalan.lib.Redirect"/> |
773 |
+ |
<property name="junit.report.format" value="noframes"/> |
774 |
+ |
|
775 |
+ |
<junitreport todir="${build.j1.dir}"> |
776 |
+ |
<fileset dir="${build.j1.dir}"> |
777 |
+ |
<include name="TEST-*.xml"/> |
778 |
+ |
</fileset> |
779 |
+ |
<report styledir="${stylesheet.dir}" |
780 |
+ |
format="${junit.report.format}" |
781 |
+ |
todir="${build.j1.dir}" |
782 |
+ |
/> |
783 |
+ |
</junitreport> |
784 |
+ |
|
785 |
+ |
<fail message="Test Cases Failed" if="junit.failed"/> |
786 |
+ |
|
787 |
+ |
</target> |
788 |
+ |
|
789 |
+ |
|
790 |
+ |
|
791 |
+ |
<!-- C++ and JNI definitions and demos --> |
792 |
+ |
|
793 |
+ |
<target name="configure-cpp"> |
794 |
+ |
|
795 |
+ |
<!-- Define tasks and types --> |
796 |
+ |
|
797 |
+ |
<path id="cpptasks.path"> |
798 |
+ |
<pathelement location="${lib.dir}/cpptasks.jar"/> |
799 |
+ |
</path> |
800 |
+ |
<taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/> |
801 |
+ |
<typedef resource="cpptasks.types" classpathref="cpptasks.path"/> |
802 |
+ |
|
803 |
+ |
<!-- Set platform property for JNI includes --> |
804 |
+ |
|
805 |
+ |
<condition property="platform" value="linux"> |
806 |
+ |
<os name="Linux"/> |
807 |
+ |
</condition> |
808 |
+ |
<condition property="platform" value="win32"> |
809 |
+ |
<os family="windows"/> |
810 |
+ |
</condition> |
811 |
+ |
<condition property="platform" value="solaris"> |
812 |
+ |
<os name="SunOS"/> |
813 |
+ |
</condition> |
814 |
+ |
|
815 |
+ |
</target> |
816 |
+ |
|
817 |
+ |
|
818 |
+ |
<target name="cppdemo" depends="configure-cpp"> |
819 |
+ |
|
820 |
+ |
<mkdir dir="${build.dir}"/> |
821 |
+ |
|
822 |
+ |
<cc multithreaded="true" |
823 |
+ |
name="g++" |
824 |
+ |
objdir="${build.dir}" |
825 |
+ |
outfile="${build.dir}/CppDemo"> |
826 |
+ |
<fileset dir="${test.src.dir}" includes="CppDemo.cpp"/> |
827 |
+ |
<libset libs="stdc++"/> |
828 |
+ |
</cc> |
829 |
+ |
|
830 |
+ |
<exec executable="${build.dir}/CppDemo"> |
831 |
+ |
<arg line="count in word frequency of word in command line count"/> |
832 |
+ |
</exec> |
833 |
+ |
|
834 |
+ |
</target> |
835 |
+ |
|
836 |
+ |
|
837 |
+ |
<target name="jnidemo" depends="init, configure-compiler, configure-cpp"> |
838 |
+ |
|
839 |
+ |
<mkdir dir="${build.testcases.dir}"/> |
840 |
+ |
|
841 |
+ |
<javac srcdir="${test.src.dir}" |
842 |
+ |
destdir="${build.testcases.dir}" |
843 |
+ |
debug="${build.debug}" |
844 |
+ |
debuglevel="${build.debuglevel}" |
845 |
+ |
deprecation="${build.deprecation}" |
846 |
+ |
source="${build.sourcelevel}" |
847 |
+ |
fork="true"> |
848 |
+ |
<compilerarg value="${bootclasspath.args}"/> |
849 |
+ |
<compilerarg line="${build.args}"/> |
850 |
+ |
<classpath refid="test.classpath"/> |
851 |
+ |
<include name="JniDemo.java"/> |
852 |
+ |
</javac> |
853 |
+ |
|
854 |
+ |
<javah destdir="${build.testcases.dir}" |
855 |
+ |
classpathref="test.classpath"> |
856 |
+ |
<class name="JniDemo"/> |
857 |
+ |
</javah> |
858 |
+ |
|
859 |
+ |
<cc multithreaded="true" |
860 |
+ |
name="g++" |
861 |
+ |
objdir="${build.dir}" |
862 |
+ |
outfile="${build.dir}/JniDemo" |
863 |
+ |
outtype="shared"> |
864 |
+ |
|
865 |
+ |
<compiler> |
866 |
+ |
<defineset> |
867 |
+ |
<define name="__int64" value="long long"/> |
868 |
+ |
</defineset> |
869 |
+ |
<includepath location="${java.home}/../include"/> |
870 |
+ |
<includepath location="${java.home}/../include/${platform}"/> |
871 |
+ |
<compilerarg value="-mno-cygwin"/> |
872 |
+ |
</compiler> |
873 |
+ |
|
874 |
+ |
<linker> |
875 |
+ |
<linkerarg value="--add-stdcall-alias"/> |
876 |
+ |
</linker> |
877 |
+ |
|
878 |
+ |
<includepath location="${build.testcases.dir}"/> |
879 |
+ |
|
880 |
+ |
<fileset dir="${test.src.dir}" includes="JniDemo.cpp"/> |
881 |
+ |
|
882 |
+ |
<libset libs="stdc++"/> |
883 |
+ |
|
884 |
+ |
</cc> |
885 |
+ |
|
886 |
+ |
<!-- Necessary if windows, harmless if not --> |
887 |
+ |
<copy file="${build.dir}/libJniDemo.so" tofile="${build.dir}/JniDemo.dll"/> |
888 |
+ |
|
889 |
+ |
<java classname="JniDemo" fork="true"> |
890 |
+ |
<!-- Watch out: path separator hardwired to semicolon here! --> |
891 |
+ |
<sysproperty key="java.library.path" path="${java.library.path};${build.dir}"/> |
892 |
+ |
<classpath refid="test.classpath"/> |
893 |
+ |
<arg line="count in word frequency of word in command line count"/> |
894 |
+ |
</java> |
895 |
+ |
|
896 |
+ |
</target> |
897 |
+ |
|
898 |
+ |
|
899 |
+ |
|
900 |
+ |
<!-- Backward compatibility, work in progress (some files not checked in) --> |
901 |
+ |
|
902 |
+ |
|
903 |
+ |
|
904 |
+ |
<property name="pretiger.src.dir" location="${build.dir}/pretiger/src"/> |
905 |
+ |
<property name="build.pretiger.dir" location="${build.dir}/pretiger/classes"/> |
906 |
+ |
<property name="pretiger.jar" location="${build.lib.dir}/jsr166-pretiger.jar"/> |
907 |
+ |
<property name="pretiger.sourcelevel" value="1.4"/> |
908 |
+ |
|
909 |
+ |
<target name="defang" |
910 |
+ |
depends="init" |
911 |
+ |
description="Generates pre-Tiger compatible source"> |
912 |
+ |
|
913 |
+ |
<delete dir="${pretiger.src.dir}"/> |
914 |
+ |
<mkdir dir="${pretiger.src.dir}"/> |
915 |
+ |
|
916 |
+ |
<exec executable="perl"> |
917 |
+ |
<arg file="etc/defang.pl"/> |
918 |
+ |
<!-- <arg value="-v"/> --> |
919 |
+ |
<arg value="-s"/> <arg file="${src.dir}"/> |
920 |
+ |
<arg value="-t"/> <arg file="${pretiger.src.dir}"/> |
921 |
+ |
</exec> |
922 |
+ |
|
923 |
+ |
</target> |
924 |
+ |
|
925 |
+ |
<target name="compile-pretiger" |
926 |
+ |
depends="init, configure-compiler, defang" |
927 |
+ |
description="Compiles pre-Tiger sources to build folder"> |
928 |
+ |
|
929 |
+ |
<mkdir dir="${build.pretiger.dir}"/> |
930 |
+ |
|
931 |
+ |
<javac srcdir="${pretiger.src.dir}" |
932 |
+ |
destdir="${build.pretiger.dir}" |
933 |
+ |
debug="${build.debug}" |
934 |
+ |
debuglevel="${build.debuglevel}" |
935 |
+ |
deprecation="${build.deprecation}" |
936 |
+ |
source="${pretiger.sourcelevel}" |
937 |
+ |
fork="true"> |
938 |
+ |
|
939 |
+ |
<compilerarg line="${build.args}"/> |
940 |
+ |
<exclude name="**/Thread.java"/> |
941 |
+ |
|
942 |
+ |
</javac> |
943 |
+ |
|
944 |
+ |
</target> |
945 |
+ |
|
946 |
+ |
<target name="pretiger" depends="compile-pretiger"> |
947 |
+ |
|
948 |
+ |
<mkdir dir="${build.lib.dir}"/> |
949 |
+ |
|
950 |
+ |
<jar destfile="${pretiger.jar}"> |
951 |
+ |
<fileset dir="${build.pretiger.dir}"> |
952 |
+ |
</fileset> |
953 |
+ |
</jar> |
954 |
+ |
|
955 |
+ |
</target> |
956 |
+ |
|
957 |
+ |
<!-- jsr166x --> |
958 |
+ |
|
959 |
+ |
|
960 |
+ |
<target name="jsr166xcompile" |
961 |
+ |
depends="init, configure-compiler" |
962 |
+ |
description="Compiles jsr166x sources"> |
963 |
+ |
|
964 |
+ |
<mkdir dir="${build.jsr166x.dir}"/> |
965 |
+ |
|
966 |
+ |
<javac srcdir="${jsr166xsrc.dir}" |
967 |
+ |
destdir="${build.jsr166x.dir}" |
968 |
+ |
debug="${build.debug}" |
969 |
+ |
debuglevel="${build.debuglevel}" |
970 |
+ |
deprecation="${build.deprecation}" |
971 |
+ |
source="${build.sourcelevel}" |
972 |
+ |
fork="true"> |
973 |
+ |
|
974 |
+ |
<include name="**/*.java"/> |
975 |
+ |
<compilerarg line="${build.args}"/> |
976 |
+ |
|
977 |
+ |
</javac> |
978 |
+ |
|
979 |
+ |
</target> |
980 |
+ |
|
981 |
+ |
|
982 |
+ |
|
983 |
+ |
<target name="jsr166xjar" |
984 |
+ |
depends="jsr166xcompile" |
985 |
+ |
description="Builds library jar from compiled sources"> |
986 |
+ |
|
987 |
+ |
<mkdir dir="${build.jsr166xlib.dir}"/> |
988 |
+ |
|
989 |
+ |
<jar destfile="${jsr166xproduct.jar}"> |
990 |
+ |
<fileset dir="${build.jsr166x.dir}"/> |
991 |
+ |
</jar> |
992 |
+ |
|
993 |
+ |
</target> |
994 |
+ |
|
995 |
+ |
|
996 |
+ |
|
997 |
+ |
<target name="jsr166xdocs" |
998 |
+ |
description="Builds javadocs with custom tags to build folder"> |
999 |
+ |
|
1000 |
+ |
<delete dir="${build.jsr166xjavadocs.dir}"/> |
1001 |
+ |
<mkdir dir="${build.jsr166xjavadocs.dir}"/> |
1002 |
+ |
|
1003 |
+ |
<javadoc destdir="${build.jsr166xjavadocs.dir}" |
1004 |
+ |
link="http://java.sun.com/j2se/1.5.0/docs/api/" |
1005 |
+ |
> |
1006 |
+ |
<packageset dir="${topsrc.dir}" defaultexcludes="yes"> |
1007 |
+ |
<include name="jsr166x"/> |
1008 |
+ |
</packageset> |
1009 |
+ |
|
1010 |
+ |
|
1011 |
+ |
</javadoc> |
1012 |
+ |
|
1013 |
+ |
</target> |
1014 |
+ |
|
1015 |
+ |
|
1016 |
+ |
<target name="jsr166xdist" |
1017 |
+ |
depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs" |
1018 |
+ |
description="Puts all distributable products in single hierarchy"/> |
1019 |
+ |
|
1020 |
+ |
|
1021 |
+ |
|
1022 |
+ |
<target name="jsr166xclean" |
1023 |
+ |
description="Removes all build products"> |
1024 |
+ |
|
1025 |
+ |
<delete dir="${build.jsr166x.dir}"/> |
1026 |
+ |
<delete dir="${build.jsr166xlib.dir}"/> |
1027 |
+ |
|
1028 |
+ |
</target> |
1029 |
+ |
|
1030 |
+ |
|
1031 |
+ |
|
1032 |
+ |
<target name="jsr166xdist-clean" |
1033 |
+ |
description="Removes all build and distribution products"> |
1034 |
+ |
|
1035 |
+ |
</target> |
1036 |
+ |
|
1037 |
+ |
|
1038 |
+ |
|
1039 |
+ |
<target name="jsr166xdist-docs" |
1040 |
+ |
description="Builds javadocs without custom tags to dist folder"> |
1041 |
+ |
|
1042 |
+ |
<delete dir="${dist.jsr166xjavadocs.dir}"/> |
1043 |
+ |
<mkdir dir="${dist.jsr166xjavadocs.dir}"/> |
1044 |
+ |
|
1045 |
+ |
<javadoc destdir="${dist.jsr166xjavadocs.dir}" |
1046 |
+ |
link="http://java.sun.com/j2se/1.5.0/docs/api/" |
1047 |
+ |
source="${build.sourcelevel}"> |
1048 |
+ |
|
1049 |
+ |
<packageset dir="${topsrc.dir}" defaultexcludes="yes"> |
1050 |
+ |
<include name="jsr166x"/> |
1051 |
+ |
</packageset> |
1052 |
+ |
|
1053 |
+ |
</javadoc> |
1054 |
+ |
|
1055 |
+ |
</target> |
1056 |
+ |
|
1057 |
+ |
<target name="jsr166xdist-jar" |
1058 |
+ |
depends="jsr166xclean, jsr166xjar"> |
1059 |
+ |
|
1060 |
+ |
<copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/> |
1061 |
+ |
|
1062 |
+ |
</target> |
1063 |
+ |
|
1064 |
|
</project> |