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