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