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.stripped.dir" location="${build.dir}/stripped"/> |
38 |
|
<property name="build.reports.dir" location="${build.dir}/reports"/> |
39 |
+ |
<property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/> |
40 |
|
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
41 |
|
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
42 |
+ |
<property name="build.dc-filter.dir" location="${build.dir}/filterdocchk"/> |
43 |
|
|
44 |
|
<!-- Source locations --> |
45 |
|
<property name="src.dir" location="${basedir}/src/main"/> |
45 |
– |
<property name="emulation.src.dir" location="${basedir}/src/emulation"/> |
46 |
|
<property name="test.src.dir" location="${basedir}/src/test"/> |
47 |
+ |
<property name="j1.src.dir" location="${basedir}/src/javaone"/> |
48 |
+ |
<property name="loops.src.dir" location="${basedir}/src/loops"/> |
49 |
+ |
<property name="tck.src.dir" location="${test.src.dir}/tck"/> |
50 |
+ |
<property name="jtreg.src.dir" location="${test.src.dir}/jtreg"/> |
51 |
|
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
52 |
|
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
53 |
|
<property name="lib.dir" location="${basedir}/lib"/> |
59 |
|
<!-- Jar locations --> |
60 |
|
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
61 |
|
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
58 |
– |
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
62 |
|
|
63 |
+ |
<!-- Bootclasspath argument --> |
64 |
+ |
<property name="bootclasspath.args" value="-Xbootclasspath/p:${product.jar}"/> |
65 |
|
|
66 |
< |
|
67 |
< |
<!-- Files excluded from emulation and dist-docs --> |
68 |
< |
<patternset id="emulation.excludes"> |
69 |
< |
<exclude name="java/util/Random.*"/> |
70 |
< |
<exclude name="sun/misc/Unsafe.*"/> |
71 |
< |
</patternset> |
72 |
< |
|
66 |
> |
<!-- Test classpath --> |
67 |
> |
<path id="test.classpath"> |
68 |
> |
<pathelement location="${build.testcases.dir}"/> |
69 |
> |
<pathelement location="${junit.jar}"/> |
70 |
> |
</path> |
71 |
> |
|
72 |
> |
<!-- ALoops classpath --> |
73 |
> |
<path id="loops.classpath"> |
74 |
> |
<pathelement location="${build.loops.dir}"/> |
75 |
> |
</path> |
76 |
> |
|
77 |
> |
<!-- J1 classpath --> |
78 |
> |
<path id="j1.classpath"> |
79 |
> |
<pathelement location="${build.j1.dir}"/> |
80 |
> |
<pathelement location="${junit.jar}"/> |
81 |
> |
</path> |
82 |
|
|
83 |
|
|
84 |
|
<!-- Main targets --> |
85 |
|
|
86 |
+ |
|
87 |
|
<target name="compile" |
88 |
< |
depends="init, configure-compiler, prepare-src" |
88 |
> |
depends="init, configure-compiler" |
89 |
|
description="Compiles main sources to build folder"> |
90 |
|
|
76 |
– |
<property name="prepare.src.dir" value="${src.dir}"/> |
77 |
– |
|
91 |
|
<mkdir dir="${build.classes.dir}"/> |
92 |
|
|
93 |
< |
<javac srcdir="${prepare.src.dir}" |
93 |
> |
<javac srcdir="${src.dir}" |
94 |
|
destdir="${build.classes.dir}" |
95 |
|
debug="${build.debug}" |
96 |
|
debuglevel="${build.debuglevel}" |
98 |
|
source="${build.sourcelevel}" |
99 |
|
fork="true"> |
100 |
|
|
101 |
< |
<bootclasspath refid="javac.bootclasspath"/> |
89 |
< |
<compilerarg line="${build.javac.args}"/> |
101 |
> |
<compilerarg line="${build.args}"/> |
102 |
|
|
103 |
|
</javac> |
104 |
|
|
105 |
|
</target> |
106 |
|
|
107 |
|
|
108 |
+ |
|
109 |
|
<target name="jar" |
110 |
< |
depends="configure-emulation, init-jar, native-jar, emulation-jar" |
111 |
< |
description="Builds library jar from compiled sources"/> |
110 |
> |
depends="compile" |
111 |
> |
description="Builds library jar from compiled sources"> |
112 |
> |
|
113 |
> |
<mkdir dir="${build.lib.dir}"/> |
114 |
> |
|
115 |
> |
<jar destfile="${product.jar}"> |
116 |
> |
<fileset dir="${build.classes.dir}"/> |
117 |
> |
</jar> |
118 |
> |
|
119 |
> |
</target> |
120 |
> |
|
121 |
|
|
122 |
|
|
123 |
|
<target name="test" |
125 |
|
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
126 |
|
|
127 |
|
|
106 |
– |
<target name="checkstyle" |
107 |
– |
depends="filter-src" |
108 |
– |
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"/> |
129 |
> |
<target name="docs" |
130 |
> |
description="Builds javadocs with custom tags to build folder"> |
131 |
|
|
132 |
< |
<checkstyle> |
133 |
< |
<formatter type="plain"/> <!-- also available: type="xml" --> |
134 |
< |
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
135 |
< |
</checkstyle> |
132 |
> |
<delete dir="${build.javadocs.dir}"/> |
133 |
> |
<mkdir dir="${build.javadocs.dir}"/> |
134 |
> |
|
135 |
> |
<javadoc destdir="${build.javadocs.dir}" |
136 |
> |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
137 |
> |
overview="${src.dir}/intro.html" |
138 |
> |
source="${build.sourcelevel}"> |
139 |
> |
|
140 |
> |
<tag name="revised" description="Last revised:"/> |
141 |
> |
<tag name="spec" description="Specified by:"/> |
142 |
> |
|
143 |
> |
<packageset dir="${src.dir}"/> |
144 |
> |
|
145 |
> |
</javadoc> |
146 |
|
|
147 |
|
</target> |
148 |
|
|
149 |
|
|
150 |
+ |
|
151 |
|
<target name="doccheck" |
152 |
< |
depends="filter-src" |
153 |
< |
description="Reports on javadoc style errors (not working yet)"> |
152 |
> |
depends="filter-doccheck" |
153 |
> |
description="Reports on javadoc style errors"> |
154 |
|
|
155 |
|
<delete dir="${build.doccheck.dir}"/> |
156 |
|
<mkdir dir="${build.doccheck.dir}"/> |
158 |
|
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
159 |
|
docletpath="${lib.dir}/doccheck.jar" |
160 |
|
destdir="${build.doccheck.dir}"> |
161 |
< |
<packageset dir="${build.filter.src.dir}"/> |
161 |
> |
<packageset dir="${build.dc-filter.dir}"/> |
162 |
|
</javadoc> |
163 |
|
|
164 |
+ |
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
165 |
+ |
|
166 |
|
</target> |
167 |
|
|
168 |
|
|
137 |
– |
<target name="docs" |
138 |
– |
depends="filter-src" |
139 |
– |
description="Builds javadocs with custom tags to build folder"> |
169 |
|
|
170 |
< |
<delete dir="${build.javadocs.dir}"/> |
171 |
< |
<mkdir dir="${build.javadocs.dir}"/> |
170 |
> |
<target name="checkstyle" |
171 |
> |
depends="filter-src" |
172 |
> |
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
173 |
|
|
174 |
< |
<javadoc destdir="${build.javadocs.dir}" |
175 |
< |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
146 |
< |
overview="${src.dir}/intro.html" |
147 |
< |
source="${build.docsourcelevel}"> |
174 |
> |
<taskdef resource="checkstyletask.properties" |
175 |
> |
classpath="${lib.dir}/checkstyle-all-3.1.jar"/> |
176 |
|
|
177 |
< |
<tag name="revised" description="Last revised:"/> |
150 |
< |
<tag name="spec" description="Specified by:"/> |
151 |
< |
<tag name="editor" description="Last edited by:"/> |
152 |
< |
<tag name="fixme" description="FIX ME:"/> |
177 |
> |
<mkdir dir="${build.checkstyle.dir}"/> |
178 |
|
|
179 |
< |
<packageset dir="${build.filter.src.dir}"/> |
179 |
> |
<checkstyle config="etc/checkstyle/sun_checks.xml" |
180 |
> |
failOnViolation="false"> |
181 |
> |
<formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/> |
182 |
> |
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
183 |
> |
</checkstyle> |
184 |
|
|
185 |
< |
</javadoc> |
185 |
> |
<style in="${build.checkstyle.dir}/checkstyle-report.xml" |
186 |
> |
out="${build.checkstyle.dir}/checkstyle-report.html" |
187 |
> |
style="${stylesheet.dir}/checkstyle-frames.xsl"/> |
188 |
|
|
189 |
|
</target> |
190 |
|
|
191 |
|
|
161 |
– |
<target name="strip" |
162 |
– |
depends="init, configure-compiler" |
163 |
– |
description="Strip generics from java source (not working yet)"> |
192 |
|
|
193 |
< |
<mkdir dir="${build.stripped.dir}"/> |
193 |
> |
<target name="dist" |
194 |
> |
depends="init, dist-clean, dist-jar, dist-docs" |
195 |
> |
description="Puts all distributable products in single hierarchy"/> |
196 |
|
|
167 |
– |
<!-- |
168 |
– |
# javac -s doesn't reliably generate compilable code. It generates |
169 |
– |
# bridge methods (marked as "synthetic") that can have identical |
170 |
– |
# signatures to existing methods except for the return value. |
171 |
– |
--> |
172 |
– |
<javac srcdir="${src.dir}" |
173 |
– |
destdir="${build.stripped.dir}" |
174 |
– |
debug="${build.debug}" |
175 |
– |
debuglevel="${build.debuglevel}" |
176 |
– |
deprecation="${build.deprecation}" |
177 |
– |
source="${build.sourcelevel}" |
178 |
– |
fork="true"> |
197 |
|
|
180 |
– |
<bootclasspath refid="javac.bootclasspath"/> |
181 |
– |
<compilerarg line="${build.javac.args} -s"/> |
198 |
|
|
199 |
< |
</javac> |
199 |
> |
<target name="release" |
200 |
> |
depends="dist" |
201 |
> |
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
202 |
> |
|
203 |
> |
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
204 |
> |
|
205 |
> |
<jar basedir="${basedir}" destfile="${release.jar}"> |
206 |
> |
<!-- <exclude name="build/**"/> --> |
207 |
> |
<exclude name="${release.jar}"/> |
208 |
> |
<exclude name="user.properties"/> |
209 |
> |
<exclude name="etc/notes/**"/> |
210 |
> |
<exclude name="src/emulation/**"/> |
211 |
> |
<exclude name="**/SyntaxTest.java"/> |
212 |
> |
<exclude name="**/SuperfluousAbstract.java"/> |
213 |
> |
</jar> |
214 |
|
|
215 |
|
</target> |
216 |
|
|
217 |
|
|
188 |
– |
<target name="dist" |
189 |
– |
depends="init, dist-clean, dist-jar, dist-docs" |
190 |
– |
description="Puts all distributable products in single hierarchy"/> |
191 |
– |
|
218 |
|
|
219 |
|
<target name="clean" |
220 |
|
description="Removes all build products"> |
226 |
|
</target> |
227 |
|
|
228 |
|
|
229 |
+ |
|
230 |
|
<target name="dist-clean" |
231 |
|
description="Removes all build and distribution products"> |
232 |
|
|
235 |
|
</target> |
236 |
|
|
237 |
|
|
238 |
+ |
|
239 |
|
<target name="dist-docs" |
212 |
– |
depends="filter-src" |
240 |
|
description="Builds javadocs without custom tags to dist folder"> |
241 |
|
|
242 |
|
<delete dir="${dist.javadocs.dir}"/> |
243 |
|
<mkdir dir="${dist.javadocs.dir}"/> |
244 |
|
|
245 |
|
<javadoc destdir="${dist.javadocs.dir}" |
246 |
< |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
246 |
> |
link="http://java.sun.com/j2se/1.4.2/docs/api" |
247 |
|
overview="${src.dir}/intro.html" |
248 |
< |
source="${build.docsourcelevel}"> |
248 |
> |
source="${build.sourcelevel}"> |
249 |
|
|
250 |
< |
<packageset dir="${build.filter.src.dir}"/> |
250 |
> |
<packageset dir="${src.dir}"/> |
251 |
|
|
252 |
|
</javadoc> |
253 |
|
|
263 |
|
<!-- Version is kept in a separate file --> |
264 |
|
<loadfile property="version" srcFile="version.properties"/> |
265 |
|
<echo>Building JSR-166 version ${version}</echo> |
266 |
< |
|
240 |
< |
</target> |
241 |
< |
|
242 |
< |
|
243 |
< |
<target name="init-jar"> |
244 |
< |
|
245 |
< |
<mkdir dir="${build.lib.dir}"/> |
246 |
< |
|
247 |
< |
</target> |
248 |
< |
|
249 |
< |
|
250 |
< |
<target name="native-jar" |
251 |
< |
depends="compile" |
252 |
< |
unless="build.emulation.true"> |
253 |
< |
|
254 |
< |
<jar destfile="${product.jar}"> |
255 |
< |
<fileset dir="${build.classes.dir}"/> |
256 |
< |
</jar> |
257 |
< |
|
258 |
< |
</target> |
259 |
< |
|
260 |
< |
|
261 |
< |
<target name="compile-emulation" |
262 |
< |
depends="init, configure-compiler" |
263 |
< |
if="build.emulation.true"> |
264 |
< |
|
265 |
< |
<mkdir dir="${build.emulation.dir}"/> |
266 |
< |
|
267 |
< |
<javac srcdir="${emulation.src.dir}" |
268 |
< |
destdir="${build.emulation.dir}" |
269 |
< |
debug="${build.debug}" |
270 |
< |
debuglevel="${build.debuglevel}" |
271 |
< |
deprecation="${build.deprecation}" |
272 |
< |
source="${build.sourcelevel}" |
273 |
< |
fork="true"> |
274 |
< |
|
275 |
< |
<bootclasspath refid="javac.bootclasspath"/> |
276 |
< |
<compilerarg line="${build.javac.args}"/> |
277 |
< |
|
278 |
< |
</javac> |
279 |
< |
|
280 |
< |
</target> |
281 |
< |
|
282 |
< |
|
283 |
< |
<target name="emulation-jar" |
284 |
< |
depends="compile-emulation" |
285 |
< |
if="build.emulation.true"> |
286 |
< |
|
287 |
< |
|
288 |
< |
<jar destfile="${product.jar}" duplicate="add"> |
289 |
< |
<fileset dir="${build.classes.dir}"> |
290 |
< |
<patternset refid="emulation.excludes"/> |
291 |
< |
</fileset> |
292 |
< |
<fileset dir="${build.emulation.dir}"/> |
293 |
< |
</jar> |
266 |
> |
<echo>java.home is ${java.home}</echo> |
267 |
|
|
268 |
|
</target> |
269 |
|
|
283 |
|
|
284 |
|
<javac srcdir="${ant.src.dir}" |
285 |
|
destdir="${build.ant.dir}" |
286 |
< |
source="1.4" |
314 |
< |
/> |
286 |
> |
source="1.4"/> |
287 |
|
|
288 |
|
</target> |
289 |
|
|
302 |
|
<copy todir="${build.filter.src.dir}"> |
303 |
|
<fileset dir="${src.dir}"> |
304 |
|
<exclude name="**/*.html"/> |
305 |
< |
<patternset refid="emulation.excludes"/> |
305 |
> |
<!-- Files excluded from dist-docs --> |
306 |
> |
<exclude name="java/util/Random.*"/> |
307 |
> |
<exclude name="sun/misc/Unsafe.*"/> |
308 |
|
</fileset> |
309 |
+ |
<!-- |
310 |
|
<filterchain> |
311 |
+ |
--> |
312 |
+ |
|
313 |
+ |
<!-- |
314 |
+ |
# This filter gets rid of angle-bracketed type parameters |
315 |
+ |
# so that javadoc can run on the result. The following |
316 |
+ |
# heuristic seems to work: |
317 |
+ |
# |
318 |
+ |
# For all lines not starting with space(s)-asterisk-space(s), |
319 |
+ |
# replace <something> with a space, where there may be more |
320 |
+ |
# than one right angle bracket at the end, and "something" |
321 |
+ |
# must not contain parens or pipes. (This may need some |
322 |
+ |
# tweaking.) |
323 |
+ |
--> |
324 |
+ |
|
325 |
+ |
<!-- |
326 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
327 |
|
classpath="${build.ant.dir}"> |
338 |
– |
<!-- |
339 |
– |
# These arguments are to get rid of angle-bracketed type |
340 |
– |
# parameters so that javadoc can run on the result. The |
341 |
– |
# following heuristic that seems to work: |
342 |
– |
# |
343 |
– |
# For all lines not starting with space(s)-asterisk-space(s), |
344 |
– |
# replace <something> with a space, where there may be more |
345 |
– |
# than one right angle bracket at the end, and "something" |
346 |
– |
# must not contain parens or pipes. (This may need some |
347 |
– |
# tweaking.) |
348 |
– |
--> |
328 |
|
<param name="notmatching" value="^\s+\*\s.*$"/> |
329 |
< |
<param name="pattern" value="<[^|>()]+?>+"/> |
329 |
> |
<param name="pattern" value="<[^|>()]+?>+"/> |
330 |
|
<param name="replacement" value=" "/> |
331 |
|
</filterreader> |
332 |
+ |
--> |
333 |
+ |
|
334 |
+ |
<!-- |
335 |
+ |
</filterchain> |
336 |
+ |
--> |
337 |
+ |
</copy> |
338 |
+ |
|
339 |
+ |
</target> |
340 |
+ |
|
341 |
+ |
|
342 |
+ |
<target name="filter-doccheck" |
343 |
+ |
depends="filter-src"> |
344 |
+ |
|
345 |
+ |
<mkdir dir="${build.dc-filter.dir}"/> |
346 |
+ |
|
347 |
+ |
<copy todir="${build.dc-filter.dir}"> |
348 |
+ |
<fileset dir="${build.filter.src.dir}"> |
349 |
+ |
<include name="**/*.html"/> |
350 |
+ |
</fileset> |
351 |
+ |
</copy> |
352 |
+ |
|
353 |
+ |
<property name="generic.declarations" |
354 |
+ |
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 {}" |
355 |
+ |
/> |
356 |
+ |
|
357 |
+ |
<copy todir="${build.dc-filter.dir}"> |
358 |
+ |
<fileset dir="${build.filter.src.dir}"> |
359 |
+ |
<exclude name="**/*.html"/> |
360 |
+ |
</fileset> |
361 |
+ |
<filterchain> |
362 |
+ |
<!-- |
363 |
+ |
# These two filters try to make the source look like |
364 |
+ |
# something that doccheck can process. The first removes |
365 |
+ |
# -source 1.4 assertions and the second adds in a bunch |
366 |
+ |
# of single letter public nested marker interfaces so that |
367 |
+ |
# the generic type parameters are recognized. |
368 |
+ |
--> |
369 |
+ |
|
370 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
371 |
|
classpath="${build.ant.dir}"> |
372 |
< |
<!-- |
373 |
< |
# These arguments are to uncomment lines beginning with |
374 |
< |
# "//@" so that javadoc can see imports that are needed |
358 |
< |
# to resolve links but that shouldn't be in the compiled |
359 |
< |
# code. |
360 |
< |
--> |
361 |
< |
<param name="matching" value="^//@.*$"/> |
362 |
< |
<param name="pattern" value="^//@"/> |
363 |
< |
<param name="replacement" value=""/> |
372 |
> |
<param name="matching" value="^\s*assert[\s ].*$"/> |
373 |
> |
<param name="pattern" value="assert"/> |
374 |
> |
<param name="replacement" value="//assert"/> |
375 |
|
</filterreader> |
376 |
+ |
|
377 |
+ |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
378 |
+ |
classpath="${build.ant.dir}"> |
379 |
+ |
<param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
380 |
+ |
<param name="pattern" value="$"/> |
381 |
+ |
<param name="replacement" value=" ${generic.declarations}"/> |
382 |
+ |
</filterreader> |
383 |
+ |
|
384 |
|
</filterchain> |
385 |
|
</copy> |
386 |
|
|
392 |
|
|
393 |
|
<mkdir dir="${build.testcases.dir}"/> |
394 |
|
|
395 |
+ |
<javac srcdir="${tck.src.dir}" |
396 |
+ |
destdir="${build.testcases.dir}" |
397 |
+ |
debug="${build.debug}" |
398 |
+ |
debuglevel="${build.debuglevel}" |
399 |
+ |
deprecation="${build.deprecation}" |
400 |
+ |
source="${build.sourcelevel}" |
401 |
+ |
fork="true"> |
402 |
+ |
|
403 |
+ |
<compilerarg value="${bootclasspath.args}"/> |
404 |
+ |
<compilerarg line="${build.args}"/> |
405 |
+ |
|
406 |
+ |
<classpath refid="test.classpath"/> |
407 |
+ |
|
408 |
+ |
</javac> |
409 |
+ |
|
410 |
|
<javac srcdir="${test.src.dir}" |
411 |
|
destdir="${build.testcases.dir}" |
412 |
|
debug="${build.debug}" |
415 |
|
source="${build.sourcelevel}" |
416 |
|
fork="true"> |
417 |
|
|
418 |
+ |
<include name="jsr166/test/**"/> |
419 |
+ |
|
420 |
+ |
<compilerarg value="${bootclasspath.args}"/> |
421 |
+ |
<compilerarg line="${build.args}"/> |
422 |
+ |
|
423 |
|
<classpath refid="test.classpath"/> |
385 |
– |
<bootclasspath refid="javac.bootclasspath"/> |
386 |
– |
<compilerarg line="${build.javac.args}"/> |
424 |
|
|
425 |
|
</javac> |
426 |
|
|
427 |
+ |
<!-- |
428 |
+ |
<javac srcdir="${jtreg.src.dir}" |
429 |
+ |
destdir="${build.testcases.dir}" |
430 |
+ |
debug="${build.debug}" |
431 |
+ |
debuglevel="${build.debuglevel}" |
432 |
+ |
deprecation="${build.deprecation}" |
433 |
+ |
source="${build.sourcelevel}" |
434 |
+ |
fork="true"> |
435 |
+ |
|
436 |
+ |
<compilerarg value="${bootclasspath.args}"/> |
437 |
+ |
<compilerarg line="${build.args}"/> |
438 |
+ |
|
439 |
+ |
<classpath refid="test.classpath"/> |
440 |
+ |
|
441 |
+ |
</javac> |
442 |
+ |
--> |
443 |
+ |
|
444 |
|
</target> |
445 |
|
|
446 |
|
|
459 |
|
dir="${build.reports.dir}" |
460 |
|
fork="true"> |
461 |
|
|
462 |
< |
<jvmarg value="${test.bootclasspath.arg}"/> |
462 |
> |
<jvmarg value="${bootclasspath.args}"/> |
463 |
> |
<jvmarg value="-server"/> |
464 |
> |
<jvmarg value="-showversion"/> |
465 |
> |
|
466 |
> |
<classpath refid="test.classpath"/> |
467 |
|
|
468 |
|
<formatter type="xml"/> |
469 |
|
|
470 |
< |
<batchtest todir="${build.reports.dir}"> |
470 |
> |
<batchtest todir="${build.reports.dir}" unless="no.test.tck"> |
471 |
> |
<fileset dir="${tck.src.dir}"> |
472 |
> |
<include name="**/${testcase}Test.java"/> |
473 |
> |
</fileset> |
474 |
> |
</batchtest> |
475 |
> |
|
476 |
> |
<batchtest todir="${build.reports.dir}" if="do.test.old"> |
477 |
|
<fileset dir="${test.src.dir}"> |
478 |
+ |
<include name="jsr166/test/**/${testcase}Test.java"/> |
479 |
+ |
</fileset> |
480 |
+ |
</batchtest> |
481 |
+ |
|
482 |
+ |
<!-- |
483 |
+ |
<batchtest todir="${build.reports.dir}" if="do.test.jtreg"> |
484 |
+ |
<fileset dir="${jtreg.src.dir}"> |
485 |
|
<include name="**/${testcase}Test.java"/> |
486 |
|
</fileset> |
487 |
|
</batchtest> |
488 |
+ |
--> |
489 |
|
|
490 |
|
</junit> |
491 |
|
|
495 |
|
<target name="report-tests" |
496 |
|
depends="run-tests"> |
497 |
|
|
498 |
< |
<!-- Sets junit.report.format to frames if Xalan is present, |
498 |
> |
<!-- Sets junit.report.format to frames if redirection is present, |
499 |
|
otherwise sets it to noframes. --> |
500 |
|
<available property="junit.report.format" |
501 |
|
value="frames" |
520 |
|
|
521 |
|
<target name="configure-compiler"> |
522 |
|
|
523 |
< |
<property name="gjc.version" |
452 |
< |
value="2.0"/> |
523 |
> |
<property name="unchecked.option" value="-Xlint:unchecked"/> |
524 |
|
|
525 |
< |
<condition property="build.novariance" value="-novariance"> |
526 |
< |
<and> |
456 |
< |
<equals arg1="${gjc.version}" arg2="2.0"/> |
457 |
< |
<or> |
458 |
< |
<not><isset property="gjc.novariance"/></not> |
459 |
< |
<istrue value="${gjc.novariance}"/> |
460 |
< |
</or> |
461 |
< |
</and> |
525 |
> |
<condition property="warnunchecked.arg" value="${unchecked.option}"> |
526 |
> |
<istrue value="${build.warnunchecked}"/> |
527 |
|
</condition> |
528 |
|
|
529 |
< |
<property name="build.novariance" |
465 |
< |
value=""/> |
529 |
> |
<property name="warnunchecked.arg" value=""/> |
530 |
|
|
467 |
– |
<property name="gjc.dir" |
468 |
– |
value="${lib.dir}/gjc"/> |
531 |
|
|
532 |
< |
<property name="javac.jar" |
533 |
< |
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
532 |
> |
<!-- Common options in javac invocations --> |
533 |
> |
<property name="build.args" value="${warnunchecked.arg}"/> |
534 |
|
|
535 |
< |
<property name="collect.jar" |
474 |
< |
location="${gjc.dir}/${gjc.version}/collect${build.novariance}.jar"/> |
535 |
> |
</target> |
536 |
|
|
537 |
|
|
538 |
< |
<condition property="build.warnunchecked" value="-warnunchecked"> |
539 |
< |
<istrue value="${gjc.warnunchecked}"/> |
479 |
< |
</condition> |
538 |
> |
<target name="configure-tests" |
539 |
> |
depends="configure-compiler"> |
540 |
|
|
541 |
< |
<property name="build.warnunchecked" value=""/> |
541 |
> |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
542 |
> |
<available property="junit.available" |
543 |
> |
classname="junit.framework.Protectable"/> |
544 |
|
|
545 |
< |
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
546 |
< |
<or> |
547 |
< |
<and> |
486 |
< |
<not><isset property="build.nothreads"/></not> |
487 |
< |
<equals arg1="${gjc.version}" arg2="2.0"/> |
488 |
< |
</and> |
489 |
< |
<istrue value="${build.nothreads}"/> |
490 |
< |
</or> |
491 |
< |
</condition> |
545 |
> |
<!-- Xalan --> |
546 |
> |
<available property="xalan.available" |
547 |
> |
classname="org.apache.xalan.Version"/> |
548 |
|
|
549 |
|
|
550 |
+ |
<!-- Ant 1.6beta and later don't need or want this check --> |
551 |
|
<!-- |
552 |
< |
! Bootclasspath munging for source compilation. |
553 |
< |
--> |
552 |
> |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
553 |
> |
unless="junit.available"/> |
554 |
|
|
555 |
< |
<path id="javac.bootclasspath.prefix"> |
556 |
< |
<!-- <pathelement location="${src.dir}"/> --> |
557 |
< |
<pathelement location="${javac.jar}"/> |
501 |
< |
</path> |
555 |
> |
<fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests" |
556 |
> |
unless="xalan.available"/> |
557 |
> |
--> |
558 |
|
|
559 |
< |
<path id="javac.bootclasspath"> |
504 |
< |
<!-- <pathelement location="${src.dir}"/> --> |
505 |
< |
<pathelement location="${collect.jar}"/> |
506 |
< |
<pathelement location="${rt.jar}"/> |
507 |
< |
</path> |
559 |
> |
</target> |
560 |
|
|
509 |
– |
<!-- Flatten bootclasspath prefix into a platform-appropriate string --> |
510 |
– |
<property name="javac.bootclasspath.prefix" |
511 |
– |
refid="javac.bootclasspath.prefix"/> |
512 |
– |
|
513 |
– |
<!-- Turn the flattened bootclasspath prefix into a javac argument --> |
514 |
– |
<property name="build.bootclasspath.arg" |
515 |
– |
value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/> |
516 |
– |
|
517 |
– |
<!-- Flatten bootclasspath for trace message --> |
518 |
– |
<property name="javac.bootclasspath" |
519 |
– |
refid="javac.bootclasspath"/> |
561 |
|
|
521 |
– |
<!-- Common options in javac invocations --> |
522 |
– |
<property name="build.javac.args" |
523 |
– |
value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/> |
562 |
|
|
563 |
< |
<echo>javac ${build.javac.args}</echo> |
564 |
< |
<echo>bootclasspath=${javac.bootclasspath}</echo> |
563 |
> |
<!-- Anthill targets --> |
564 |
> |
|
565 |
> |
<target name="anthill-build"> |
566 |
> |
|
567 |
> |
<!-- Override this in user.properties --> |
568 |
> |
<property name="tiger.home" location="e:/j2sdk1.5.0"/> |
569 |
|
|
570 |
+ |
<exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java"> |
571 |
+ |
<arg value="-Xmx256000000"/> |
572 |
+ |
<!-- classpath of new JVM --> |
573 |
+ |
<arg value="-classpath"/> <arg path="${java.class.path}"/> |
574 |
+ |
<!-- location of Ant home directory --> |
575 |
+ |
<arg value="-Dant.home=${ant.home}"/> |
576 |
+ |
<!-- the Ant main class --> |
577 |
+ |
<arg value="org.apache.tools.ant.Main"/> |
578 |
+ |
<!-- The build file --> |
579 |
+ |
<arg value="-buildfile"/> <arg value="build.xml"/> |
580 |
+ |
<!-- the target to build on the new Ant instance --> |
581 |
+ |
<arg value="-DJAVA_HOME=${tiger.home}"/> |
582 |
+ |
<arg value="do-anthill-build"/> |
583 |
+ |
</exec> |
584 |
|
</target> |
585 |
|
|
586 |
+ |
<target name="do-anthill-build" |
587 |
+ |
depends="jar, test, docs, dist-docs"/> |
588 |
|
|
589 |
< |
<target name="prepare-src" |
532 |
< |
depends="configure-compiler" |
533 |
< |
if="prepare.src.dir"> |
589 |
> |
<target name="anthill-publish"> |
590 |
|
|
591 |
< |
<mkdir dir="${prepare.src.dir}"/> |
592 |
< |
<copy todir="${prepare.src.dir}"> |
593 |
< |
<fileset dir="${src.dir}"> |
594 |
< |
<exclude name="java/lang/**"/> |
591 |
> |
<copy todir="${deployDir}/docs/private"> |
592 |
> |
<fileset dir="${build.javadocs.dir}"/> |
593 |
> |
</copy> |
594 |
> |
|
595 |
> |
<copy todir="${deployDir}/docs/public"> |
596 |
> |
<fileset dir="${dist.javadocs.dir}"/> |
597 |
> |
</copy> |
598 |
> |
|
599 |
> |
<copy tofile="${deployDir}/index.html" |
600 |
> |
file="${basedir}/etc/anthill-index.html"/> |
601 |
> |
|
602 |
> |
<copy todir="${deployDir}/notes"> |
603 |
> |
<fileset dir="${basedir}/etc/notes"/> |
604 |
> |
</copy> |
605 |
> |
|
606 |
> |
</target> |
607 |
> |
|
608 |
> |
|
609 |
> |
|
610 |
> |
<!-- Various demos and test programs --> |
611 |
> |
|
612 |
> |
|
613 |
> |
<target name="sample" depends="init, configure-compiler" |
614 |
> |
description="Standalone demo program"> |
615 |
> |
|
616 |
> |
<mkdir dir="${build.testcases.dir}"/> |
617 |
> |
|
618 |
> |
<javac srcdir="${test.src.dir}" |
619 |
> |
destdir="${build.testcases.dir}" |
620 |
> |
debug="${build.debug}" |
621 |
> |
debuglevel="${build.debuglevel}" |
622 |
> |
deprecation="${build.deprecation}" |
623 |
> |
source="${build.sourcelevel}" |
624 |
> |
fork="true"> |
625 |
> |
|
626 |
> |
<include name="jsr166/test/Sample.java"/> |
627 |
> |
|
628 |
> |
</javac> |
629 |
> |
|
630 |
> |
<copy todir="${build.testcases.dir}"> |
631 |
> |
<fileset dir="${test.src.dir}"> |
632 |
> |
<include name="**/*.properties"/> |
633 |
|
</fileset> |
634 |
|
</copy> |
635 |
|
|
636 |
+ |
|
637 |
+ |
<java classname="jsr166.test.Sample" fork="true"> |
638 |
+ |
<classpath refid="test.classpath"/> |
639 |
+ |
<!-- <jvmarg value="-ea"/> --> |
640 |
+ |
<!-- <jvmarg value="-server"/> --> |
641 |
+ |
<!-- <arg value="1000"/> --> |
642 |
+ |
</java> |
643 |
|
</target> |
644 |
|
|
645 |
|
|
646 |
< |
<target name="configure-emulation"> |
646 |
> |
<target name="loops" depends="init, configure-compiler" |
647 |
> |
description="Benchmark from Doug Lea's AQS paper"> |
648 |
|
|
649 |
< |
<condition property="build.emulation.true"> |
650 |
< |
<or> |
651 |
< |
<and> |
652 |
< |
<os family="windows"/> |
653 |
< |
<not> |
654 |
< |
<isset property="build.emulation"/> |
655 |
< |
</not> |
656 |
< |
</and> |
657 |
< |
<istrue value="${build.emulation}"/> |
658 |
< |
</or> |
659 |
< |
</condition> |
649 |
> |
<mkdir dir="${build.loops.dir}"/> |
650 |
> |
|
651 |
> |
<javac srcdir="${loops.src.dir}" |
652 |
> |
destdir="${build.loops.dir}" |
653 |
> |
debug="${build.debug}" |
654 |
> |
debuglevel="${build.debuglevel}" |
655 |
> |
deprecation="${build.deprecation}" |
656 |
> |
source="${build.sourcelevel}" |
657 |
> |
fork="true"> |
658 |
> |
|
659 |
> |
<compilerarg line="${build.args}"/> |
660 |
> |
<classpath refid="loops.classpath"/> |
661 |
> |
|
662 |
> |
</javac> |
663 |
> |
|
664 |
> |
<java classname="ALoops" fork="true"> |
665 |
> |
<classpath refid="loops.classpath"/> |
666 |
> |
</java> |
667 |
|
|
668 |
|
</target> |
669 |
|
|
670 |
|
|
671 |
< |
<target name="configure-tests"> |
671 |
> |
<target name="compile-j1" depends="init, configure-compiler"> |
672 |
|
|
673 |
< |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
565 |
< |
<available property="junit.available" |
566 |
< |
classname="junit.framework.Protectable"/> |
673 |
> |
<mkdir dir="${build.j1.dir}"/> |
674 |
|
|
675 |
< |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
676 |
< |
unless="junit.available"/> |
675 |
> |
<javac srcdir="${j1.src.dir}" |
676 |
> |
destdir="${build.j1.dir}" |
677 |
> |
debug="${build.debug}" |
678 |
> |
debuglevel="${build.debuglevel}" |
679 |
> |
deprecation="${build.deprecation}" |
680 |
> |
source="${build.sourcelevel}" |
681 |
> |
fork="true"> |
682 |
> |
|
683 |
> |
<compilerarg line="${build.args}"/> |
684 |
> |
<classpath refid="j1.classpath"/> |
685 |
> |
|
686 |
> |
</javac> |
687 |
|
|
688 |
+ |
</target> |
689 |
+ |
|
690 |
+ |
|
691 |
+ |
<target name="sw" depends="compile-j1" |
692 |
+ |
description="Runs the SwingWorker demo"> |
693 |
|
|
694 |
|
<!-- |
695 |
< |
! Bootclasspath munging for testing, so JUnit can test our local |
696 |
< |
! modifications to java.*. |
697 |
< |
--> |
698 |
< |
|
699 |
< |
<path id="test.classpath"> |
700 |
< |
<pathelement location="${product.jar}"/> |
701 |
< |
<pathelement location="${build.testcases.dir}"/> |
702 |
< |
<pathelement location="${junit.jar}"/> |
695 |
> |
<java classname="jsr166.swing.SwingWorkerDemo" fork="true"> |
696 |
> |
<classpath refid="j1.classpath"/> |
697 |
> |
</java> |
698 |
> |
--> |
699 |
> |
|
700 |
> |
<copy todir="${build.j1.dir}" file="${j1.src.dir}/jsr166/swing/SwingWorker.html"/> |
701 |
> |
|
702 |
> |
<exec dir="${build.j1.dir}" executable="appletviewer.exe"> |
703 |
> |
<arg value="${build.j1.dir}/SwingWorker.html"/> |
704 |
> |
</exec> |
705 |
> |
|
706 |
> |
</target> |
707 |
> |
|
708 |
> |
<target name="j1" depends="compile-j1" |
709 |
> |
description="Runs a standalone JavaOne program"> |
710 |
> |
|
711 |
> |
<java classname="jsr166.misc.SortedEnumSet" fork="true"> |
712 |
> |
<classpath refid="j1.classpath"/> |
713 |
> |
</java> |
714 |
> |
|
715 |
> |
</target> |
716 |
> |
|
717 |
> |
|
718 |
> |
<target name="test-j1" depends="compile-j1" |
719 |
> |
description="Runs testcases from the JavaOne source directories"> |
720 |
> |
|
721 |
> |
<junit printsummary="true" |
722 |
> |
showoutput="true" |
723 |
> |
errorProperty="junit.failed" |
724 |
> |
failureProperty="junit.failed" |
725 |
> |
dir="${build.j1.dir}" |
726 |
> |
fork="true"> |
727 |
> |
|
728 |
> |
<!-- <jvmarg value="-server"/> --> |
729 |
> |
<classpath refid="j1.classpath"/> |
730 |
> |
<formatter type="xml"/> |
731 |
> |
|
732 |
> |
<batchtest todir="${build.j1.dir}"> |
733 |
> |
<fileset dir="${j1.src.dir}"> |
734 |
> |
<include name="**/*Test.java"/> |
735 |
> |
</fileset> |
736 |
> |
</batchtest> |
737 |
> |
|
738 |
> |
</junit> |
739 |
> |
|
740 |
> |
<available property="junit.report.format" |
741 |
> |
value="frames" |
742 |
> |
classname="org.apache.xalan.lib.Redirect"/> |
743 |
> |
<property name="junit.report.format" value="noframes"/> |
744 |
> |
|
745 |
> |
<junitreport todir="${build.j1.dir}"> |
746 |
> |
<fileset dir="${build.j1.dir}"> |
747 |
> |
<include name="TEST-*.xml"/> |
748 |
> |
</fileset> |
749 |
> |
<report styledir="${stylesheet.dir}" |
750 |
> |
format="${junit.report.format}" |
751 |
> |
todir="${build.j1.dir}" |
752 |
> |
/> |
753 |
> |
</junitreport> |
754 |
> |
|
755 |
> |
<fail message="Test Cases Failed" if="junit.failed"/> |
756 |
> |
|
757 |
> |
</target> |
758 |
> |
|
759 |
> |
|
760 |
> |
|
761 |
> |
<!-- C++ and JNI definitions and demos --> |
762 |
> |
|
763 |
> |
<target name="configure-cpp"> |
764 |
> |
|
765 |
> |
<!-- Define tasks and types --> |
766 |
> |
|
767 |
> |
<path id="cpptasks.path"> |
768 |
> |
<pathelement location="${lib.dir}/cpptasks.jar"/> |
769 |
|
</path> |
770 |
+ |
<taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/> |
771 |
+ |
<typedef resource="cpptasks.types" classpathref="cpptasks.path"/> |
772 |
|
|
773 |
< |
<!-- Flatten test classpath into a platform-appropriate string --> |
584 |
< |
<property name="test.classpath" refid="test.classpath"/> |
773 |
> |
<!-- Set platform property for JNI includes --> |
774 |
|
|
775 |
< |
<!-- Turn the flattened test classpath into a javac argument --> |
776 |
< |
<property name="test.bootclasspath.arg" |
777 |
< |
value='-Xbootclasspath/p:${test.classpath}'/> |
775 |
> |
<condition property="platform" value="linux"> |
776 |
> |
<os name="Linux"/> |
777 |
> |
</condition> |
778 |
> |
<condition property="platform" value="win32"> |
779 |
> |
<os family="windows"/> |
780 |
> |
</condition> |
781 |
> |
<condition property="platform" value="solaris"> |
782 |
> |
<os name="SunOS"/> |
783 |
> |
</condition> |
784 |
|
|
785 |
|
</target> |
786 |
|
|
787 |
|
|
788 |
+ |
<target name="cppdemo" depends="configure-cpp"> |
789 |
|
|
790 |
< |
<!-- Anthill targets --> |
790 |
> |
<mkdir dir="${build.dir}"/> |
791 |
|
|
792 |
< |
<target name="anthill-build" |
793 |
< |
depends="jar, test, docs, dist-docs"/> |
792 |
> |
<cc multithreaded="true" |
793 |
> |
name="g++" |
794 |
> |
objdir="${build.dir}" |
795 |
> |
outfile="${build.dir}/CppDemo"> |
796 |
> |
<fileset dir="${test.src.dir}" includes="CppDemo.cpp"/> |
797 |
> |
<libset libs="stdc++"/> |
798 |
> |
</cc> |
799 |
|
|
800 |
< |
<target name="anthill-publish"> |
800 |
> |
<exec executable="${build.dir}/CppDemo"> |
801 |
> |
<arg line="count in word frequency of word in command line count"/> |
802 |
> |
</exec> |
803 |
|
|
804 |
< |
<copy todir="${deployDir}/docs/private"> |
602 |
< |
<fileset dir="${build.javadocs.dir}"/> |
603 |
< |
</copy> |
804 |
> |
</target> |
805 |
|
|
605 |
– |
<copy todir="${deployDir}/docs/public"> |
606 |
– |
<fileset dir="${dist.javadocs.dir}"/> |
607 |
– |
</copy> |
806 |
|
|
807 |
< |
<copy tofile="${deployDir}/index.html" |
610 |
< |
file="${basedir}/etc/anthill-index.html"/> |
807 |
> |
<target name="jnidemo" depends="init, configure-compiler, configure-cpp"> |
808 |
|
|
809 |
< |
<copy todir="${deployDir}/notes"> |
810 |
< |
<fileset dir="${basedir}/etc/notes"/> |
811 |
< |
</copy> |
809 |
> |
<mkdir dir="${build.testcases.dir}"/> |
810 |
> |
|
811 |
> |
<javac srcdir="${test.src.dir}" |
812 |
> |
destdir="${build.testcases.dir}" |
813 |
> |
debug="${build.debug}" |
814 |
> |
debuglevel="${build.debuglevel}" |
815 |
> |
deprecation="${build.deprecation}" |
816 |
> |
source="${build.sourcelevel}" |
817 |
> |
fork="true"> |
818 |
> |
<compilerarg value="${bootclasspath.args}"/> |
819 |
> |
<compilerarg line="${build.args}"/> |
820 |
> |
<classpath refid="test.classpath"/> |
821 |
> |
<include name="JniDemo.java"/> |
822 |
> |
</javac> |
823 |
> |
|
824 |
> |
<javah destdir="${build.testcases.dir}" |
825 |
> |
classpathref="test.classpath"> |
826 |
> |
<class name="JniDemo"/> |
827 |
> |
</javah> |
828 |
> |
|
829 |
> |
<cc multithreaded="true" |
830 |
> |
name="g++" |
831 |
> |
objdir="${build.dir}" |
832 |
> |
outfile="${build.dir}/JniDemo" |
833 |
> |
outtype="shared"> |
834 |
> |
|
835 |
> |
<compiler> |
836 |
> |
<defineset> |
837 |
> |
<define name="__int64" value="long long"/> |
838 |
> |
</defineset> |
839 |
> |
<includepath location="${java.home}/../include"/> |
840 |
> |
<includepath location="${java.home}/../include/${platform}"/> |
841 |
> |
<compilerarg value="-mno-cygwin"/> |
842 |
> |
</compiler> |
843 |
> |
|
844 |
> |
<linker> |
845 |
> |
<linkerarg value="--add-stdcall-alias"/> |
846 |
> |
</linker> |
847 |
> |
|
848 |
> |
<includepath location="${build.testcases.dir}"/> |
849 |
> |
|
850 |
> |
<fileset dir="${test.src.dir}" includes="JniDemo.cpp"/> |
851 |
> |
|
852 |
> |
<libset libs="stdc++"/> |
853 |
> |
|
854 |
> |
</cc> |
855 |
> |
|
856 |
> |
<!-- Necessary if windows, harmless if not --> |
857 |
> |
<copy file="${build.dir}/libJniDemo.so" tofile="${build.dir}/JniDemo.dll"/> |
858 |
> |
|
859 |
> |
<java classname="JniDemo" fork="true"> |
860 |
> |
<!-- Watch out: path separator hardwired to semicolon here! --> |
861 |
> |
<sysproperty key="java.library.path" path="${java.library.path};${build.dir}"/> |
862 |
> |
<classpath refid="test.classpath"/> |
863 |
> |
<arg line="count in word frequency of word in command line count"/> |
864 |
> |
</java> |
865 |
|
|
866 |
|
</target> |
867 |
|
|
868 |
|
|
869 |
+ |
|
870 |
+ |
<!-- Backward compatibility, work in progress (some files not checked in) --> |
871 |
+ |
|
872 |
+ |
|
873 |
+ |
|
874 |
+ |
<property name="pretiger.src.dir" location="${build.dir}/pretiger/src"/> |
875 |
+ |
<property name="build.pretiger.dir" location="${build.dir}/pretiger/classes"/> |
876 |
+ |
<property name="pretiger.jar" location="${build.lib.dir}/jsr166-pretiger.jar"/> |
877 |
+ |
<property name="pretiger.sourcelevel" value="1.4"/> |
878 |
+ |
|
879 |
+ |
<target name="defang" |
880 |
+ |
depends="init" |
881 |
+ |
description="Generates pre-Tiger compatible source"> |
882 |
+ |
|
883 |
+ |
<delete dir="${pretiger.src.dir}"/> |
884 |
+ |
<mkdir dir="${pretiger.src.dir}"/> |
885 |
+ |
|
886 |
+ |
<exec executable="perl"> |
887 |
+ |
<arg file="etc/defang.pl"/> |
888 |
+ |
<!-- <arg value="-v"/> --> |
889 |
+ |
<arg value="-s"/> <arg file="${src.dir}"/> |
890 |
+ |
<arg value="-t"/> <arg file="${pretiger.src.dir}"/> |
891 |
+ |
</exec> |
892 |
+ |
|
893 |
+ |
</target> |
894 |
+ |
|
895 |
+ |
<target name="compile-pretiger" |
896 |
+ |
depends="init, configure-compiler, defang" |
897 |
+ |
description="Compiles pre-Tiger sources to build folder"> |
898 |
+ |
|
899 |
+ |
<mkdir dir="${build.pretiger.dir}"/> |
900 |
+ |
|
901 |
+ |
<javac srcdir="${pretiger.src.dir}" |
902 |
+ |
destdir="${build.pretiger.dir}" |
903 |
+ |
debug="${build.debug}" |
904 |
+ |
debuglevel="${build.debuglevel}" |
905 |
+ |
deprecation="${build.deprecation}" |
906 |
+ |
source="${pretiger.sourcelevel}" |
907 |
+ |
fork="true"> |
908 |
+ |
|
909 |
+ |
<compilerarg line="${build.args}"/> |
910 |
+ |
<exclude name="**/Thread.java"/> |
911 |
+ |
|
912 |
+ |
</javac> |
913 |
+ |
|
914 |
+ |
</target> |
915 |
+ |
|
916 |
+ |
<target name="pretiger" depends="compile-pretiger"> |
917 |
+ |
|
918 |
+ |
<mkdir dir="${build.lib.dir}"/> |
919 |
+ |
|
920 |
+ |
<jar destfile="${pretiger.jar}"> |
921 |
+ |
<fileset dir="${build.pretiger.dir}"> |
922 |
+ |
</fileset> |
923 |
+ |
</jar> |
924 |
+ |
|
925 |
+ |
</target> |
926 |
+ |
|
927 |
|
</project> |