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.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"/> |
38 |
– |
<property name="build.sinjdocs.dir" location="${build.dir}/sinjdocs"/> |
39 |
– |
<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.filter.doccheck.dir" location="${build.dir}/filterdocchk"/> |
42 |
> |
<property name="build.dc-filter.dir" location="${build.dir}/filterdocchk"/> |
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 |
> |
<property name="build.jsr166y.dir" location="${build.dir}/jsr166y"/> |
48 |
> |
<property name="build.jsr166ylib.dir" location="${build.dir}/jsr166ylib"/> |
49 |
> |
<property name="build.jsr166yjavadocs.dir" location="${build.dir}/jsr166yjavadocs"/> |
50 |
|
|
51 |
|
<!-- Source locations --> |
52 |
|
<property name="src.dir" location="${basedir}/src/main"/> |
47 |
– |
<property name="emulation.src.dir" location="${basedir}/src/emulation"/> |
53 |
|
<property name="test.src.dir" location="${basedir}/src/test"/> |
54 |
+ |
<property name="j1.src.dir" location="${basedir}/src/javaone"/> |
55 |
+ |
<property name="loops.src.dir" location="${basedir}/src/loops"/> |
56 |
+ |
<property name="tck.src.dir" location="${test.src.dir}/tck"/> |
57 |
+ |
<property name="jtreg.src.dir" location="${test.src.dir}/jtreg"/> |
58 |
|
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
59 |
|
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
60 |
|
<property name="lib.dir" location="${basedir}/lib"/> |
61 |
|
<property name="dist.dir" location="${basedir}/dist"/> |
62 |
+ |
<property name="topsrc.dir" location="${basedir}/src"/> |
63 |
+ |
<property name="jsr166xsrc.dir" location="${basedir}/src/jsr166x"/> |
64 |
+ |
<property name="jsr166ysrc.dir" location="${basedir}/src/jsr166y"/> |
65 |
|
|
66 |
|
<!-- Distribution locations --> |
67 |
|
<property name="dist.javadocs.dir" location="${dist.dir}/docs"/> |
68 |
+ |
<property name="dist.jsr166xjavadocs.dir" location="${dist.dir}/jsr166xdocs"/> |
69 |
+ |
<property name="dist.jsr166yjavadocs.dir" location="${dist.dir}/jsr166ydocs"/> |
70 |
|
|
71 |
|
<!-- Jar locations --> |
72 |
|
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
73 |
+ |
<property name="jsr166xproduct.jar" location="${build.jsr166xlib.dir}/jsr166x.jar"/> |
74 |
+ |
<property name="jsr166yproduct.jar" location="${build.jsr166ylib.dir}/jsr166y.jar"/> |
75 |
|
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
76 |
< |
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
61 |
< |
<property name="sinjdoc.jar" location="${lib.dir}/sinjdoc.jar"/> |
76 |
> |
<property name="concurrent.jar" location="${lib.dir}/concurrent.jar"/> |
77 |
|
|
78 |
+ |
<!-- Bootclasspath argument --> |
79 |
+ |
<property name="bootclasspath.args" value="-Xbootclasspath/p:${product.jar}"/> |
80 |
|
|
81 |
< |
<!-- Files excluded from dist-docs and emulation jar --> |
82 |
< |
<patternset id="unsafe.exclusion"> |
83 |
< |
<exclude name="java/util/Random.*"/> |
84 |
< |
<exclude name="sun/misc/Unsafe.*"/> |
85 |
< |
</patternset> |
86 |
< |
|
87 |
< |
<!-- Files excludes from emulation jar --> |
88 |
< |
<patternset id="atomic.exclusion"> |
89 |
< |
<exclude name="java/util/concurrent/atomic/AtomicBoolean*"/> |
90 |
< |
<exclude name="java/util/concurrent/atomic/AtomicInteger*"/> |
91 |
< |
<exclude name="java/util/concurrent/atomic/AtomicLong*"/> |
92 |
< |
<exclude name="java/util/concurrent/atomic/AtomicReference*"/> |
93 |
< |
<exclude name="java/util/concurrent/locks/LockSupport*"/> |
94 |
< |
<exclude name="java/util/concurrent/locks/ReentrantLock*"/> |
95 |
< |
</patternset> |
96 |
< |
|
81 |
> |
<!-- Test classpath --> |
82 |
> |
<path id="test.classpath"> |
83 |
> |
<pathelement location="${build.testcases.dir}"/> |
84 |
> |
<pathelement location="${junit.jar}"/> |
85 |
> |
</path> |
86 |
> |
|
87 |
> |
<!-- ALoops classpath --> |
88 |
> |
<path id="loops.classpath"> |
89 |
> |
<pathelement location="${build.loops.dir}"/> |
90 |
> |
</path> |
91 |
> |
|
92 |
> |
<!-- J1 classpath --> |
93 |
> |
<path id="j1.classpath"> |
94 |
> |
<pathelement location="${build.classes.dir}"/> |
95 |
> |
<pathelement location="${build.j1.dir}"/> |
96 |
> |
<pathelement location="${junit.jar}"/> |
97 |
> |
|
98 |
> |
<!-- Include dl.u.c for BoundedBuffer comparison --> |
99 |
> |
<pathelement location="${concurrent.jar}"/> |
100 |
> |
</path> |
101 |
|
|
102 |
|
|
103 |
|
<!-- Main targets --> |
104 |
|
|
105 |
+ |
|
106 |
|
<target name="compile" |
107 |
< |
depends="init, configure-compiler, prepare-src" |
107 |
> |
depends="init, configure-compiler" |
108 |
|
description="Compiles main sources to build folder"> |
109 |
|
|
88 |
– |
<property name="prepare.src.dir" value="${src.dir}"/> |
89 |
– |
|
110 |
|
<mkdir dir="${build.classes.dir}"/> |
111 |
|
|
112 |
< |
<!-- |
93 |
< |
<echo>javac ${gjc.args}</echo> |
94 |
< |
<echo>bootclasspath=${compile.bootclasspath}</echo> |
95 |
< |
--> |
96 |
< |
|
97 |
< |
<javac srcdir="${prepare.src.dir}" |
112 |
> |
<javac srcdir="${src.dir}" |
113 |
|
destdir="${build.classes.dir}" |
114 |
|
debug="${build.debug}" |
115 |
|
debuglevel="${build.debuglevel}" |
117 |
|
source="${build.sourcelevel}" |
118 |
|
fork="true"> |
119 |
|
|
120 |
+ |
<include name="**/*.java"/> |
121 |
+ |
<compilerarg value="-XDignore.symbol.file"/> |
122 |
+ |
|
123 |
|
<!-- |
124 |
< |
<compilerarg line="${gjc.args}"/> |
125 |
< |
<bootclasspath refid="compile.bootclasspath"/> |
124 |
> |
<exclude name="java/lang/**"/> |
125 |
> |
<compilerarg line="${build.args}"/> |
126 |
> |
<compilerarg line="-Xlint -Xmaxwarns 1000"/> |
127 |
|
--> |
128 |
|
|
129 |
|
</javac> |
131 |
|
</target> |
132 |
|
|
133 |
|
|
115 |
– |
<target name="jar" |
116 |
– |
depends="configure-emulation, init-jar, native-jar, emulation-jar" |
117 |
– |
description="Builds library jar from compiled sources"/> |
118 |
– |
|
119 |
– |
|
120 |
– |
<target name="test" |
121 |
– |
depends="init, configure-tests, report-tests" |
122 |
– |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
134 |
|
|
135 |
+ |
<target name="jar" |
136 |
+ |
depends="compile" |
137 |
+ |
description="Builds library jar from compiled sources"> |
138 |
|
|
139 |
< |
<target name="checkstyle" |
126 |
< |
depends="filter-src" |
127 |
< |
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
128 |
< |
|
129 |
< |
<taskdef resource="checkstyletask.properties" |
130 |
< |
classpath="${lib.dir}/checkstyle-all-2.4.jar"/> |
139 |
> |
<mkdir dir="${build.lib.dir}"/> |
140 |
|
|
141 |
< |
<checkstyle> |
142 |
< |
<formatter type="plain"/> <!-- also available: type="xml" --> |
143 |
< |
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
135 |
< |
</checkstyle> |
141 |
> |
<jar destfile="${product.jar}"> |
142 |
> |
<fileset dir="${build.classes.dir}"/> |
143 |
> |
</jar> |
144 |
|
|
145 |
|
</target> |
146 |
|
|
147 |
|
|
140 |
– |
<target name="doccheck" |
141 |
– |
depends="filter-doccheck" |
142 |
– |
description="Reports on javadoc style errors"> |
148 |
|
|
149 |
< |
<delete dir="${build.doccheck.dir}"/> |
150 |
< |
<mkdir dir="${build.doccheck.dir}"/> |
151 |
< |
|
147 |
< |
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
148 |
< |
docletpath="${lib.dir}/doccheck.jar" |
149 |
< |
destdir="${build.doccheck.dir}"> |
150 |
< |
<packageset dir="${build.filter.doccheck.dir}"/> |
151 |
< |
</javadoc> |
152 |
< |
|
153 |
< |
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
149 |
> |
<target name="test" |
150 |
> |
depends="init, configure-tests, report-tests" |
151 |
> |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
152 |
|
|
155 |
– |
</target> |
153 |
|
|
154 |
|
|
155 |
|
<target name="docs" |
159 |
– |
depends="filter-src" |
156 |
|
description="Builds javadocs with custom tags to build folder"> |
157 |
|
|
158 |
|
<delete dir="${build.javadocs.dir}"/> |
159 |
|
<mkdir dir="${build.javadocs.dir}"/> |
160 |
|
|
161 |
|
<javadoc destdir="${build.javadocs.dir}" |
162 |
< |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
162 |
> |
link="http://java.sun.com/javase/6/docs/api/" |
163 |
|
overview="${src.dir}/intro.html" |
164 |
< |
source="${build.docsourcelevel}"> |
164 |
> |
sourcepath="${src.dir}:/home/dl/1.6.0/j2se/martin/j2se/src/share/classes" |
165 |
> |
> |
166 |
|
|
167 |
< |
<tag name="revised" description="Last revised:"/> |
171 |
< |
<tag name="spec" description="Specified by:"/> |
172 |
< |
<tag name="editor" description="Last edited by:"/> |
173 |
< |
<tag name="fixme" description="FIX ME:"/> |
174 |
< |
|
175 |
< |
<packageset dir="${build.filter.src.dir}"/> |
167 |
> |
<packageset dir="${src.dir}"/> |
168 |
|
|
169 |
|
</javadoc> |
170 |
|
|
171 |
|
</target> |
172 |
|
|
173 |
|
|
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}"/> |
188 |
– |
|
189 |
– |
<java classname="net.cscott.sinjdoc.Main" fork="true"> |
174 |
|
|
175 |
< |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
175 |
> |
<target name="doccheck" |
176 |
> |
depends="filter-doccheck" |
177 |
> |
description="Reports on javadoc style errors"> |
178 |
|
|
179 |
< |
<classpath> |
180 |
< |
<pathelement location="${sinjdoc.jar}"/> |
195 |
< |
<pathelement location="${lib.dir}/jutil.jar"/> |
196 |
< |
<pathelement location="${lib.dir}/cup.jar"/> |
197 |
< |
<path refid="test.classpath"/> |
198 |
< |
</classpath> |
199 |
< |
|
200 |
< |
|
201 |
< |
<arg value="-d"/> <arg value="${build.sinjdocs.dir}"/> |
202 |
< |
<arg value="-sourcepath"/> <arg value="${src.dir}"/> |
203 |
< |
<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"/> |
179 |
> |
<delete dir="${build.doccheck.dir}"/> |
180 |
> |
<mkdir dir="${build.doccheck.dir}"/> |
181 |
|
|
182 |
< |
<!-- |
183 |
< |
<arg value="-help"/> |
184 |
< |
--> |
182 |
> |
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
183 |
> |
docletpath="${lib.dir}/doccheck.jar" |
184 |
> |
destdir="${build.doccheck.dir}"> |
185 |
> |
<packageset dir="${build.dc-filter.dir}"/> |
186 |
> |
</javadoc> |
187 |
|
|
188 |
< |
</java> |
188 |
> |
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
189 |
|
|
190 |
|
</target> |
191 |
|
|
192 |
|
|
222 |
– |
<target name="strip" |
223 |
– |
depends="init, configure-compiler" |
224 |
– |
description="Strip generics from java source (not working yet)"> |
193 |
|
|
194 |
< |
<mkdir dir="${build.stripped.dir}"/> |
194 |
> |
<target name="checkstyle" |
195 |
> |
depends="filter-src" |
196 |
> |
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
197 |
> |
|
198 |
> |
<taskdef resource="checkstyletask.properties" |
199 |
> |
classpath="${lib.dir}/checkstyle-all-3.1.jar"/> |
200 |
|
|
201 |
< |
<!-- |
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"> |
201 |
> |
<mkdir dir="${build.checkstyle.dir}"/> |
202 |
|
|
203 |
< |
<!-- |
204 |
< |
<compilerarg line="${gjc.args} -s"/> |
205 |
< |
<bootclasspath refid="compile.bootclasspath"/> |
206 |
< |
--> |
203 |
> |
<checkstyle config="etc/checkstyle/sun_checks.xml" |
204 |
> |
failOnViolation="false"> |
205 |
> |
<formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/> |
206 |
> |
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
207 |
> |
</checkstyle> |
208 |
|
|
209 |
< |
</javac> |
209 |
> |
<style in="${build.checkstyle.dir}/checkstyle-report.xml" |
210 |
> |
out="${build.checkstyle.dir}/checkstyle-report.html" |
211 |
> |
style="${stylesheet.dir}/checkstyle-frames.xsl"/> |
212 |
|
|
213 |
|
</target> |
214 |
|
|
215 |
|
|
216 |
+ |
|
217 |
|
<target name="dist" |
218 |
|
depends="init, dist-clean, dist-jar, dist-docs" |
219 |
|
description="Puts all distributable products in single hierarchy"/> |
220 |
|
|
221 |
+ |
|
222 |
+ |
|
223 |
|
<target name="release" |
224 |
|
depends="dist" |
225 |
|
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
226 |
|
|
259 |
– |
<!-- |
260 |
– |
#keep build dir? - dl |
261 |
– |
<delete dir="${build.dir}"/> |
262 |
– |
--> |
227 |
|
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
228 |
|
|
229 |
|
<jar basedir="${basedir}" destfile="${release.jar}"> |
230 |
+ |
<!-- <exclude name="build/**"/> --> |
231 |
|
<exclude name="${release.jar}"/> |
232 |
|
<exclude name="user.properties"/> |
233 |
|
<exclude name="etc/notes/**"/> |
234 |
< |
<exclude name="lib/gjc/2.1/**"/> |
234 |
> |
<exclude name="src/emulation/**"/> |
235 |
|
<exclude name="**/SyntaxTest.java"/> |
236 |
+ |
<exclude name="**/SuperfluousAbstract.java"/> |
237 |
|
</jar> |
238 |
|
|
239 |
|
</target> |
240 |
|
|
241 |
+ |
|
242 |
+ |
|
243 |
|
<target name="clean" |
244 |
|
description="Removes all build products"> |
245 |
|
|
250 |
|
</target> |
251 |
|
|
252 |
|
|
253 |
+ |
|
254 |
|
<target name="dist-clean" |
255 |
|
description="Removes all build and distribution products"> |
256 |
|
|
259 |
|
</target> |
260 |
|
|
261 |
|
|
262 |
+ |
|
263 |
|
<target name="dist-docs" |
294 |
– |
depends="filter-src" |
264 |
|
description="Builds javadocs without custom tags to dist folder"> |
265 |
|
|
266 |
|
<delete dir="${dist.javadocs.dir}"/> |
267 |
|
<mkdir dir="${dist.javadocs.dir}"/> |
268 |
|
|
269 |
|
<javadoc destdir="${dist.javadocs.dir}" |
270 |
< |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
270 |
> |
link="http://java.sun.com/javase/6/docs/api/" |
271 |
|
overview="${src.dir}/intro.html" |
303 |
– |
source="${build.docsourcelevel}"> |
304 |
– |
|
305 |
– |
<packageset dir="${build.filter.src.dir}"/> |
272 |
|
|
273 |
+ |
sourcepath="${src.dir}:/home/dl/1.6.0/j2se/martin/j2se/src/share/classes" |
274 |
+ |
> |
275 |
+ |
<!-- |
276 |
+ |
<packageset dir="${src.dir}" defaultexcludes="yes"> |
277 |
+ |
<include name="java/util/concurrent"/> |
278 |
+ |
<include name="java/util/concurrent/atomic"/> |
279 |
+ |
<include name="java/util/concurrent/locks"/> |
280 |
+ |
</packageset> |
281 |
+ |
--> |
282 |
+ |
<fileset dir="${topsrc.dir}" defaultexcludes="yes"> |
283 |
+ |
<include name="main/java/util/concurrent/*.java"/> |
284 |
+ |
<include name="main/java/util/concurrent/atomic/*.java"/> |
285 |
+ |
<include name="main/java/util/concurrent/locks/*.java"/> |
286 |
+ |
<include name="main/java/util/*.java"/> |
287 |
+ |
<!-- |
288 |
+ |
<include name="main/java/util/concurrent/*.html"/> |
289 |
+ |
<include name="main/java/util/concurrent/atomic/*.html"/> |
290 |
+ |
<include name="main/java/util/concurrent/locks/*.html"/> |
291 |
+ |
<include name="main/java/util/*.html"/> |
292 |
+ |
--> |
293 |
+ |
<!-- <include name="jsr166x/*.java"/> --> |
294 |
+ |
</fileset> |
295 |
|
</javadoc> |
296 |
|
|
297 |
|
</target> |
306 |
|
<!-- Version is kept in a separate file --> |
307 |
|
<loadfile property="version" srcFile="version.properties"/> |
308 |
|
<echo>Building JSR-166 version ${version}</echo> |
309 |
< |
|
322 |
< |
</target> |
323 |
< |
|
324 |
< |
|
325 |
< |
<target name="init-jar"> |
326 |
< |
|
327 |
< |
<mkdir dir="${build.lib.dir}"/> |
328 |
< |
|
329 |
< |
</target> |
330 |
< |
|
331 |
< |
|
332 |
< |
<target name="native-jar" |
333 |
< |
depends="compile" |
334 |
< |
unless="build.emulation.true"> |
335 |
< |
|
336 |
< |
<jar destfile="${product.jar}"> |
337 |
< |
<fileset dir="${build.classes.dir}"/> |
338 |
< |
</jar> |
339 |
< |
|
340 |
< |
</target> |
341 |
< |
|
342 |
< |
|
343 |
< |
<target name="compile-emulation" |
344 |
< |
depends="init, configure-compiler" |
345 |
< |
if="build.emulation.true"> |
346 |
< |
|
347 |
< |
<mkdir dir="${build.emulation.dir}"/> |
348 |
< |
|
349 |
< |
<javac srcdir="${emulation.src.dir}" |
350 |
< |
destdir="${build.emulation.dir}" |
351 |
< |
debug="${build.debug}" |
352 |
< |
debuglevel="${build.debuglevel}" |
353 |
< |
deprecation="${build.deprecation}" |
354 |
< |
source="${build.sourcelevel}" |
355 |
< |
fork="true"> |
356 |
< |
|
357 |
< |
<compilerarg line="${gjc.args}"/> |
358 |
< |
<bootclasspath refid="compile.bootclasspath"/> |
359 |
< |
|
360 |
< |
</javac> |
361 |
< |
|
362 |
< |
</target> |
363 |
< |
|
364 |
< |
|
365 |
< |
<target name="emulation-jar" |
366 |
< |
depends="compile-emulation" |
367 |
< |
if="build.emulation.true"> |
368 |
< |
|
369 |
< |
|
370 |
< |
<jar destfile="${product.jar}" duplicate="add"> |
371 |
< |
<fileset dir="${build.classes.dir}"> |
372 |
< |
<patternset refid="atomic.exclusion"/> |
373 |
< |
<patternset refid="unsafe.exclusion"/> |
374 |
< |
</fileset> |
375 |
< |
<fileset dir="${build.emulation.dir}"/> |
376 |
< |
</jar> |
309 |
> |
<echo>java.home is ${java.home}</echo> |
310 |
|
|
311 |
|
</target> |
312 |
|
|
326 |
|
|
327 |
|
<javac srcdir="${ant.src.dir}" |
328 |
|
destdir="${build.ant.dir}" |
329 |
< |
source="1.4" |
397 |
< |
/> |
329 |
> |
source="1.4"/> |
330 |
|
|
331 |
|
</target> |
332 |
|
|
345 |
|
<copy todir="${build.filter.src.dir}"> |
346 |
|
<fileset dir="${src.dir}"> |
347 |
|
<exclude name="**/*.html"/> |
348 |
< |
<patternset refid="unsafe.exclusion"/> |
348 |
> |
<!-- Files excluded from dist-docs --> |
349 |
> |
<exclude name="java/util/Random.*"/> |
350 |
> |
<exclude name="sun/misc/Unsafe.*"/> |
351 |
|
</fileset> |
352 |
+ |
<!-- |
353 |
|
<filterchain> |
354 |
+ |
--> |
355 |
|
|
356 |
|
<!-- |
357 |
|
# This filter gets rid of angle-bracketed type parameters |
365 |
|
# tweaking.) |
366 |
|
--> |
367 |
|
|
368 |
+ |
<!-- |
369 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
370 |
|
classpath="${build.ant.dir}"> |
371 |
|
<param name="notmatching" value="^\s+\*\s.*$"/> |
372 |
|
<param name="pattern" value="<[^|>()]+?>+"/> |
373 |
|
<param name="replacement" value=" "/> |
374 |
|
</filterreader> |
375 |
+ |
--> |
376 |
|
|
377 |
< |
|
440 |
< |
<!-- |
441 |
< |
# This filter uncomments lines beginning with "//@" so that |
442 |
< |
# javadoc can see imports that are needed to resolve links |
443 |
< |
# but that shouldn't be in the compiled code. |
444 |
< |
--> |
445 |
< |
|
446 |
< |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
447 |
< |
classpath="${build.ant.dir}"> |
448 |
< |
<param name="matching" value="^//@.*$"/> |
449 |
< |
<param name="pattern" value="^//@"/> |
450 |
< |
<param name="replacement" value=""/> |
451 |
< |
</filterreader> |
377 |
> |
<!-- |
378 |
|
</filterchain> |
379 |
+ |
--> |
380 |
|
</copy> |
381 |
|
|
382 |
|
</target> |
383 |
|
|
384 |
|
|
458 |
– |
|
459 |
– |
|
385 |
|
<target name="filter-doccheck" |
386 |
|
depends="filter-src"> |
387 |
|
|
388 |
< |
<mkdir dir="${build.filter.doccheck.dir}"/> |
388 |
> |
<mkdir dir="${build.dc-filter.dir}"/> |
389 |
|
|
390 |
< |
<copy todir="${build.filter.doccheck.dir}"> |
390 |
> |
<copy todir="${build.dc-filter.dir}"> |
391 |
|
<fileset dir="${build.filter.src.dir}"> |
392 |
|
<include name="**/*.html"/> |
393 |
|
</fileset> |
397 |
|
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 {}" |
398 |
|
/> |
399 |
|
|
400 |
< |
<copy todir="${build.filter.doccheck.dir}"> |
400 |
> |
<copy todir="${build.dc-filter.dir}"> |
401 |
|
<fileset dir="${build.filter.src.dir}"> |
402 |
|
<exclude name="**/*.html"/> |
403 |
|
</fileset> |
435 |
|
|
436 |
|
<mkdir dir="${build.testcases.dir}"/> |
437 |
|
|
438 |
< |
<!-- |
439 |
< |
<echo>javac ${gjc.args}</echo> |
440 |
< |
<echo>bootclasspath=${test.compile.bootclasspath}</echo> |
441 |
< |
<echo>classpath="${test.classpath}"</echo> |
442 |
< |
--> |
438 |
> |
<javac srcdir="${tck.src.dir}" |
439 |
> |
destdir="${build.testcases.dir}" |
440 |
> |
debug="${build.debug}" |
441 |
> |
debuglevel="${build.debuglevel}" |
442 |
> |
deprecation="${build.deprecation}" |
443 |
> |
source="${build.sourcelevel}" |
444 |
> |
fork="true"> |
445 |
> |
|
446 |
> |
<compilerarg value="${bootclasspath.args}"/> |
447 |
> |
<compilerarg line="${build.args}"/> |
448 |
> |
|
449 |
> |
<classpath refid="test.classpath"/> |
450 |
> |
|
451 |
> |
</javac> |
452 |
|
|
453 |
|
<javac srcdir="${test.src.dir}" |
454 |
|
destdir="${build.testcases.dir}" |
458 |
|
source="${build.sourcelevel}" |
459 |
|
fork="true"> |
460 |
|
|
461 |
+ |
<include name="jsr166/test/**"/> |
462 |
+ |
|
463 |
+ |
<compilerarg value="${bootclasspath.args}"/> |
464 |
+ |
<compilerarg line="${build.args}"/> |
465 |
+ |
|
466 |
+ |
<classpath refid="test.classpath"/> |
467 |
+ |
|
468 |
+ |
</javac> |
469 |
+ |
|
470 |
|
<!-- |
471 |
< |
<compilerarg line="${gjc.args}"/> |
472 |
< |
--> |
473 |
< |
<bootclasspath refid="test.compile.bootclasspath"/> |
474 |
< |
<classpath refid="test.classpath"/> |
471 |
> |
<javac srcdir="${jtreg.src.dir}" |
472 |
> |
destdir="${build.testcases.dir}" |
473 |
> |
debug="${build.debug}" |
474 |
> |
debuglevel="${build.debuglevel}" |
475 |
> |
deprecation="${build.deprecation}" |
476 |
> |
source="${build.sourcelevel}" |
477 |
> |
fork="true"> |
478 |
> |
|
479 |
> |
<compilerarg value="${bootclasspath.args}"/> |
480 |
> |
<compilerarg line="${build.args}"/> |
481 |
> |
|
482 |
> |
<classpath refid="test.classpath"/> |
483 |
|
|
484 |
|
</javac> |
485 |
+ |
--> |
486 |
|
|
487 |
|
</target> |
488 |
|
|
502 |
|
dir="${build.reports.dir}" |
503 |
|
fork="true"> |
504 |
|
|
505 |
< |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
505 |
> |
<jvmarg value="${bootclasspath.args}"/> |
506 |
> |
<jvmarg value="-server"/> |
507 |
> |
<jvmarg value="-showversion"/> |
508 |
> |
|
509 |
> |
<classpath refid="test.classpath"/> |
510 |
|
|
511 |
|
<formatter type="xml"/> |
512 |
|
|
513 |
< |
<batchtest todir="${build.reports.dir}"> |
513 |
> |
<batchtest todir="${build.reports.dir}" unless="no.test.tck"> |
514 |
> |
<fileset dir="${tck.src.dir}"> |
515 |
> |
<include name="**/${testcase}Test.java"/> |
516 |
> |
</fileset> |
517 |
> |
</batchtest> |
518 |
> |
|
519 |
> |
<batchtest todir="${build.reports.dir}" if="do.test.old"> |
520 |
|
<fileset dir="${test.src.dir}"> |
521 |
+ |
<include name="jsr166/test/**/${testcase}Test.java"/> |
522 |
+ |
</fileset> |
523 |
+ |
</batchtest> |
524 |
+ |
|
525 |
+ |
<!-- |
526 |
+ |
<batchtest todir="${build.reports.dir}" if="do.test.jtreg"> |
527 |
+ |
<fileset dir="${jtreg.src.dir}"> |
528 |
|
<include name="**/${testcase}Test.java"/> |
529 |
|
</fileset> |
530 |
|
</batchtest> |
531 |
+ |
--> |
532 |
|
|
533 |
|
</junit> |
534 |
|
|
538 |
|
<target name="report-tests" |
539 |
|
depends="run-tests"> |
540 |
|
|
541 |
< |
<!-- Sets junit.report.format to frames if Xalan is present, |
541 |
> |
<!-- Sets junit.report.format to frames if redirection is present, |
542 |
|
otherwise sets it to noframes. --> |
543 |
|
<available property="junit.report.format" |
544 |
|
value="frames" |
562 |
|
|
563 |
|
|
564 |
|
<target name="configure-compiler"> |
595 |
– |
<!-- |
596 |
– |
<property name="gjc.version" |
597 |
– |
value="2.2"/> |
565 |
|
|
566 |
< |
<condition property="novariance.arg" value="-novariance"> |
567 |
< |
<and> |
568 |
< |
<equals arg1="${gjc.version}" arg2="2.0"/> |
569 |
< |
<or> |
603 |
< |
<not><isset property="gjc.novariance"/></not> |
604 |
< |
<istrue value="${gjc.novariance}"/> |
605 |
< |
</or> |
606 |
< |
</and> |
566 |
> |
<property name="unchecked.option" value="-Xlint:unchecked"/> |
567 |
> |
|
568 |
> |
<condition property="warnunchecked.arg" value="${unchecked.option}"> |
569 |
> |
<istrue value="${build.warnunchecked}"/> |
570 |
|
</condition> |
571 |
|
|
572 |
< |
<property name="novariance.arg" |
610 |
< |
value=""/> |
572 |
> |
<property name="warnunchecked.arg" value=""/> |
573 |
|
|
612 |
– |
<property name="gjc.dir" |
613 |
– |
value="${lib.dir}/gjc"/> |
574 |
|
|
575 |
< |
<property name="javac.jar" |
576 |
< |
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
575 |
> |
<!-- Common options in javac invocations --> |
576 |
> |
<property name="build.args" value="${warnunchecked.arg}"/> |
577 |
|
|
578 |
< |
<property name="collect.jar" |
619 |
< |
location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/> |
578 |
> |
</target> |
579 |
|
|
621 |
– |
--> |
622 |
– |
<condition property="warnunchecked.arg" value="-warnunchecked"> |
623 |
– |
<istrue value="${gjc.warnunchecked}"/> |
624 |
– |
</condition> |
580 |
|
|
581 |
< |
<property name="warnunchecked.arg" value=""/> |
581 |
> |
<target name="configure-tests" |
582 |
> |
depends="configure-compiler"> |
583 |
|
|
584 |
< |
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
585 |
< |
<istrue value="${build.nothreads}"/> |
586 |
< |
</condition> |
584 |
> |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
585 |
> |
<available property="junit.available" |
586 |
> |
classname="junit.framework.Protectable"/> |
587 |
|
|
588 |
+ |
<!-- Xalan --> |
589 |
+ |
<available property="xalan.available" |
590 |
+ |
classname="org.apache.xalan.Version"/> |
591 |
|
|
592 |
+ |
|
593 |
+ |
<!-- Ant 1.6beta and later don't need or want this check --> |
594 |
|
<!-- |
595 |
< |
! Bootclasspath munging for source compilation. |
596 |
< |
--> |
595 |
> |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
596 |
> |
unless="junit.available"/> |
597 |
|
|
598 |
< |
<path id="pre.bootclasspath"> |
599 |
< |
<pathelement location="${javac.jar}"/> |
600 |
< |
</path> |
598 |
> |
<fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests" |
599 |
> |
unless="xalan.available"/> |
600 |
> |
--> |
601 |
|
|
602 |
< |
<path id="compile.bootclasspath"> |
642 |
< |
<pathelement location="${build.classes.dir}"/> |
643 |
< |
<pathelement location="${collect.jar}"/> |
644 |
< |
<pathelement location="${rt.jar}"/> |
645 |
< |
</path> |
602 |
> |
</target> |
603 |
|
|
647 |
– |
<!-- Flatten paths into platform-appropriate strings --> |
648 |
– |
<property name="pre.bootclasspath" refid="pre.bootclasspath"/> |
649 |
– |
<property name="compile.bootclasspath" refid="compile.bootclasspath"/> |
604 |
|
|
605 |
|
|
606 |
< |
<!-- Common options in javac invocations --> |
607 |
< |
<!-- |
608 |
< |
<property name="gjc.args" |
655 |
< |
value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}" |
656 |
< |
/> |
657 |
< |
--> |
606 |
> |
<!-- Anthill targets --> |
607 |
> |
|
608 |
> |
<target name="anthill-build"> |
609 |
|
|
610 |
+ |
<!-- Override this in user.properties --> |
611 |
+ |
<property name="tiger.home" location="e:/j2sdk1.5.0"/> |
612 |
+ |
|
613 |
+ |
<exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java"> |
614 |
+ |
<arg value="-Xmx256000000"/> |
615 |
+ |
<!-- classpath of new JVM --> |
616 |
+ |
<arg value="-classpath"/> <arg path="${java.class.path}"/> |
617 |
+ |
<!-- location of Ant home directory --> |
618 |
+ |
<arg value="-Dant.home=${ant.home}"/> |
619 |
+ |
<!-- the Ant main class --> |
620 |
+ |
<arg value="org.apache.tools.ant.Main"/> |
621 |
+ |
<!-- The build file --> |
622 |
+ |
<arg value="-buildfile"/> <arg value="build.xml"/> |
623 |
+ |
<!-- the target to build on the new Ant instance --> |
624 |
+ |
<arg value="-DJAVA_HOME=${tiger.home}"/> |
625 |
+ |
<arg value="do-anthill-build"/> |
626 |
+ |
</exec> |
627 |
|
</target> |
628 |
|
|
629 |
+ |
<target name="do-anthill-build" |
630 |
+ |
depends="jar, test, docs, dist-docs"/> |
631 |
|
|
632 |
< |
<target name="prepare-src" |
663 |
< |
depends="configure-compiler" |
664 |
< |
if="prepare.src.dir"> |
632 |
> |
<target name="anthill-publish"> |
633 |
|
|
634 |
< |
<mkdir dir="${prepare.src.dir}"/> |
635 |
< |
<copy todir="${prepare.src.dir}"> |
636 |
< |
<fileset dir="${src.dir}"> |
637 |
< |
<exclude name="java/lang/**"/> |
634 |
> |
<copy todir="${deployDir}/docs/private"> |
635 |
> |
<fileset dir="${build.javadocs.dir}"/> |
636 |
> |
</copy> |
637 |
> |
|
638 |
> |
<copy todir="${deployDir}/docs/public"> |
639 |
> |
<fileset dir="${dist.javadocs.dir}"/> |
640 |
> |
</copy> |
641 |
> |
|
642 |
> |
<copy tofile="${deployDir}/index.html" |
643 |
> |
file="${basedir}/etc/anthill-index.html"/> |
644 |
> |
|
645 |
> |
<copy todir="${deployDir}/notes"> |
646 |
> |
<fileset dir="${basedir}/etc/notes"/> |
647 |
> |
</copy> |
648 |
> |
|
649 |
> |
</target> |
650 |
> |
|
651 |
> |
|
652 |
> |
|
653 |
> |
<!-- Various demos and test programs --> |
654 |
> |
|
655 |
> |
|
656 |
> |
<target name="sample" depends="init, configure-compiler" |
657 |
> |
description="Standalone demo program"> |
658 |
> |
|
659 |
> |
<mkdir dir="${build.testcases.dir}"/> |
660 |
> |
|
661 |
> |
<javac srcdir="${test.src.dir}" |
662 |
> |
destdir="${build.testcases.dir}" |
663 |
> |
debug="${build.debug}" |
664 |
> |
debuglevel="${build.debuglevel}" |
665 |
> |
deprecation="${build.deprecation}" |
666 |
> |
source="${build.sourcelevel}" |
667 |
> |
fork="true"> |
668 |
> |
|
669 |
> |
<include name="jsr166/test/Sample.java"/> |
670 |
> |
|
671 |
> |
</javac> |
672 |
> |
|
673 |
> |
<copy todir="${build.testcases.dir}"> |
674 |
> |
<fileset dir="${test.src.dir}"> |
675 |
> |
<include name="**/*.properties"/> |
676 |
|
</fileset> |
677 |
|
</copy> |
678 |
|
|
679 |
+ |
|
680 |
+ |
<java classname="jsr166.test.Sample" fork="true"> |
681 |
+ |
<classpath refid="test.classpath"/> |
682 |
+ |
<!-- <jvmarg value="-ea"/> --> |
683 |
+ |
<!-- <jvmarg value="-server"/> --> |
684 |
+ |
<!-- <arg value="1000"/> --> |
685 |
+ |
</java> |
686 |
|
</target> |
687 |
|
|
688 |
|
|
689 |
< |
<target name="configure-emulation"> |
689 |
> |
<target name="loops" depends="init, configure-compiler" |
690 |
> |
description="Benchmark from Doug Lea's AQS paper"> |
691 |
|
|
692 |
< |
<condition property="build.emulation.true"> |
693 |
< |
<or> |
694 |
< |
<and> |
695 |
< |
<os family="windows"/> |
696 |
< |
<not> |
697 |
< |
<isset property="build.emulation"/> |
698 |
< |
</not> |
699 |
< |
</and> |
700 |
< |
<istrue value="${build.emulation}"/> |
701 |
< |
</or> |
702 |
< |
</condition> |
692 |
> |
<mkdir dir="${build.loops.dir}"/> |
693 |
> |
|
694 |
> |
<javac srcdir="${loops.src.dir}" |
695 |
> |
destdir="${build.loops.dir}" |
696 |
> |
debug="${build.debug}" |
697 |
> |
debuglevel="${build.debuglevel}" |
698 |
> |
deprecation="${build.deprecation}" |
699 |
> |
source="${build.sourcelevel}" |
700 |
> |
fork="true"> |
701 |
> |
|
702 |
> |
<compilerarg line="${build.args}"/> |
703 |
> |
<classpath refid="loops.classpath"/> |
704 |
> |
|
705 |
> |
</javac> |
706 |
> |
|
707 |
> |
<java classname="ALoops" fork="true"> |
708 |
> |
<classpath refid="loops.classpath"/> |
709 |
> |
</java> |
710 |
|
|
711 |
|
</target> |
712 |
|
|
713 |
|
|
714 |
< |
<target name="configure-tests" |
694 |
< |
depends="configure-compiler"> |
714 |
> |
<target name="compile-j1" depends="init, configure-compiler, compile"> |
715 |
|
|
716 |
< |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
697 |
< |
<available property="junit.available" |
698 |
< |
classname="junit.framework.Protectable"/> |
716 |
> |
<mkdir dir="${build.j1.dir}"/> |
717 |
|
|
718 |
< |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
719 |
< |
unless="junit.available"/> |
718 |
> |
<javac srcdir="${j1.src.dir}" |
719 |
> |
destdir="${build.j1.dir}" |
720 |
> |
debug="${build.debug}" |
721 |
> |
debuglevel="${build.debuglevel}" |
722 |
> |
deprecation="${build.deprecation}" |
723 |
> |
source="${build.sourcelevel}" > |
724 |
|
|
725 |
+ |
<include name="**/*.java"/> |
726 |
+ |
<exclude name="**/dijkstra/**"/> |
727 |
+ |
|
728 |
+ |
<compilerarg line="${build.args}"/> |
729 |
+ |
<classpath refid="j1.classpath"/> |
730 |
+ |
|
731 |
+ |
</javac> |
732 |
+ |
|
733 |
+ |
</target> |
734 |
+ |
|
735 |
+ |
|
736 |
+ |
<target name="sw" depends="compile-j1" |
737 |
+ |
description="Runs the SwingWorker demo"> |
738 |
|
|
739 |
|
<!-- |
740 |
< |
! Bootclasspath munging for testing, so JUnit can test our local |
741 |
< |
! modifications to java.*. |
742 |
< |
--> |
743 |
< |
|
709 |
< |
<path id="test.classpath"> |
710 |
< |
<pathelement location="${product.jar}"/> |
711 |
< |
<pathelement location="${build.testcases.dir}"/> |
712 |
< |
<pathelement location="${junit.jar}"/> |
713 |
< |
</path> |
740 |
> |
<java classname="jsr166.swing.SwingWorkerDemo" fork="true"> |
741 |
> |
<classpath refid="j1.classpath"/> |
742 |
> |
</java> |
743 |
> |
--> |
744 |
|
|
745 |
< |
<path id="test.compile.bootclasspath"> |
716 |
< |
<pathelement location="${javac.jar}"/> |
717 |
< |
<pathelement location="${collect.jar}"/> |
718 |
< |
<pathelement location="${rt.jar}"/> |
719 |
< |
</path> |
745 |
> |
<copy todir="${build.j1.dir}" file="${j1.src.dir}/jsr166/swing/SwingWorker.html"/> |
746 |
|
|
747 |
< |
<path id="test.run.bootclasspath"> |
748 |
< |
<pathelement location="${javac.jar}"/> |
749 |
< |
<path refid="test.classpath"/> |
750 |
< |
</path> |
747 |
> |
<exec dir="${build.j1.dir}" executable="appletviewer.exe"> |
748 |
> |
<arg value="${build.j1.dir}/SwingWorker.html"/> |
749 |
> |
</exec> |
750 |
> |
|
751 |
> |
</target> |
752 |
> |
|
753 |
> |
<target name="j1" depends="compile-j1" |
754 |
> |
description="Runs a standalone JavaOne program"> |
755 |
|
|
756 |
< |
<!-- Flatten test classpaths into platform-appropriate strings --> |
757 |
< |
<property name="test.classpath" refid="test.classpath"/> |
758 |
< |
<property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/> |
759 |
< |
<property name="test.run.bootclasspath" refid="test.run.bootclasspath"/> |
756 |
> |
<java classname="${j1.test}" fork="true"> |
757 |
> |
<classpath refid="j1.classpath"/> |
758 |
> |
<jvmarg value="-client"/> |
759 |
> |
|
760 |
> |
<!-- TestPseudoRandom args --> |
761 |
> |
<arg value="2"/> |
762 |
> |
<arg value="25"/> |
763 |
> |
<arg value="100000"/> |
764 |
> |
|
765 |
> |
<!-- WebCrawler args --> |
766 |
> |
<!-- |
767 |
> |
<arg value="jsr166.webcrawler.WebCrawler3"/> |
768 |
> |
<arg value="http://www.priorartisans.com"/> |
769 |
> |
<arg value="25"/> |
770 |
> |
--> |
771 |
> |
|
772 |
> |
</java> |
773 |
|
|
774 |
|
</target> |
775 |
|
|
776 |
|
|
777 |
+ |
<target name="test-j1" depends="compile-j1" |
778 |
+ |
description="Runs testcases from the JavaOne source directories"> |
779 |
|
|
780 |
< |
<!-- Anthill targets --> |
780 |
> |
<junit printsummary="true" |
781 |
> |
showoutput="true" |
782 |
> |
errorProperty="junit.failed" |
783 |
> |
failureProperty="junit.failed" |
784 |
> |
dir="${build.j1.dir}" |
785 |
> |
fork="true"> |
786 |
|
|
787 |
< |
<target name="anthill-build" |
788 |
< |
depends="jar, test, docs, dist-docs"/> |
787 |
> |
<!-- <jvmarg value="-server"/> --> |
788 |
> |
<classpath refid="j1.classpath"/> |
789 |
> |
<formatter type="xml"/> |
790 |
|
|
791 |
< |
<target name="anthill-publish"> |
791 |
> |
<batchtest todir="${build.j1.dir}"> |
792 |
> |
<fileset dir="${j1.src.dir}"> |
793 |
> |
<include name="**/*Test.java"/> |
794 |
> |
</fileset> |
795 |
> |
</batchtest> |
796 |
|
|
797 |
< |
<copy todir="${deployDir}/docs/private"> |
743 |
< |
<fileset dir="${build.javadocs.dir}"/> |
744 |
< |
</copy> |
797 |
> |
</junit> |
798 |
|
|
799 |
< |
<copy todir="${deployDir}/docs/public"> |
800 |
< |
<fileset dir="${dist.javadocs.dir}"/> |
801 |
< |
</copy> |
799 |
> |
<available property="junit.report.format" |
800 |
> |
value="frames" |
801 |
> |
classname="org.apache.xalan.lib.Redirect"/> |
802 |
> |
<property name="junit.report.format" value="noframes"/> |
803 |
|
|
804 |
< |
<copy tofile="${deployDir}/index.html" |
805 |
< |
file="${basedir}/etc/anthill-index.html"/> |
804 |
> |
<junitreport todir="${build.j1.dir}"> |
805 |
> |
<fileset dir="${build.j1.dir}"> |
806 |
> |
<include name="TEST-*.xml"/> |
807 |
> |
</fileset> |
808 |
> |
<report styledir="${stylesheet.dir}" |
809 |
> |
format="${junit.report.format}" |
810 |
> |
todir="${build.j1.dir}" |
811 |
> |
/> |
812 |
> |
</junitreport> |
813 |
|
|
814 |
< |
<copy todir="${deployDir}/notes"> |
815 |
< |
<fileset dir="${basedir}/etc/notes"/> |
816 |
< |
</copy> |
814 |
> |
<fail message="Test Cases Failed" if="junit.failed"/> |
815 |
> |
|
816 |
> |
</target> |
817 |
> |
|
818 |
> |
|
819 |
> |
|
820 |
> |
<!-- C++ and JNI definitions and demos --> |
821 |
> |
|
822 |
> |
<target name="configure-cpp"> |
823 |
> |
|
824 |
> |
<!-- Define tasks and types --> |
825 |
> |
|
826 |
> |
<path id="cpptasks.path"> |
827 |
> |
<pathelement location="${lib.dir}/cpptasks.jar"/> |
828 |
> |
</path> |
829 |
> |
<taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/> |
830 |
> |
<typedef resource="cpptasks.types" classpathref="cpptasks.path"/> |
831 |
> |
|
832 |
> |
<!-- Set platform property for JNI includes --> |
833 |
> |
|
834 |
> |
<condition property="platform" value="linux"> |
835 |
> |
<os name="Linux"/> |
836 |
> |
</condition> |
837 |
> |
<condition property="platform" value="win32"> |
838 |
> |
<os family="windows"/> |
839 |
> |
</condition> |
840 |
> |
<condition property="platform" value="solaris"> |
841 |
> |
<os name="SunOS"/> |
842 |
> |
</condition> |
843 |
|
|
844 |
|
</target> |
845 |
|
|
846 |
|
|
847 |
< |
<target name="ng" depends="test"> |
761 |
< |
<java classname="SuperfluousAbstract" fork="true"> |
847 |
> |
<target name="cppdemo" depends="configure-cpp"> |
848 |
|
|
849 |
< |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
849 |
> |
<mkdir dir="${build.dir}"/> |
850 |
|
|
851 |
+ |
<cc multithreaded="true" |
852 |
+ |
name="g++" |
853 |
+ |
objdir="${build.dir}" |
854 |
+ |
outfile="${build.dir}/CppDemo"> |
855 |
+ |
<fileset dir="${test.src.dir}" includes="CppDemo.cpp"/> |
856 |
+ |
<libset libs="stdc++"/> |
857 |
+ |
</cc> |
858 |
+ |
|
859 |
+ |
<exec executable="${build.dir}/CppDemo"> |
860 |
+ |
<arg line="count in word frequency of word in command line count"/> |
861 |
+ |
</exec> |
862 |
+ |
|
863 |
+ |
</target> |
864 |
+ |
|
865 |
+ |
|
866 |
+ |
<target name="jnidemo" depends="init, configure-compiler, configure-cpp"> |
867 |
+ |
|
868 |
+ |
<mkdir dir="${build.testcases.dir}"/> |
869 |
+ |
|
870 |
+ |
<javac srcdir="${test.src.dir}" |
871 |
+ |
destdir="${build.testcases.dir}" |
872 |
+ |
debug="${build.debug}" |
873 |
+ |
debuglevel="${build.debuglevel}" |
874 |
+ |
deprecation="${build.deprecation}" |
875 |
+ |
source="${build.sourcelevel}" |
876 |
+ |
fork="true"> |
877 |
+ |
<compilerarg value="${bootclasspath.args}"/> |
878 |
+ |
<compilerarg line="${build.args}"/> |
879 |
+ |
<classpath refid="test.classpath"/> |
880 |
+ |
<include name="JniDemo.java"/> |
881 |
+ |
</javac> |
882 |
+ |
|
883 |
+ |
<javah destdir="${build.testcases.dir}" |
884 |
+ |
classpathref="test.classpath"> |
885 |
+ |
<class name="JniDemo"/> |
886 |
+ |
</javah> |
887 |
+ |
|
888 |
+ |
<cc multithreaded="true" |
889 |
+ |
name="g++" |
890 |
+ |
objdir="${build.dir}" |
891 |
+ |
outfile="${build.dir}/JniDemo" |
892 |
+ |
outtype="shared"> |
893 |
+ |
|
894 |
+ |
<compiler> |
895 |
+ |
<defineset> |
896 |
+ |
<define name="__int64" value="long long"/> |
897 |
+ |
</defineset> |
898 |
+ |
<includepath location="${java.home}/../include"/> |
899 |
+ |
<includepath location="${java.home}/../include/${platform}"/> |
900 |
+ |
<compilerarg value="-mno-cygwin"/> |
901 |
+ |
</compiler> |
902 |
+ |
|
903 |
+ |
<linker> |
904 |
+ |
<linkerarg value="--add-stdcall-alias"/> |
905 |
+ |
</linker> |
906 |
+ |
|
907 |
+ |
<includepath location="${build.testcases.dir}"/> |
908 |
+ |
|
909 |
+ |
<fileset dir="${test.src.dir}" includes="JniDemo.cpp"/> |
910 |
+ |
|
911 |
+ |
<libset libs="stdc++"/> |
912 |
+ |
|
913 |
+ |
</cc> |
914 |
+ |
|
915 |
+ |
<!-- Necessary if windows, harmless if not --> |
916 |
+ |
<copy file="${build.dir}/libJniDemo.so" tofile="${build.dir}/JniDemo.dll"/> |
917 |
+ |
|
918 |
+ |
<java classname="JniDemo" fork="true"> |
919 |
+ |
<!-- Watch out: path separator hardwired to semicolon here! --> |
920 |
+ |
<sysproperty key="java.library.path" path="${java.library.path};${build.dir}"/> |
921 |
+ |
<classpath refid="test.classpath"/> |
922 |
+ |
<arg line="count in word frequency of word in command line count"/> |
923 |
|
</java> |
924 |
+ |
|
925 |
+ |
</target> |
926 |
+ |
|
927 |
+ |
|
928 |
+ |
|
929 |
+ |
<!-- Backward compatibility, work in progress (some files not checked in) --> |
930 |
+ |
|
931 |
+ |
|
932 |
+ |
|
933 |
+ |
<property name="pretiger.src.dir" location="${build.dir}/pretiger/src"/> |
934 |
+ |
<property name="build.pretiger.dir" location="${build.dir}/pretiger/classes"/> |
935 |
+ |
<property name="pretiger.jar" location="${build.lib.dir}/jsr166-pretiger.jar"/> |
936 |
+ |
<property name="pretiger.sourcelevel" value="1.4"/> |
937 |
+ |
|
938 |
+ |
<target name="defang" |
939 |
+ |
depends="init" |
940 |
+ |
description="Generates pre-Tiger compatible source"> |
941 |
+ |
|
942 |
+ |
<delete dir="${pretiger.src.dir}"/> |
943 |
+ |
<mkdir dir="${pretiger.src.dir}"/> |
944 |
+ |
|
945 |
+ |
<exec executable="perl"> |
946 |
+ |
<arg file="etc/defang.pl"/> |
947 |
+ |
<!-- <arg value="-v"/> --> |
948 |
+ |
<arg value="-s"/> <arg file="${src.dir}"/> |
949 |
+ |
<arg value="-t"/> <arg file="${pretiger.src.dir}"/> |
950 |
+ |
</exec> |
951 |
+ |
|
952 |
+ |
</target> |
953 |
+ |
|
954 |
+ |
<target name="compile-pretiger" |
955 |
+ |
depends="init, configure-compiler, defang" |
956 |
+ |
description="Compiles pre-Tiger sources to build folder"> |
957 |
+ |
|
958 |
+ |
<mkdir dir="${build.pretiger.dir}"/> |
959 |
+ |
|
960 |
+ |
<javac srcdir="${pretiger.src.dir}" |
961 |
+ |
destdir="${build.pretiger.dir}" |
962 |
+ |
debug="${build.debug}" |
963 |
+ |
debuglevel="${build.debuglevel}" |
964 |
+ |
deprecation="${build.deprecation}" |
965 |
+ |
source="${pretiger.sourcelevel}" |
966 |
+ |
fork="true"> |
967 |
+ |
|
968 |
+ |
<compilerarg line="${build.args}"/> |
969 |
+ |
<exclude name="**/Thread.java"/> |
970 |
+ |
|
971 |
+ |
</javac> |
972 |
+ |
|
973 |
+ |
</target> |
974 |
+ |
|
975 |
+ |
<target name="pretiger" depends="compile-pretiger"> |
976 |
+ |
|
977 |
+ |
<mkdir dir="${build.lib.dir}"/> |
978 |
+ |
|
979 |
+ |
<jar destfile="${pretiger.jar}"> |
980 |
+ |
<fileset dir="${build.pretiger.dir}"> |
981 |
+ |
</fileset> |
982 |
+ |
</jar> |
983 |
+ |
|
984 |
+ |
</target> |
985 |
+ |
|
986 |
+ |
<!-- jsr166x --> |
987 |
+ |
|
988 |
+ |
|
989 |
+ |
<target name="jsr166xcompile" |
990 |
+ |
depends="init, configure-compiler" |
991 |
+ |
description="Compiles jsr166x sources"> |
992 |
+ |
|
993 |
+ |
<mkdir dir="${build.jsr166x.dir}"/> |
994 |
+ |
|
995 |
+ |
<javac srcdir="${jsr166xsrc.dir}" |
996 |
+ |
destdir="${build.jsr166x.dir}" |
997 |
+ |
debug="${build.debug}" |
998 |
+ |
debuglevel="${build.debuglevel}" |
999 |
+ |
deprecation="${build.deprecation}" |
1000 |
+ |
source="${build.sourcelevel}" |
1001 |
+ |
fork="true"> |
1002 |
+ |
|
1003 |
+ |
<include name="**/*.java"/> |
1004 |
+ |
<compilerarg line="${build.args}"/> |
1005 |
+ |
|
1006 |
+ |
</javac> |
1007 |
+ |
|
1008 |
+ |
</target> |
1009 |
+ |
|
1010 |
+ |
|
1011 |
+ |
|
1012 |
+ |
<target name="jsr166xjar" |
1013 |
+ |
depends="jsr166xcompile" |
1014 |
+ |
description="Builds library jar from compiled sources"> |
1015 |
+ |
|
1016 |
+ |
<mkdir dir="${build.jsr166xlib.dir}"/> |
1017 |
+ |
|
1018 |
+ |
<jar destfile="${jsr166xproduct.jar}"> |
1019 |
+ |
<fileset dir="${build.jsr166x.dir}"/> |
1020 |
+ |
</jar> |
1021 |
+ |
|
1022 |
+ |
</target> |
1023 |
+ |
|
1024 |
+ |
|
1025 |
+ |
|
1026 |
+ |
<target name="jsr166xdocs" |
1027 |
+ |
description="Builds javadocs with custom tags to build folder"> |
1028 |
+ |
|
1029 |
+ |
<delete dir="${build.jsr166xjavadocs.dir}"/> |
1030 |
+ |
<mkdir dir="${build.jsr166xjavadocs.dir}"/> |
1031 |
+ |
|
1032 |
+ |
<javadoc destdir="${build.jsr166xjavadocs.dir}" |
1033 |
+ |
link="http://java.sun.com/javase/6/docs/api/" |
1034 |
+ |
|
1035 |
+ |
sourcepath="${jsr166xsrc.dir}:/home/dl/1.5.0/j2se/martin/j2se/src/share/classes" |
1036 |
+ |
|
1037 |
+ |
> |
1038 |
+ |
<packageset dir="${topsrc.dir}" defaultexcludes="yes"> |
1039 |
+ |
<include name="jsr166x"/> |
1040 |
+ |
</packageset> |
1041 |
+ |
|
1042 |
+ |
|
1043 |
+ |
</javadoc> |
1044 |
+ |
|
1045 |
+ |
</target> |
1046 |
+ |
|
1047 |
+ |
|
1048 |
+ |
<target name="jsr166xdist" |
1049 |
+ |
depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs" |
1050 |
+ |
description="Puts all distributable products in single hierarchy"/> |
1051 |
+ |
|
1052 |
+ |
|
1053 |
+ |
|
1054 |
+ |
<target name="jsr166xclean" |
1055 |
+ |
description="Removes all build products"> |
1056 |
+ |
|
1057 |
+ |
<delete dir="${build.jsr166x.dir}"/> |
1058 |
+ |
<delete dir="${build.jsr166xlib.dir}"/> |
1059 |
+ |
|
1060 |
+ |
</target> |
1061 |
+ |
|
1062 |
+ |
|
1063 |
+ |
|
1064 |
+ |
<target name="jsr166xdist-clean" |
1065 |
+ |
description="Removes all build and distribution products"> |
1066 |
+ |
|
1067 |
+ |
</target> |
1068 |
+ |
|
1069 |
+ |
|
1070 |
+ |
|
1071 |
+ |
<target name="jsr166xdist-docs" |
1072 |
+ |
description="Builds javadocs without custom tags to dist folder"> |
1073 |
+ |
|
1074 |
+ |
<delete dir="${dist.jsr166xjavadocs.dir}"/> |
1075 |
+ |
<mkdir dir="${dist.jsr166xjavadocs.dir}"/> |
1076 |
+ |
|
1077 |
+ |
<javadoc destdir="${dist.jsr166xjavadocs.dir}" |
1078 |
+ |
link="http://java.sun.com/javase/6/docs/api/" |
1079 |
+ |
source="${build.sourcelevel}"> |
1080 |
+ |
|
1081 |
+ |
<packageset dir="${topsrc.dir}" defaultexcludes="yes"> |
1082 |
+ |
<include name="jsr166x"/> |
1083 |
+ |
</packageset> |
1084 |
+ |
|
1085 |
+ |
</javadoc> |
1086 |
+ |
|
1087 |
+ |
</target> |
1088 |
+ |
|
1089 |
+ |
<target name="jsr166xdist-jar" |
1090 |
+ |
depends="jsr166xclean, jsr166xjar"> |
1091 |
+ |
|
1092 |
+ |
<copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/> |
1093 |
+ |
|
1094 |
|
</target> |
1095 |
|
|
1096 |
+ |
<!-- jsr166y --> |
1097 |
+ |
|
1098 |
+ |
|
1099 |
+ |
<target name="jsr166ycompile" |
1100 |
+ |
depends="init, configure-compiler" |
1101 |
+ |
description="Compiles jsr166y sources"> |
1102 |
+ |
|
1103 |
+ |
<mkdir dir="${build.jsr166y.dir}"/> |
1104 |
+ |
|
1105 |
+ |
<javac srcdir="${jsr166ysrc.dir}" |
1106 |
+ |
destdir="${build.jsr166y.dir}" |
1107 |
+ |
debug="${build.debug}" |
1108 |
+ |
debuglevel="${build.debuglevel}" |
1109 |
+ |
deprecation="${build.deprecation}" |
1110 |
+ |
source="${build.sourcelevel}" |
1111 |
+ |
fork="true"> |
1112 |
+ |
|
1113 |
+ |
<include name="**/*.java"/> |
1114 |
+ |
<compilerarg line="${build.args}"/> |
1115 |
+ |
<compilerarg value="${bootclasspath.args}"/> |
1116 |
+ |
|
1117 |
+ |
<!-- <compilerarg line="-Xlint -Xmaxwarns 1000"/> --> |
1118 |
+ |
|
1119 |
+ |
</javac> |
1120 |
+ |
|
1121 |
+ |
</target> |
1122 |
+ |
|
1123 |
+ |
|
1124 |
+ |
|
1125 |
+ |
<target name="jsr166yjar" |
1126 |
+ |
depends="jsr166ycompile" |
1127 |
+ |
description="Builds library jar from compiled sources"> |
1128 |
+ |
|
1129 |
+ |
<mkdir dir="${build.jsr166ylib.dir}"/> |
1130 |
+ |
|
1131 |
+ |
<jar destfile="${jsr166yproduct.jar}"> |
1132 |
+ |
<fileset dir="${build.jsr166y.dir}"/> |
1133 |
+ |
</jar> |
1134 |
+ |
|
1135 |
+ |
</target> |
1136 |
+ |
|
1137 |
+ |
|
1138 |
+ |
|
1139 |
+ |
<target name="jsr166ydocs" |
1140 |
+ |
description="Builds javadocs with custom tags to build folder"> |
1141 |
+ |
|
1142 |
+ |
<delete dir="${build.jsr166yjavadocs.dir}"/> |
1143 |
+ |
<mkdir dir="${build.jsr166yjavadocs.dir}"/> |
1144 |
+ |
|
1145 |
+ |
<javadoc destdir="${build.jsr166yjavadocs.dir}" |
1146 |
+ |
link="http://java.sun.com/javase/6/docs/api/" |
1147 |
+ |
sourcepath="${jsr166ysrc.dir}:/home/dl/1.5.0/j2se/martin/j2se/src/share/classes" |
1148 |
+ |
|
1149 |
+ |
> |
1150 |
+ |
<packageset dir="${topsrc.dir}" defaultexcludes="no"> |
1151 |
+ |
<include name="jsr166y"/> |
1152 |
+ |
</packageset> |
1153 |
+ |
|
1154 |
+ |
|
1155 |
+ |
</javadoc> |
1156 |
+ |
|
1157 |
+ |
</target> |
1158 |
+ |
|
1159 |
+ |
|
1160 |
+ |
<target name="jsr166ydist" |
1161 |
+ |
depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs" |
1162 |
+ |
description="Puts all distributable products in single hierarchy"/> |
1163 |
+ |
|
1164 |
+ |
|
1165 |
+ |
|
1166 |
+ |
<target name="jsr166yclean" |
1167 |
+ |
description="Removes all build products"> |
1168 |
+ |
|
1169 |
+ |
<delete dir="${build.jsr166y.dir}"/> |
1170 |
+ |
<delete dir="${build.jsr166ylib.dir}"/> |
1171 |
+ |
|
1172 |
+ |
</target> |
1173 |
+ |
|
1174 |
+ |
|
1175 |
+ |
|
1176 |
+ |
<target name="jsr166ydist-clean" |
1177 |
+ |
description="Removes all build and distribution products"> |
1178 |
+ |
|
1179 |
+ |
</target> |
1180 |
+ |
|
1181 |
+ |
<target name="jsr166ydist-docs" |
1182 |
+ |
description="Builds javadocs without custom tags to dist folder"> |
1183 |
+ |
|
1184 |
+ |
<delete dir="${dist.jsr166yjavadocs.dir}"/> |
1185 |
+ |
<mkdir dir="${dist.jsr166yjavadocs.dir}"/> |
1186 |
+ |
|
1187 |
+ |
<javadoc destdir="${dist.jsr166yjavadocs.dir}" |
1188 |
+ |
link="http://java.sun.com/javase/6/docs/api/" |
1189 |
+ |
source="${build.sourcelevel}"> |
1190 |
+ |
<fileset dir="${topsrc.dir}" defaultexcludes="yes"> |
1191 |
+ |
<include name="jsr166y/*.java"/> |
1192 |
+ |
<include name="jsr166y/forkjoin/*.java"/> |
1193 |
+ |
</fileset> |
1194 |
+ |
</javadoc> |
1195 |
+ |
|
1196 |
+ |
</target> |
1197 |
+ |
|
1198 |
+ |
<target name="jsr166ydist-jar" |
1199 |
+ |
depends="jsr166yclean, jsr166yjar"> |
1200 |
+ |
|
1201 |
+ |
<copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/> |
1202 |
+ |
|
1203 |
+ |
</target> |
1204 |
|
|
1205 |
|
</project> |