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