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.loops.dir" location="${build.dir}/loops"/> |
34 |
|
<property name="build.lib.dir" location="${build.dir}/lib"/> |
36 |
– |
<property name="build.ant.dir" location="${build.dir}/ant"/> |
35 |
|
<property name="build.javadocs.dir" location="${build.dir}/javadocs"/> |
38 |
– |
<property name="build.sinjdocs.dir" location="${build.dir}/sinjdocs"/> |
39 |
– |
<property name="build.stripped.dir" location="${build.dir}/stripped"/> |
36 |
|
<property name="build.reports.dir" location="${build.dir}/reports"/> |
37 |
< |
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
38 |
< |
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
39 |
< |
<property name="build.filter.doccheck.dir" location="${build.dir}/filterdocchk"/> |
37 |
> |
<property name="build.jsr166x.dir" location="${build.dir}/jsr166x"/> |
38 |
> |
<property name="build.jsr166xlib.dir" location="${build.dir}/jsr166xlib"/> |
39 |
> |
<property name="build.jsr166xjavadocs.dir" location="${build.dir}/jsr166xjavadocs"/> |
40 |
> |
|
41 |
> |
<property name="build.jsr166y.dir" location="${build.dir}/jsr166y"/> |
42 |
> |
<property name="build.jsr166ylib.dir" location="${build.dir}/jsr166ylib"/> |
43 |
> |
<property name="build.jsr166yjavadocs.dir" location="${build.dir}/jsr166yjavadocs"/> |
44 |
> |
|
45 |
> |
<property name="build.extra166y.dir" location="${build.dir}/extra166y"/> |
46 |
> |
<property name="build.extra166ylib.dir" location="${build.dir}/extra166ylib"/> |
47 |
> |
<property name="build.extra166yjavadocs.dir" location="${build.dir}/extra166yjavadocs"/> |
48 |
|
|
49 |
|
<!-- Source locations --> |
50 |
|
<property name="src.dir" location="${basedir}/src/main"/> |
47 |
– |
<property name="emulation.src.dir" location="${basedir}/src/emulation"/> |
51 |
|
<property name="test.src.dir" location="${basedir}/src/test"/> |
52 |
< |
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
53 |
< |
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
52 |
> |
<property name="loops.src.dir" location="${basedir}/src/loops"/> |
53 |
> |
<property name="tck.src.dir" location="${test.src.dir}/tck"/> |
54 |
> |
<property name="jtreg.src.dir" location="${test.src.dir}/jtreg"/> |
55 |
|
<property name="lib.dir" location="${basedir}/lib"/> |
56 |
|
<property name="dist.dir" location="${basedir}/dist"/> |
57 |
+ |
<property name="topsrc.dir" location="${basedir}/src"/> |
58 |
+ |
<property name="jsr166xsrc.dir" location="${basedir}/src/jsr166x"/> |
59 |
+ |
<property name="jsr166ysrc.dir" location="${basedir}/src/jsr166y"/> |
60 |
+ |
<property name="extra166ysrc.dir" location="${basedir}/src/extra166y"/> |
61 |
|
|
62 |
|
<!-- Distribution locations --> |
63 |
|
<property name="dist.javadocs.dir" location="${dist.dir}/docs"/> |
64 |
+ |
<property name="dist.jsr166xjavadocs.dir" location="${dist.dir}/jsr166xdocs"/> |
65 |
+ |
<property name="dist.jsr166yjavadocs.dir" location="${dist.dir}/jsr166ydocs"/> |
66 |
+ |
<property name="dist.extra166yjavadocs.dir" location="${dist.dir}/extra166ydocs"/> |
67 |
|
|
68 |
|
<!-- Jar locations --> |
69 |
|
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
70 |
+ |
<property name="jsr166xproduct.jar" location="${build.jsr166xlib.dir}/jsr166x.jar"/> |
71 |
+ |
<property name="jsr166yproduct.jar" location="${build.jsr166ylib.dir}/jsr166y.jar"/> |
72 |
+ |
<property name="extra166yproduct.jar" location="${build.extra166ylib.dir}/extra166y.jar"/> |
73 |
|
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
60 |
– |
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
61 |
– |
<property name="sinjdoc.jar" location="${lib.dir}/sinjdoc.jar"/> |
74 |
|
|
75 |
+ |
<!-- Bootclasspath argument --> |
76 |
+ |
<property name="bootclasspath.args" value="-Xbootclasspath/p:${product.jar}"/> |
77 |
|
|
78 |
< |
<!-- Files excluded from dist-docs and emulation jar --> |
79 |
< |
<patternset id="unsafe.exclusion"> |
80 |
< |
<exclude name="java/util/Random.*"/> |
81 |
< |
<exclude name="sun/misc/Unsafe.*"/> |
82 |
< |
</patternset> |
83 |
< |
|
84 |
< |
<!-- Files excludes from emulation jar --> |
85 |
< |
<patternset id="atomic.exclusion"> |
86 |
< |
<exclude name="java/util/concurrent/atomic/AtomicBoolean*"/> |
87 |
< |
<exclude name="java/util/concurrent/atomic/AtomicInteger*"/> |
74 |
< |
<exclude name="java/util/concurrent/atomic/AtomicLong*"/> |
75 |
< |
<exclude name="java/util/concurrent/atomic/AtomicReference*"/> |
76 |
< |
<exclude name="java/util/concurrent/locks/LockSupport*"/> |
77 |
< |
<exclude name="java/util/concurrent/locks/ReentrantLock*"/> |
78 |
< |
</patternset> |
79 |
< |
|
78 |
> |
<!-- Test classpath --> |
79 |
> |
<path id="test.classpath"> |
80 |
> |
<pathelement location="${build.testcases.dir}"/> |
81 |
> |
<pathelement location="${junit.jar}"/> |
82 |
> |
</path> |
83 |
> |
|
84 |
> |
<!-- ALoops classpath --> |
85 |
> |
<path id="loops.classpath"> |
86 |
> |
<pathelement location="${build.loops.dir}"/> |
87 |
> |
</path> |
88 |
|
|
89 |
|
|
90 |
|
<!-- Main targets --> |
91 |
|
|
92 |
+ |
|
93 |
|
<target name="compile" |
94 |
< |
depends="init, configure-compiler, prepare-src" |
94 |
> |
depends="init, configure-compiler" |
95 |
|
description="Compiles main sources to build folder"> |
96 |
|
|
88 |
– |
<property name="prepare.src.dir" value="${src.dir}"/> |
89 |
– |
|
97 |
|
<mkdir dir="${build.classes.dir}"/> |
98 |
|
|
99 |
< |
<!-- |
93 |
< |
<echo>javac ${gjc.args}</echo> |
94 |
< |
<echo>bootclasspath=${compile.bootclasspath}</echo> |
95 |
< |
--> |
96 |
< |
|
97 |
< |
<javac srcdir="${prepare.src.dir}" |
99 |
> |
<javac srcdir="${src.dir}" |
100 |
|
destdir="${build.classes.dir}" |
101 |
|
debug="${build.debug}" |
102 |
|
debuglevel="${build.debuglevel}" |
104 |
|
source="${build.sourcelevel}" |
105 |
|
fork="true"> |
106 |
|
|
107 |
< |
<compilerarg line="${gjc.args}"/> |
107 |
> |
<include name="**/*.java"/> |
108 |
> |
<compilerarg value="-XDignore.symbol.file"/> |
109 |
> |
|
110 |
|
<!-- |
111 |
< |
<bootclasspath refid="compile.bootclasspath"/> |
111 |
> |
<exclude name="java/lang/**"/> |
112 |
> |
<compilerarg line="${build.args}"/> |
113 |
> |
<compilerarg line="-Xlint -Xmaxwarns 1000"/> |
114 |
|
--> |
115 |
|
|
116 |
|
</javac> |
118 |
|
</target> |
119 |
|
|
120 |
|
|
115 |
– |
<target name="jar" |
116 |
– |
depends="configure-emulation, init-jar, native-jar, emulation-jar" |
117 |
– |
description="Builds library jar from compiled sources"/> |
118 |
– |
|
121 |
|
|
122 |
< |
<target name="test" |
123 |
< |
depends="init, configure-tests, report-tests" |
124 |
< |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
123 |
< |
|
124 |
< |
|
125 |
< |
<target name="checkstyle" |
126 |
< |
depends="filter-src" |
127 |
< |
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
122 |
> |
<target name="jar" |
123 |
> |
depends="compile" |
124 |
> |
description="Builds library jar from compiled sources"> |
125 |
|
|
126 |
< |
<taskdef resource="checkstyletask.properties" |
130 |
< |
classpath="${lib.dir}/checkstyle-all-2.4.jar"/> |
126 |
> |
<mkdir dir="${build.lib.dir}"/> |
127 |
|
|
128 |
< |
<checkstyle> |
129 |
< |
<formatter type="plain"/> <!-- also available: type="xml" --> |
130 |
< |
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
135 |
< |
</checkstyle> |
128 |
> |
<jar destfile="${product.jar}"> |
129 |
> |
<fileset dir="${build.classes.dir}"/> |
130 |
> |
</jar> |
131 |
|
|
132 |
|
</target> |
133 |
|
|
134 |
|
|
140 |
– |
<target name="doccheck" |
141 |
– |
depends="filter-doccheck" |
142 |
– |
description="Reports on javadoc style errors"> |
143 |
– |
|
144 |
– |
<delete dir="${build.doccheck.dir}"/> |
145 |
– |
<mkdir dir="${build.doccheck.dir}"/> |
135 |
|
|
136 |
< |
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
137 |
< |
docletpath="${lib.dir}/doccheck.jar" |
138 |
< |
destdir="${build.doccheck.dir}"> |
150 |
< |
<packageset dir="${build.filter.doccheck.dir}"/> |
151 |
< |
</javadoc> |
152 |
< |
|
153 |
< |
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
136 |
> |
<target name="test" |
137 |
> |
depends="init, configure-tests, report-tests" |
138 |
> |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
139 |
|
|
155 |
– |
</target> |
140 |
|
|
141 |
|
|
142 |
|
<target name="docs" |
159 |
– |
depends="filter-src" |
143 |
|
description="Builds javadocs with custom tags to build folder"> |
144 |
|
|
145 |
|
<delete dir="${build.javadocs.dir}"/> |
146 |
|
<mkdir dir="${build.javadocs.dir}"/> |
147 |
|
|
148 |
|
<javadoc destdir="${build.javadocs.dir}" |
149 |
< |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
149 |
> |
link="http://java.sun.com/javase/6/docs/api/" |
150 |
|
overview="${src.dir}/intro.html" |
151 |
< |
source="${build.docsourcelevel}"> |
151 |
> |
sourcepath="${src.dir}:/home/dl/1.6.0/j2se/martin/j2se/src/share/classes" |
152 |
> |
> |
153 |
|
|
154 |
< |
<tag name="revised" description="Last revised:"/> |
171 |
< |
<tag name="spec" description="Specified by:"/> |
172 |
< |
<tag name="editor" description="Last edited by:"/> |
173 |
< |
<tag name="fixme" description="FIX ME:"/> |
174 |
< |
|
175 |
< |
<packageset dir="${build.filter.src.dir}"/> |
154 |
> |
<packageset dir="${src.dir}"/> |
155 |
|
|
156 |
|
</javadoc> |
157 |
|
|
158 |
|
</target> |
159 |
|
|
160 |
|
|
182 |
– |
<target name="sinjdocs" |
183 |
– |
depends="configure-tests" |
184 |
– |
description="Builds javadocs with custom tags to build folder"> |
185 |
– |
|
186 |
– |
<delete dir="${build.sinjdocs.dir}"/> |
187 |
– |
<mkdir dir="${build.sinjdocs.dir}"/> |
188 |
– |
|
189 |
– |
<java classname="net.cscott.sinjdoc.Main" fork="true"> |
190 |
– |
|
191 |
– |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
192 |
– |
|
193 |
– |
<classpath> |
194 |
– |
<pathelement location="${sinjdoc.jar}"/> |
195 |
– |
<pathelement location="${lib.dir}/jutil.jar"/> |
196 |
– |
<pathelement location="${lib.dir}/cup.jar"/> |
197 |
– |
<path refid="test.classpath"/> |
198 |
– |
</classpath> |
199 |
– |
|
200 |
– |
|
201 |
– |
<arg value="-d"/> <arg value="${build.sinjdocs.dir}"/> |
202 |
– |
<arg value="-sourcepath"/> <arg value="${src.dir}"/> |
203 |
– |
<arg value="-overview"/> <arg value="${src.dir}/intro.html"/> |
204 |
– |
<arg value="-source"/> <arg value="${build.sourcelevel}"/> |
205 |
– |
<!-- <arg value="-verbose"/> --> |
206 |
– |
<!-- <arg value="-link"/> <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> --> |
207 |
– |
<arg value="java.lang"/> |
208 |
– |
<arg value="java.util"/> |
209 |
– |
<arg value="java.util.concurrent"/> |
210 |
– |
<arg value="java.util.concurrent.atomic"/> |
211 |
– |
<arg value="java.util.concurrent.locks"/> |
212 |
– |
|
213 |
– |
<!-- |
214 |
– |
<arg value="-help"/> |
215 |
– |
--> |
216 |
– |
|
217 |
– |
</java> |
218 |
– |
|
219 |
– |
</target> |
220 |
– |
|
221 |
– |
|
222 |
– |
<target name="strip" |
223 |
– |
depends="init, configure-compiler" |
224 |
– |
description="Strip generics from java source (not working yet)"> |
225 |
– |
|
226 |
– |
<mkdir dir="${build.stripped.dir}"/> |
227 |
– |
|
228 |
– |
<!-- |
229 |
– |
# javac -s doesn't reliably generate compilable code. It generates |
230 |
– |
# bridge methods (marked as "synthetic") that can have identical |
231 |
– |
# signatures to existing methods except for the return value. |
232 |
– |
--> |
233 |
– |
<javac srcdir="${src.dir}" |
234 |
– |
destdir="${build.stripped.dir}" |
235 |
– |
debug="${build.debug}" |
236 |
– |
debuglevel="${build.debuglevel}" |
237 |
– |
deprecation="${build.deprecation}" |
238 |
– |
source="${build.sourcelevel}" |
239 |
– |
fork="true"> |
240 |
– |
|
241 |
– |
<compilerarg line="${gjc.args} -s"/> |
242 |
– |
<!-- |
243 |
– |
<bootclasspath refid="compile.bootclasspath"/> |
244 |
– |
--> |
245 |
– |
|
246 |
– |
</javac> |
247 |
– |
|
248 |
– |
</target> |
249 |
– |
|
161 |
|
|
162 |
|
<target name="dist" |
163 |
|
depends="init, dist-clean, dist-jar, dist-docs" |
164 |
|
description="Puts all distributable products in single hierarchy"/> |
165 |
|
|
166 |
+ |
|
167 |
+ |
|
168 |
|
<target name="release" |
169 |
|
depends="dist" |
170 |
|
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
171 |
|
|
259 |
– |
<!-- |
260 |
– |
#keep build dir? - dl |
261 |
– |
<delete dir="${build.dir}"/> |
262 |
– |
--> |
172 |
|
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
173 |
|
|
174 |
|
<jar basedir="${basedir}" destfile="${release.jar}"> |
175 |
+ |
<!-- <exclude name="build/**"/> --> |
176 |
|
<exclude name="${release.jar}"/> |
177 |
|
<exclude name="user.properties"/> |
178 |
|
<exclude name="etc/notes/**"/> |
179 |
< |
<exclude name="lib/gjc/2.1/**"/> |
179 |
> |
<exclude name="src/emulation/**"/> |
180 |
|
<exclude name="**/SyntaxTest.java"/> |
181 |
+ |
<exclude name="**/SuperfluousAbstract.java"/> |
182 |
|
</jar> |
183 |
|
|
184 |
|
</target> |
185 |
|
|
186 |
+ |
|
187 |
+ |
|
188 |
|
<target name="clean" |
189 |
|
description="Removes all build products"> |
190 |
|
|
195 |
|
</target> |
196 |
|
|
197 |
|
|
198 |
+ |
|
199 |
|
<target name="dist-clean" |
200 |
|
description="Removes all build and distribution products"> |
201 |
|
|
204 |
|
</target> |
205 |
|
|
206 |
|
|
207 |
+ |
|
208 |
|
<target name="dist-docs" |
294 |
– |
depends="filter-src" |
209 |
|
description="Builds javadocs without custom tags to dist folder"> |
210 |
|
|
211 |
|
<delete dir="${dist.javadocs.dir}"/> |
212 |
|
<mkdir dir="${dist.javadocs.dir}"/> |
213 |
|
|
214 |
|
<javadoc destdir="${dist.javadocs.dir}" |
215 |
< |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
215 |
> |
link="http://java.sun.com/javase/6/docs/api/" |
216 |
|
overview="${src.dir}/intro.html" |
303 |
– |
source="${build.docsourcelevel}"> |
304 |
– |
|
305 |
– |
<packageset dir="${build.filter.src.dir}"/> |
217 |
|
|
218 |
+ |
sourcepath="${src.dir}:/home/dl/1.6.0/j2se/martin/j2se/src/share/classes" |
219 |
+ |
> |
220 |
+ |
<!-- |
221 |
+ |
<packageset dir="${src.dir}" defaultexcludes="yes"> |
222 |
+ |
<include name="java/util/concurrent"/> |
223 |
+ |
<include name="java/util/concurrent/atomic"/> |
224 |
+ |
<include name="java/util/concurrent/locks"/> |
225 |
+ |
</packageset> |
226 |
+ |
--> |
227 |
+ |
<fileset dir="${topsrc.dir}" defaultexcludes="yes"> |
228 |
+ |
<include name="main/java/util/concurrent/*.java"/> |
229 |
+ |
<include name="main/java/util/concurrent/atomic/*.java"/> |
230 |
+ |
<include name="main/java/util/concurrent/locks/*.java"/> |
231 |
+ |
<include name="main/java/util/*.java"/> |
232 |
+ |
<!-- |
233 |
+ |
<include name="main/java/util/concurrent/*.html"/> |
234 |
+ |
<include name="main/java/util/concurrent/atomic/*.html"/> |
235 |
+ |
<include name="main/java/util/concurrent/locks/*.html"/> |
236 |
+ |
<include name="main/java/util/*.html"/> |
237 |
+ |
--> |
238 |
+ |
<!-- <include name="jsr166x/*.java"/> --> |
239 |
+ |
</fileset> |
240 |
|
</javadoc> |
241 |
|
|
242 |
|
</target> |
256 |
|
</target> |
257 |
|
|
258 |
|
|
259 |
< |
<target name="init-jar"> |
259 |
> |
<target name="dist-jar" |
260 |
> |
depends="clean, jar"> |
261 |
|
|
262 |
< |
<mkdir dir="${build.lib.dir}"/> |
262 |
> |
<copy file="${product.jar}" todir="${dist.dir}"/> |
263 |
|
|
264 |
|
</target> |
265 |
|
|
266 |
|
|
267 |
< |
<target name="native-jar" |
268 |
< |
depends="compile" |
335 |
< |
unless="build.emulation.true"> |
267 |
> |
<target name="compile-tests" |
268 |
> |
depends="jar"> |
269 |
|
|
270 |
< |
<jar destfile="${product.jar}"> |
338 |
< |
<fileset dir="${build.classes.dir}"/> |
339 |
< |
</jar> |
270 |
> |
<mkdir dir="${build.testcases.dir}"/> |
271 |
|
|
272 |
< |
</target> |
272 |
> |
<javac srcdir="${tck.src.dir}" |
273 |
> |
destdir="${build.testcases.dir}" |
274 |
> |
debug="${build.debug}" |
275 |
> |
debuglevel="${build.debuglevel}" |
276 |
> |
deprecation="${build.deprecation}" |
277 |
> |
source="${build.sourcelevel}" |
278 |
> |
fork="true"> |
279 |
|
|
280 |
+ |
<compilerarg value="${bootclasspath.args}"/> |
281 |
+ |
<compilerarg line="${build.args}"/> |
282 |
|
|
283 |
< |
<target name="compile-emulation" |
345 |
< |
depends="init, configure-compiler" |
346 |
< |
if="build.emulation.true"> |
283 |
> |
<classpath refid="test.classpath"/> |
284 |
|
|
285 |
< |
<mkdir dir="${build.emulation.dir}"/> |
285 |
> |
</javac> |
286 |
|
|
287 |
< |
<javac srcdir="${emulation.src.dir}" |
288 |
< |
destdir="${build.emulation.dir}" |
287 |
> |
<javac srcdir="${test.src.dir}" |
288 |
> |
destdir="${build.testcases.dir}" |
289 |
|
debug="${build.debug}" |
290 |
|
debuglevel="${build.debuglevel}" |
291 |
|
deprecation="${build.deprecation}" |
292 |
|
source="${build.sourcelevel}" |
293 |
|
fork="true"> |
294 |
|
|
295 |
< |
<compilerarg line="${gjc.args}"/> |
295 |
> |
<include name="jsr166/test/**"/> |
296 |
> |
|
297 |
> |
<compilerarg value="${bootclasspath.args}"/> |
298 |
> |
<compilerarg line="${build.args}"/> |
299 |
> |
|
300 |
> |
<classpath refid="test.classpath"/> |
301 |
> |
|
302 |
> |
</javac> |
303 |
> |
|
304 |
|
<!-- |
305 |
< |
<bootclasspath refid="compile.bootclasspath"/> |
306 |
< |
--> |
305 |
> |
<javac srcdir="${jtreg.src.dir}" |
306 |
> |
destdir="${build.testcases.dir}" |
307 |
> |
debug="${build.debug}" |
308 |
> |
debuglevel="${build.debuglevel}" |
309 |
> |
deprecation="${build.deprecation}" |
310 |
> |
source="${build.sourcelevel}" |
311 |
> |
fork="true"> |
312 |
> |
|
313 |
> |
<compilerarg value="${bootclasspath.args}"/> |
314 |
> |
<compilerarg line="${build.args}"/> |
315 |
> |
|
316 |
> |
<classpath refid="test.classpath"/> |
317 |
|
|
318 |
|
</javac> |
319 |
+ |
--> |
320 |
|
|
321 |
|
</target> |
322 |
|
|
323 |
|
|
324 |
< |
<target name="emulation-jar" |
325 |
< |
depends="compile-emulation" |
326 |
< |
if="build.emulation.true"> |
324 |
> |
<target name="run-tests" |
325 |
> |
depends="compile-tests"> |
326 |
> |
|
327 |
> |
<!-- May be overridden by user.properties --> |
328 |
> |
<property name="testcase" value="*"/> |
329 |
> |
|
330 |
> |
<mkdir dir="${build.reports.dir}"/> |
331 |
|
|
332 |
+ |
<junit printsummary="true" |
333 |
+ |
showoutput="true" |
334 |
+ |
errorProperty="junit.failed" |
335 |
+ |
failureProperty="junit.failed" |
336 |
+ |
dir="${build.reports.dir}" |
337 |
+ |
fork="true"> |
338 |
|
|
339 |
< |
<jar destfile="${product.jar}" duplicate="add"> |
340 |
< |
<fileset dir="${build.classes.dir}"> |
341 |
< |
<patternset refid="atomic.exclusion"/> |
376 |
< |
<patternset refid="unsafe.exclusion"/> |
377 |
< |
</fileset> |
378 |
< |
<fileset dir="${build.emulation.dir}"/> |
379 |
< |
</jar> |
339 |
> |
<jvmarg value="${bootclasspath.args}"/> |
340 |
> |
<jvmarg value="-server"/> |
341 |
> |
<jvmarg value="-showversion"/> |
342 |
|
|
343 |
< |
</target> |
343 |
> |
<classpath refid="test.classpath"/> |
344 |
|
|
345 |
+ |
<formatter type="xml"/> |
346 |
|
|
347 |
< |
<target name="dist-jar" |
348 |
< |
depends="clean, jar"> |
347 |
> |
<batchtest todir="${build.reports.dir}" unless="no.test.tck"> |
348 |
> |
<fileset dir="${tck.src.dir}"> |
349 |
> |
<include name="**/${testcase}Test.java"/> |
350 |
> |
</fileset> |
351 |
> |
</batchtest> |
352 |
|
|
353 |
< |
<copy file="${product.jar}" todir="${dist.dir}"/> |
353 |
> |
<batchtest todir="${build.reports.dir}" if="do.test.old"> |
354 |
> |
<fileset dir="${test.src.dir}"> |
355 |
> |
<include name="jsr166/test/**/${testcase}Test.java"/> |
356 |
> |
</fileset> |
357 |
> |
</batchtest> |
358 |
|
|
359 |
< |
</target> |
359 |
> |
<!-- |
360 |
> |
<batchtest todir="${build.reports.dir}" if="do.test.jtreg"> |
361 |
> |
<fileset dir="${jtreg.src.dir}"> |
362 |
> |
<include name="**/${testcase}Test.java"/> |
363 |
> |
</fileset> |
364 |
> |
</batchtest> |
365 |
> |
--> |
366 |
|
|
367 |
+ |
</junit> |
368 |
+ |
|
369 |
+ |
</target> |
370 |
|
|
392 |
– |
<target name="compile-ant-filter" |
393 |
– |
depends="init"> |
371 |
|
|
372 |
< |
<mkdir dir="${build.ant.dir}"/> |
372 |
> |
<target name="report-tests" |
373 |
> |
depends="run-tests"> |
374 |
|
|
375 |
< |
<javac srcdir="${ant.src.dir}" |
376 |
< |
destdir="${build.ant.dir}" |
377 |
< |
source="1.4" |
375 |
> |
<!-- Sets junit.report.format to frames if redirection is present, |
376 |
> |
otherwise sets it to noframes. --> |
377 |
> |
<available property="junit.report.format" |
378 |
> |
value="frames" |
379 |
> |
classname="org.apache.xalan.lib.Redirect" |
380 |
|
/> |
381 |
+ |
<property name="junit.report.format" value="noframes"/> |
382 |
+ |
|
383 |
+ |
<junitreport todir="${build.reports.dir}"> |
384 |
+ |
<fileset dir="${build.reports.dir}"> |
385 |
+ |
<include name="TEST-*.xml"/> |
386 |
+ |
</fileset> |
387 |
+ |
<report format="${junit.report.format}" todir="${build.reports.dir}" |
388 |
+ |
/> |
389 |
+ |
</junitreport> |
390 |
+ |
|
391 |
+ |
<fail message="Test Cases Failed" if="junit.failed"/> |
392 |
|
|
393 |
|
</target> |
394 |
|
|
395 |
|
|
396 |
< |
<target name="filter-src" |
406 |
< |
depends="compile-ant-filter"> |
396 |
> |
<target name="configure-compiler"> |
397 |
|
|
398 |
< |
<mkdir dir="${build.filter.src.dir}"/> |
398 |
> |
<property name="unchecked.option" value="-Xlint:unchecked"/> |
399 |
|
|
400 |
< |
<copy todir="${build.filter.src.dir}"> |
401 |
< |
<fileset dir="${src.dir}"> |
402 |
< |
<include name="**/*.html"/> |
413 |
< |
</fileset> |
414 |
< |
</copy> |
400 |
> |
<condition property="warnunchecked.arg" value="${unchecked.option}"> |
401 |
> |
<istrue value="${build.warnunchecked}"/> |
402 |
> |
</condition> |
403 |
|
|
404 |
< |
<copy todir="${build.filter.src.dir}"> |
417 |
< |
<fileset dir="${src.dir}"> |
418 |
< |
<exclude name="**/*.html"/> |
419 |
< |
<patternset refid="unsafe.exclusion"/> |
420 |
< |
</fileset> |
421 |
< |
<filterchain> |
404 |
> |
<property name="warnunchecked.arg" value=""/> |
405 |
|
|
423 |
– |
<!-- |
424 |
– |
# This filter gets rid of angle-bracketed type parameters |
425 |
– |
# so that javadoc can run on the result. The following |
426 |
– |
# heuristic seems to work: |
427 |
– |
# |
428 |
– |
# For all lines not starting with space(s)-asterisk-space(s), |
429 |
– |
# replace <something> with a space, where there may be more |
430 |
– |
# than one right angle bracket at the end, and "something" |
431 |
– |
# must not contain parens or pipes. (This may need some |
432 |
– |
# tweaking.) |
433 |
– |
--> |
406 |
|
|
407 |
< |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
408 |
< |
classpath="${build.ant.dir}"> |
437 |
< |
<param name="notmatching" value="^\s+\*\s.*$"/> |
438 |
< |
<param name="pattern" value="<[^|>()]+?>+"/> |
439 |
< |
<param name="replacement" value=" "/> |
440 |
< |
</filterreader> |
407 |
> |
<!-- Common options in javac invocations --> |
408 |
> |
<property name="build.args" value="${warnunchecked.arg}"/> |
409 |
|
|
410 |
+ |
</target> |
411 |
|
|
443 |
– |
<!-- |
444 |
– |
# This filter uncomments lines beginning with "//@" so that |
445 |
– |
# javadoc can see imports that are needed to resolve links |
446 |
– |
# but that shouldn't be in the compiled code. |
447 |
– |
--> |
412 |
|
|
413 |
< |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
414 |
< |
classpath="${build.ant.dir}"> |
415 |
< |
<param name="matching" value="^//@.*$"/> |
416 |
< |
<param name="pattern" value="^//@"/> |
417 |
< |
<param name="replacement" value=""/> |
418 |
< |
</filterreader> |
419 |
< |
</filterchain> |
420 |
< |
</copy> |
413 |
> |
<target name="configure-tests" |
414 |
> |
depends="configure-compiler"> |
415 |
> |
|
416 |
> |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
417 |
> |
<available property="junit.available" |
418 |
> |
classname="junit.framework.Protectable"/> |
419 |
> |
|
420 |
> |
<!-- Xalan --> |
421 |
> |
<available property="xalan.available" |
422 |
> |
classname="org.apache.xalan.Version"/> |
423 |
> |
|
424 |
> |
|
425 |
> |
<!-- Ant 1.6beta and later don't need or want this check --> |
426 |
> |
<!-- |
427 |
> |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
428 |
> |
unless="junit.available"/> |
429 |
> |
|
430 |
> |
<fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests" |
431 |
> |
unless="xalan.available"/> |
432 |
> |
--> |
433 |
|
|
434 |
|
</target> |
435 |
|
|
436 |
|
|
437 |
+ |
<!-- Various demos and test programs --> |
438 |
|
|
439 |
|
|
440 |
< |
<target name="filter-doccheck" |
441 |
< |
depends="filter-src"> |
440 |
> |
<target name="loops" depends="init, configure-compiler" |
441 |
> |
description="Benchmark from Doug Lea's AQS paper"> |
442 |
|
|
443 |
< |
<mkdir dir="${build.filter.doccheck.dir}"/> |
443 |
> |
<mkdir dir="${build.loops.dir}"/> |
444 |
|
|
445 |
< |
<copy todir="${build.filter.doccheck.dir}"> |
446 |
< |
<fileset dir="${build.filter.src.dir}"> |
447 |
< |
<include name="**/*.html"/> |
448 |
< |
</fileset> |
449 |
< |
</copy> |
445 |
> |
<javac srcdir="${loops.src.dir}" |
446 |
> |
destdir="${build.loops.dir}" |
447 |
> |
debug="${build.debug}" |
448 |
> |
debuglevel="${build.debuglevel}" |
449 |
> |
deprecation="${build.deprecation}" |
450 |
> |
source="${build.sourcelevel}" |
451 |
> |
fork="true"> |
452 |
|
|
453 |
< |
<property name="generic.declarations" |
454 |
< |
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 {}" |
476 |
< |
/> |
453 |
> |
<compilerarg line="${build.args}"/> |
454 |
> |
<classpath refid="loops.classpath"/> |
455 |
|
|
456 |
< |
<copy todir="${build.filter.doccheck.dir}"> |
479 |
< |
<fileset dir="${build.filter.src.dir}"> |
480 |
< |
<exclude name="**/*.html"/> |
481 |
< |
</fileset> |
482 |
< |
<filterchain> |
483 |
< |
<!-- |
484 |
< |
# These two filters try to make the source look like |
485 |
< |
# something that doccheck can process. The first removes |
486 |
< |
# -source 1.4 assertions and the second adds in a bunch |
487 |
< |
# of single letter public nested marker interfaces so that |
488 |
< |
# the generic type parameters are recognized. |
489 |
< |
--> |
490 |
< |
|
491 |
< |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
492 |
< |
classpath="${build.ant.dir}"> |
493 |
< |
<param name="matching" value="^\s*assert[\s ].*$"/> |
494 |
< |
<param name="pattern" value="assert"/> |
495 |
< |
<param name="replacement" value="//assert"/> |
496 |
< |
</filterreader> |
497 |
< |
|
498 |
< |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
499 |
< |
classpath="${build.ant.dir}"> |
500 |
< |
<param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
501 |
< |
<param name="pattern" value="$"/> |
502 |
< |
<param name="replacement" value=" ${generic.declarations}"/> |
503 |
< |
</filterreader> |
456 |
> |
</javac> |
457 |
|
|
458 |
< |
</filterchain> |
459 |
< |
</copy> |
458 |
> |
<java classname="ALoops" fork="true"> |
459 |
> |
<classpath refid="loops.classpath"/> |
460 |
> |
</java> |
461 |
|
|
462 |
|
</target> |
463 |
|
|
464 |
|
|
465 |
< |
<target name="compile-tests" |
512 |
< |
depends="jar"> |
465 |
> |
<!-- jsr166x --> |
466 |
|
|
514 |
– |
<mkdir dir="${build.testcases.dir}"/> |
467 |
|
|
468 |
< |
<!-- |
469 |
< |
<echo>javac ${gjc.args}</echo> |
470 |
< |
<echo>bootclasspath=${test.compile.bootclasspath}</echo> |
519 |
< |
<echo>classpath="${test.classpath}"</echo> |
520 |
< |
--> |
468 |
> |
<target name="jsr166xcompile" |
469 |
> |
depends="init, configure-compiler" |
470 |
> |
description="Compiles jsr166x sources"> |
471 |
|
|
472 |
< |
<javac srcdir="${test.src.dir}" |
473 |
< |
destdir="${build.testcases.dir}" |
472 |
> |
<mkdir dir="${build.jsr166x.dir}"/> |
473 |
> |
|
474 |
> |
<javac srcdir="${jsr166xsrc.dir}" |
475 |
> |
destdir="${build.jsr166x.dir}" |
476 |
|
debug="${build.debug}" |
477 |
|
debuglevel="${build.debuglevel}" |
478 |
|
deprecation="${build.deprecation}" |
479 |
|
source="${build.sourcelevel}" |
480 |
|
fork="true"> |
481 |
|
|
482 |
< |
<compilerarg line="${gjc.args}"/> |
483 |
< |
<!-- |
532 |
< |
<bootclasspath refid="test.compile.bootclasspath"/> |
533 |
< |
--> |
534 |
< |
<classpath refid="test.classpath"/> |
535 |
< |
|
536 |
< |
<include name="java/**"/> |
537 |
< |
<include name="jsr166/**"/> |
482 |
> |
<include name="**/*.java"/> |
483 |
> |
<compilerarg line="${build.args}"/> |
484 |
|
|
485 |
|
</javac> |
486 |
|
|
487 |
|
</target> |
488 |
|
|
489 |
|
|
544 |
– |
<target name="run-tests" |
545 |
– |
depends="compile-tests"> |
490 |
|
|
491 |
< |
<!-- May be overridden by user.properties --> |
492 |
< |
<property name="testcase" value="*"/> |
491 |
> |
<target name="jsr166xjar" |
492 |
> |
depends="jsr166xcompile" |
493 |
> |
description="Builds library jar from compiled sources"> |
494 |
|
|
495 |
< |
<mkdir dir="${build.reports.dir}"/> |
495 |
> |
<mkdir dir="${build.jsr166xlib.dir}"/> |
496 |
|
|
497 |
< |
<junit printsummary="true" |
498 |
< |
showoutput="true" |
499 |
< |
errorProperty="junit.failed" |
555 |
< |
failureProperty="junit.failed" |
556 |
< |
dir="${build.reports.dir}" |
557 |
< |
fork="true"> |
497 |
> |
<jar destfile="${jsr166xproduct.jar}"> |
498 |
> |
<fileset dir="${build.jsr166x.dir}"/> |
499 |
> |
</jar> |
500 |
|
|
501 |
< |
<jvmarg value="-Xbootclasspath:${test.run.bootclasspath}"/> |
501 |
> |
</target> |
502 |
|
|
561 |
– |
<formatter type="xml"/> |
503 |
|
|
563 |
– |
<batchtest todir="${build.reports.dir}"> |
564 |
– |
<fileset dir="${test.src.dir}"> |
565 |
– |
<include name="java/**/${testcase}Test.java"/> |
566 |
– |
<include name="jsr166/**/${testcase}Test.java"/> |
567 |
– |
</fileset> |
568 |
– |
</batchtest> |
504 |
|
|
505 |
< |
</junit> |
505 |
> |
<target name="jsr166xdocs" |
506 |
> |
description="Builds javadocs with custom tags to build folder"> |
507 |
> |
|
508 |
> |
<delete dir="${build.jsr166xjavadocs.dir}"/> |
509 |
> |
<mkdir dir="${build.jsr166xjavadocs.dir}"/> |
510 |
> |
|
511 |
> |
<javadoc destdir="${build.jsr166xjavadocs.dir}" |
512 |
> |
link="http://java.sun.com/javase/6/docs/api/" |
513 |
> |
|
514 |
> |
sourcepath="${jsr166xsrc.dir}:/home/dl/1.5.0/j2se/martin/j2se/src/share/classes" |
515 |
> |
|
516 |
> |
> |
517 |
> |
<packageset dir="${topsrc.dir}" defaultexcludes="yes"> |
518 |
> |
<include name="jsr166x"/> |
519 |
> |
</packageset> |
520 |
> |
|
521 |
> |
|
522 |
> |
</javadoc> |
523 |
|
|
524 |
|
</target> |
525 |
|
|
526 |
|
|
527 |
< |
<target name="report-tests" |
528 |
< |
depends="run-tests"> |
527 |
> |
<target name="jsr166xdist" |
528 |
> |
depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs" |
529 |
> |
description="Puts all distributable products in single hierarchy"/> |
530 |
|
|
578 |
– |
<!-- Sets junit.report.format to frames if redirection is present, |
579 |
– |
otherwise sets it to noframes. --> |
580 |
– |
<available property="junit.report.format" |
581 |
– |
value="frames" |
582 |
– |
classname="org.apache.xalan.lib.Redirect" |
583 |
– |
/> |
584 |
– |
<property name="junit.report.format" value="noframes"/> |
531 |
|
|
586 |
– |
<junitreport todir="${build.reports.dir}"> |
587 |
– |
<fileset dir="${build.reports.dir}"> |
588 |
– |
<include name="TEST-*.xml"/> |
589 |
– |
</fileset> |
590 |
– |
<report styledir="${stylesheet.dir}" |
591 |
– |
format="${junit.report.format}" |
592 |
– |
todir="${build.reports.dir}" |
593 |
– |
/> |
594 |
– |
</junitreport> |
532 |
|
|
533 |
< |
<fail message="Test Cases Failed" if="junit.failed"/> |
533 |
> |
<target name="jsr166xclean" |
534 |
> |
description="Removes all build products"> |
535 |
> |
|
536 |
> |
<delete dir="${build.jsr166x.dir}"/> |
537 |
> |
<delete dir="${build.jsr166xlib.dir}"/> |
538 |
|
|
539 |
|
</target> |
540 |
|
|
541 |
|
|
601 |
– |
<target name="configure-compiler"> |
542 |
|
|
543 |
< |
<property name="gjc.version" |
544 |
< |
value="2.2"/> |
543 |
> |
<target name="jsr166xdist-clean" |
544 |
> |
description="Removes all build and distribution products"> |
545 |
|
|
546 |
< |
<condition property="novariance.arg" value="-novariance"> |
607 |
< |
<and> |
608 |
< |
<equals arg1="${gjc.version}" arg2="2.0"/> |
609 |
< |
<or> |
610 |
< |
<not><isset property="gjc.novariance"/></not> |
611 |
< |
<istrue value="${gjc.novariance}"/> |
612 |
< |
</or> |
613 |
< |
</and> |
614 |
< |
</condition> |
546 |
> |
</target> |
547 |
|
|
616 |
– |
<property name="novariance.arg" |
617 |
– |
value=""/> |
548 |
|
|
619 |
– |
<property name="gjc.dir" |
620 |
– |
value="${lib.dir}/gjc"/> |
549 |
|
|
550 |
< |
<property name="javac.jar" |
551 |
< |
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
550 |
> |
<target name="jsr166xdist-docs" |
551 |
> |
description="Builds javadocs without custom tags to dist folder"> |
552 |
|
|
553 |
< |
<property name="collect.jar" |
554 |
< |
location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/> |
553 |
> |
<delete dir="${dist.jsr166xjavadocs.dir}"/> |
554 |
> |
<mkdir dir="${dist.jsr166xjavadocs.dir}"/> |
555 |
|
|
556 |
< |
<!-- |
557 |
< |
<property name="unchecked.option" value="-warnunchecked"/> |
558 |
< |
--> |
556 |
> |
<javadoc destdir="${dist.jsr166xjavadocs.dir}" |
557 |
> |
link="http://java.sun.com/javase/6/docs/api/" |
558 |
> |
source="${build.sourcelevel}"> |
559 |
> |
|
560 |
> |
<packageset dir="${topsrc.dir}" defaultexcludes="yes"> |
561 |
> |
<include name="jsr166x"/> |
562 |
> |
</packageset> |
563 |
|
|
564 |
< |
<property name="unchecked.option" value="-Xlint:unchecked"/> |
564 |
> |
</javadoc> |
565 |
|
|
566 |
< |
<condition property="warnunchecked.arg" value="${unchecked.option}"> |
635 |
< |
<istrue value="${gjc.warnunchecked}"/> |
636 |
< |
</condition> |
566 |
> |
</target> |
567 |
|
|
568 |
< |
<property name="warnunchecked.arg" value=""/> |
569 |
< |
|
640 |
< |
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
641 |
< |
<istrue value="${build.nothreads}"/> |
642 |
< |
</condition> |
568 |
> |
<target name="jsr166xdist-jar" |
569 |
> |
depends="jsr166xclean, jsr166xjar"> |
570 |
|
|
571 |
+ |
<copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/> |
572 |
|
|
573 |
< |
<!-- |
646 |
< |
! Bootclasspath munging for source compilation. |
647 |
< |
--> |
573 |
> |
</target> |
574 |
|
|
575 |
< |
<path id="pre.bootclasspath"> |
650 |
< |
<!-- |
651 |
< |
<pathelement location="${javac.jar}"/> |
652 |
< |
--> |
653 |
< |
</path> |
575 |
> |
<!-- jsr166y --> |
576 |
|
|
655 |
– |
<path id="compile.bootclasspath"> |
656 |
– |
<pathelement location="${build.classes.dir}"/> |
657 |
– |
<!-- |
658 |
– |
<pathelement location="${collect.jar}"/> |
659 |
– |
--> |
660 |
– |
<pathelement location="${rt.jar}"/> |
661 |
– |
</path> |
577 |
|
|
578 |
< |
<!-- Flatten paths into platform-appropriate strings --> |
579 |
< |
<property name="pre.bootclasspath" refid="pre.bootclasspath"/> |
580 |
< |
<property name="compile.bootclasspath" refid="compile.bootclasspath"/> |
578 |
> |
<target name="jsr166ycompile" |
579 |
> |
depends="init, configure-compiler" |
580 |
> |
description="Compiles jsr166y sources"> |
581 |
|
|
582 |
+ |
<mkdir dir="${build.jsr166y.dir}"/> |
583 |
|
|
584 |
< |
<!-- Common options in javac invocations --> |
585 |
< |
<!-- |
586 |
< |
<property name="gjc.args" |
587 |
< |
value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}" |
588 |
< |
/> |
589 |
< |
--> |
590 |
< |
<property name="gjc.args" value="${warnunchecked.arg} ${novariance.arg}"/> |
584 |
> |
<javac srcdir="${jsr166ysrc.dir}" |
585 |
> |
destdir="${build.jsr166y.dir}" |
586 |
> |
debug="${build.debug}" |
587 |
> |
debuglevel="${build.debuglevel}" |
588 |
> |
deprecation="${build.deprecation}" |
589 |
> |
source="${build.sourcelevel}" |
590 |
> |
fork="true"> |
591 |
> |
|
592 |
> |
<include name="**/*.java"/> |
593 |
> |
<compilerarg line="${build.args}"/> |
594 |
> |
<compilerarg value="${bootclasspath.args}"/> |
595 |
> |
|
596 |
> |
<!-- <compilerarg line="-Xlint -Xmaxwarns 1000"/> --> |
597 |
> |
|
598 |
> |
</javac> |
599 |
|
|
600 |
|
</target> |
601 |
|
|
602 |
|
|
679 |
– |
<target name="prepare-src" |
680 |
– |
depends="configure-compiler" |
681 |
– |
if="prepare.src.dir"> |
603 |
|
|
604 |
< |
<mkdir dir="${prepare.src.dir}"/> |
605 |
< |
<copy todir="${prepare.src.dir}"> |
606 |
< |
<fileset dir="${src.dir}"> |
607 |
< |
<exclude name="java/lang/**"/> |
608 |
< |
</fileset> |
609 |
< |
</copy> |
604 |
> |
<target name="jsr166yjar" |
605 |
> |
depends="jsr166ycompile" |
606 |
> |
description="Builds library jar from compiled sources"> |
607 |
> |
|
608 |
> |
<mkdir dir="${build.jsr166ylib.dir}"/> |
609 |
> |
|
610 |
> |
<jar destfile="${jsr166yproduct.jar}" index="true"> |
611 |
> |
<fileset dir="${build.jsr166y.dir}"/> |
612 |
> |
</jar> |
613 |
|
|
614 |
|
</target> |
615 |
|
|
616 |
|
|
693 |
– |
<target name="configure-emulation"> |
617 |
|
|
618 |
< |
<condition property="build.emulation.true"> |
619 |
< |
<or> |
620 |
< |
<and> |
621 |
< |
<os family="windows"/> |
622 |
< |
<not> |
623 |
< |
<isset property="build.emulation"/> |
624 |
< |
</not> |
625 |
< |
</and> |
626 |
< |
<istrue value="${build.emulation}"/> |
627 |
< |
</or> |
628 |
< |
</condition> |
618 |
> |
<target name="jsr166ydocs" |
619 |
> |
description="Builds javadocs with custom tags to build folder"> |
620 |
> |
|
621 |
> |
<delete dir="${build.jsr166yjavadocs.dir}"/> |
622 |
> |
<mkdir dir="${build.jsr166yjavadocs.dir}"/> |
623 |
> |
|
624 |
> |
<javadoc destdir="${build.jsr166yjavadocs.dir}" |
625 |
> |
link="http://java.sun.com/javase/6/docs/api/" |
626 |
> |
sourcepath="${jsr166ysrc.dir}:/home/dl/1.5.0/j2se/martin/j2se/src/share/classes" |
627 |
> |
|
628 |
> |
> |
629 |
> |
<packageset dir="${topsrc.dir}" defaultexcludes="no"> |
630 |
> |
<include name="jsr166y"/> |
631 |
> |
</packageset> |
632 |
> |
|
633 |
> |
|
634 |
> |
</javadoc> |
635 |
|
|
636 |
|
</target> |
637 |
|
|
638 |
|
|
639 |
< |
<target name="configure-tests" |
640 |
< |
depends="configure-compiler"> |
639 |
> |
<target name="jsr166ydist" |
640 |
> |
depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs" |
641 |
> |
description="Puts all distributable products in single hierarchy"/> |
642 |
|
|
713 |
– |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
714 |
– |
<available property="junit.available" |
715 |
– |
classname="junit.framework.Protectable"/> |
643 |
|
|
717 |
– |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
718 |
– |
unless="junit.available"/> |
644 |
|
|
645 |
< |
<!-- Xalan --> |
646 |
< |
<available property="xalan.available" |
722 |
< |
classname="org.apache.xalan.Version"/> |
645 |
> |
<target name="jsr166yclean" |
646 |
> |
description="Removes all build products"> |
647 |
|
|
648 |
< |
<fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests" |
649 |
< |
unless="xalan.available"/> |
648 |
> |
<delete dir="${build.jsr166y.dir}"/> |
649 |
> |
<delete dir="${build.jsr166ylib.dir}"/> |
650 |
|
|
651 |
+ |
</target> |
652 |
|
|
728 |
– |
<!-- |
729 |
– |
! Bootclasspath munging for testing, so JUnit can test our local |
730 |
– |
! modifications to java.*. |
731 |
– |
--> |
653 |
|
|
733 |
– |
<path id="test.classpath"> |
734 |
– |
<pathelement location="${product.jar}"/> |
735 |
– |
<pathelement location="${rt.jar}"/> |
736 |
– |
<pathelement location="${build.testcases.dir}"/> |
737 |
– |
<pathelement location="${junit.jar}"/> |
738 |
– |
</path> |
654 |
|
|
655 |
< |
<path id="test.compile.bootclasspath"> |
656 |
< |
<pathelement location="${javac.jar}"/> |
657 |
< |
<pathelement location="${collect.jar}"/> |
658 |
< |
<pathelement location="${rt.jar}"/> |
659 |
< |
</path> |
655 |
> |
<target name="jsr166ydist-clean" |
656 |
> |
description="Removes all build and distribution products"> |
657 |
> |
|
658 |
> |
</target> |
659 |
> |
|
660 |
> |
<target name="jsr166ydist-docs" |
661 |
> |
description="Builds javadocs without custom tags to dist folder"> |
662 |
> |
|
663 |
> |
<delete dir="${dist.jsr166yjavadocs.dir}"/> |
664 |
> |
<mkdir dir="${dist.jsr166yjavadocs.dir}"/> |
665 |
> |
|
666 |
> |
<javadoc destdir="${dist.jsr166yjavadocs.dir}" |
667 |
> |
link="http://java.sun.com/javase/6/docs/api/" |
668 |
> |
source="${build.sourcelevel}"> |
669 |
> |
<fileset dir="${topsrc.dir}" defaultexcludes="yes"> |
670 |
> |
<include name="jsr166y/*.java"/> |
671 |
> |
</fileset> |
672 |
> |
</javadoc> |
673 |
> |
|
674 |
> |
</target> |
675 |
|
|
676 |
< |
<path id="test.run.bootclasspath"> |
677 |
< |
<!-- |
748 |
< |
<pathelement location="${javac.jar}"/> |
749 |
< |
--> |
750 |
< |
<path refid="test.classpath"/> |
751 |
< |
</path> |
676 |
> |
<target name="jsr166ydist-jar" |
677 |
> |
depends="jsr166yclean, jsr166yjar"> |
678 |
|
|
679 |
< |
<!-- Flatten test classpaths into platform-appropriate strings --> |
754 |
< |
<property name="test.classpath" refid="test.classpath"/> |
755 |
< |
<property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/> |
756 |
< |
<property name="test.run.bootclasspath" refid="test.run.bootclasspath"/> |
679 |
> |
<copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/> |
680 |
|
|
681 |
|
</target> |
682 |
|
|
683 |
+ |
<!-- extra166y --> |
684 |
|
|
685 |
|
|
686 |
< |
<!-- Anthill targets --> |
686 |
> |
<target name="extra166ycompile" |
687 |
> |
depends="init, configure-compiler, jsr166ycompile" |
688 |
> |
description="Compiles extra166y sources"> |
689 |
> |
|
690 |
> |
<mkdir dir="${build.extra166y.dir}"/> |
691 |
> |
|
692 |
> |
<javac srcdir="${extra166ysrc.dir}" |
693 |
> |
destdir="${build.extra166y.dir}" |
694 |
> |
debug="${build.debug}" |
695 |
> |
classpath="${jsr166yproduct.jar}" |
696 |
> |
debuglevel="${build.debuglevel}" |
697 |
> |
deprecation="${build.deprecation}" |
698 |
> |
source="${build.sourcelevel}" |
699 |
> |
fork="true"> |
700 |
> |
|
701 |
> |
<include name="**/*.java"/> |
702 |
> |
<compilerarg line="${build.args}"/> |
703 |
> |
<compilerarg value="${bootclasspath.args}"/> |
704 |
> |
|
705 |
> |
<!-- <compilerarg line="-Xlint -Xmaxwarns 1000"/> --> |
706 |
> |
|
707 |
> |
</javac> |
708 |
|
|
764 |
– |
<target name="anthill-build"> |
765 |
– |
<exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java"> |
766 |
– |
<arg value="-Xmx256000000"/> |
767 |
– |
<!-- classpath of new JVM --> |
768 |
– |
<arg value="-classpath"/> <arg path="${java.class.path}"/> |
769 |
– |
<!-- location of Ant home directory --> |
770 |
– |
<arg value="-Dant.home=${ant.home}"/> |
771 |
– |
<!-- the Ant main class --> |
772 |
– |
<arg value="org.apache.tools.ant.Main"/> |
773 |
– |
<!-- The build file --> |
774 |
– |
<arg value="-buildfile"/> <arg value="build.xml"/> |
775 |
– |
<!-- the target to build on the new Ant instance --> |
776 |
– |
<arg value="-DJAVA_HOME=${tiger.home}"/> |
777 |
– |
<arg value="do-anthill-build"/> |
778 |
– |
</exec> |
709 |
|
</target> |
780 |
– |
|
781 |
– |
<target name="do-anthill-build" |
782 |
– |
depends="jar, test, docs, dist-docs"/> |
710 |
|
|
784 |
– |
<target name="anthill-publish"> |
711 |
|
|
786 |
– |
<copy todir="${deployDir}/docs/private"> |
787 |
– |
<fileset dir="${build.javadocs.dir}"/> |
788 |
– |
</copy> |
712 |
|
|
713 |
< |
<copy todir="${deployDir}/docs/public"> |
714 |
< |
<fileset dir="${dist.javadocs.dir}"/> |
715 |
< |
</copy> |
713 |
> |
<target name="extra166yjar" |
714 |
> |
depends="extra166ycompile" |
715 |
> |
description="Builds library jar from compiled sources"> |
716 |
|
|
717 |
< |
<copy tofile="${deployDir}/index.html" |
795 |
< |
file="${basedir}/etc/anthill-index.html"/> |
717 |
> |
<mkdir dir="${build.extra166ylib.dir}"/> |
718 |
|
|
719 |
< |
<copy todir="${deployDir}/notes"> |
720 |
< |
<fileset dir="${basedir}/etc/notes"/> |
721 |
< |
</copy> |
719 |
> |
<jar destfile="${extra166yproduct.jar}" index="true"> |
720 |
> |
<fileset dir="${build.extra166y.dir}"/> |
721 |
> |
</jar> |
722 |
|
|
723 |
|
</target> |
724 |
|
|
725 |
|
|
804 |
– |
<target name="ng" depends="test"> |
805 |
– |
<java classname="SuperfluousAbstract" fork="true"> |
726 |
|
|
727 |
< |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
727 |
> |
<target name="extra166ydocs" |
728 |
> |
description="Builds javadocs with custom tags to build folder"> |
729 |
> |
|
730 |
> |
<delete dir="${build.extra166yjavadocs.dir}"/> |
731 |
> |
<mkdir dir="${build.extra166yjavadocs.dir}"/> |
732 |
> |
|
733 |
> |
<javadoc destdir="${build.extra166yjavadocs.dir}" |
734 |
> |
link="http://java.sun.com/javase/6/docs/api/" |
735 |
> |
sourcepath="${extra166ysrc.dir}:/home/dl/1.5.0/j2se/martin/j2se/src/share/classes" |
736 |
> |
|
737 |
> |
> |
738 |
> |
<packageset dir="${topsrc.dir}" defaultexcludes="no"> |
739 |
> |
<include name="extra166y"/> |
740 |
> |
</packageset> |
741 |
> |
|
742 |
> |
|
743 |
> |
</javadoc> |
744 |
|
|
809 |
– |
</java> |
745 |
|
</target> |
746 |
|
|
747 |
|
|
748 |
+ |
<target name="extra166ydist" |
749 |
+ |
depends="extra166ydist-clean, extra166ydist-jar, extra166ydist-docs" |
750 |
+ |
description="Puts all distributable products in single hierarchy"/> |
751 |
+ |
|
752 |
+ |
|
753 |
+ |
|
754 |
+ |
<target name="extra166yclean" |
755 |
+ |
description="Removes all build products"> |
756 |
+ |
|
757 |
+ |
<delete dir="${build.extra166y.dir}"/> |
758 |
+ |
<delete dir="${build.extra166ylib.dir}"/> |
759 |
+ |
|
760 |
+ |
</target> |
761 |
+ |
|
762 |
+ |
|
763 |
+ |
|
764 |
+ |
<target name="extra166ydist-clean" |
765 |
+ |
description="Removes all build and distribution products"> |
766 |
+ |
|
767 |
+ |
</target> |
768 |
+ |
|
769 |
+ |
<target name="extra166ydist-docs" |
770 |
+ |
description="Builds javadocs without custom tags to dist folder"> |
771 |
+ |
|
772 |
+ |
<delete dir="${dist.extra166yjavadocs.dir}"/> |
773 |
+ |
<mkdir dir="${dist.extra166yjavadocs.dir}"/> |
774 |
+ |
|
775 |
+ |
<javadoc destdir="${dist.extra166yjavadocs.dir}" |
776 |
+ |
link="http://java.sun.com/javase/6/docs/api/" |
777 |
+ |
source="${build.sourcelevel}"> |
778 |
+ |
<fileset dir="${topsrc.dir}" defaultexcludes="yes"> |
779 |
+ |
<include name="extra166y/*.java"/> |
780 |
+ |
</fileset> |
781 |
+ |
</javadoc> |
782 |
+ |
|
783 |
+ |
</target> |
784 |
+ |
|
785 |
+ |
<target name="extra166ydist-jar" |
786 |
+ |
depends="extra166yclean, extra166yjar"> |
787 |
+ |
|
788 |
+ |
<copy file="${extra166yproduct.jar}" todir="${dist.dir}"/> |
789 |
+ |
|
790 |
+ |
</target> |
791 |
+ |
|
792 |
|
</project> |