/[cvs]/jsr166/build.xml
ViewVC logotype

Annotation of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.125 - (hide annotations)
Wed Jan 23 06:45:08 2013 UTC (6 years, 10 months ago) by jsr166
Branch: MAIN
Changes since 1.124: +71 -35 lines
File MIME type: text/xml
revert to generating javadocs in build.dir

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 jsr166 1.98
12     The repository contains all dependencies except for ant and the JDK
13     itself. Because the JDK version matters and because different
14     targets require different JDKs, we assume that users have created a
15     hierarchy containing:
16     $HOME/jdk/jdk6
17     $HOME/jdk/jdk7
18     $HOME/jdk/jdk8
19 jsr166 1.99 where each of the above is a JDK or a symlink to same, and
20     $HOME/jdk/src/jdk6
21     $HOME/jdk/src/jdk7
22     $HOME/jdk/src/jdk8
23     where each of the above is a complete JDK source tree
24     (e.g. mercurial forest) or a symlink to same.
25 tim 1.29 ------------------------------------------------------------------------------
26 tim 1.18 </description>
27 tim 1.11
28 tim 1.29 <target name="usage" description="Advises user to run with -projecthelp">
29     <echo>Run "ant -projecthelp" for full usage information.</echo>
30     </target>
31 tim 1.3
32 tim 1.11
33 tim 1.27 <!-- User-specific settings -->
34 tim 1.23 <property file="user.properties"/>
35 tim 1.27
36 tim 1.1
37     <!-- Compilation options -->
38 jsr166 1.114 <property name="build.sourcelevel" value="6"/>
39 tim 1.1 <property name="build.debug" value="true"/>
40     <property name="build.debuglevel" value="source,lines,vars"/>
41 tim 1.13 <property name="build.deprecation" value="false"/>
42 tim 1.1
43     <!-- Build locations -->
44 jsr166 1.79 <property name="build.dir" location="build"/>
45     <property name="build.classes.dir" location="${build.dir}/classes"/>
46     <property name="build.testcases.dir" location="${build.dir}/testcases"/>
47     <property name="build.loops.dir" location="${build.dir}/loops"/>
48     <property name="build.reports.dir" location="${build.dir}/reports"/>
49 jsr166 1.92
50 jsr166 1.109 <property name="build.4jdk7.dir" location="${build.dir}/jsr166-4jdk7"/>
51     <property name="build.4jdk7.classes.dir" location="${build.4jdk7.dir}/classes"/>
52 jsr166 1.113 <property name="build.4jdk7.tck.classes.dir" location="${build.4jdk7.dir}/tck-classes"/>
53 jsr166 1.109 <property name="build.4jdk7.docs.dir" location="${build.4jdk7.dir}/docs"/>
54 jsr166 1.92
55 jsr166 1.79 <property name="build.jsr166x.dir" location="${build.dir}/jsr166x"/>
56     <property name="build.jsr166y.dir" location="${build.dir}/jsr166y"/>
57 dl 1.90 <property name="build.jsr166e.dir" location="${build.dir}/jsr166e"/>
58 jsr166 1.79 <property name="build.extra166y.dir" location="${build.dir}/extra166y"/>
59 dl 1.76
60 jsr166 1.114 <property name="build.jsr166x.classes.dir" location="${build.jsr166x.dir}/classes"/>
61     <property name="build.jsr166y.classes.dir" location="${build.jsr166y.dir}/classes"/>
62     <property name="build.jsr166e.classes.dir" location="${build.jsr166e.dir}/classes"/>
63     <property name="build.extra166y.classes.dir" location="${build.extra166y.dir}/classes"/>
64    
65 jsr166 1.118 <!-- JDK locations -->
66 jsr166 1.92 <property name="jdks.home" location="${user.home}/jdk"/>
67 jsr166 1.93
68     <macrodef name="defjdklocations">
69     <attribute name="v"/>
70     <sequential>
71 jsr166 1.99 <property name="jdk@{v}.home" location="${jdks.home}/jdk@{v}"/>
72     <property name="java@{v}" location="${jdk@{v}.home}/bin/java"/>
73     <property name="javac@{v}" location="${jdk@{v}.home}/bin/javac"/>
74     <property name="javadoc@{v}" location="${jdk@{v}.home}/bin/javadoc"/>
75     <property name="jdk@{v}src.dir" location="${jdks.home}/src/jdk@{v}/jdk/src/share/classes"/>
76 jsr166 1.118 <local name="boot.jar.dir"/>
77     <property name="boot.jar.dir" location="${jdk@{v}.home}/jre/lib"/>
78     <path id="bootclasspath@{v}">
79     <pathelement path="${boot.jar.dir}/resources.jar"/>
80     <pathelement path="${boot.jar.dir}/rt.jar"/>
81     <pathelement path="${boot.jar.dir}/jsse.jar"/>
82     <pathelement path="${boot.jar.dir}/jce.jar"/>
83     <pathelement path="${boot.jar.dir}/charsets.jar"/>
84     </path>
85     <property name="bootclasspath@{v}" value="${toString:bootclasspath@{v}}"/>
86 jsr166 1.93 </sequential>
87     </macrodef>
88    
89 jsr166 1.125 <macrodef name="mirror-dir">
90     <attribute name="src"/>
91     <attribute name="dst"/>
92     <sequential>
93     <delete dir="@{dst}"/>
94     <mkdir dir="@{dst}"/>
95     <copy todir="@{dst}" preservelastmodified="true">
96     <fileset dir="@{src}"/>
97     </copy>
98     </sequential>
99     </macrodef>
100    
101 jsr166 1.93 <defjdklocations v="6"/>
102     <defjdklocations v="7"/>
103     <defjdklocations v="8"/>
104 jsr166 1.92
105 tim 1.1 <!-- Source locations -->
106 tim 1.22 <property name="src.dir" location="${basedir}/src/main"/>
107     <property name="test.src.dir" location="${basedir}/src/test"/>
108 jsr166 1.65 <property name="loops.src.dir" location="${basedir}/src/loops"/>
109 tim 1.60 <property name="tck.src.dir" location="${test.src.dir}/tck"/>
110 tim 1.62 <property name="jtreg.src.dir" location="${test.src.dir}/jtreg"/>
111 tim 1.1 <property name="lib.dir" location="${basedir}/lib"/>
112 tim 1.9 <property name="dist.dir" location="${basedir}/dist"/>
113 dl 1.70 <property name="topsrc.dir" location="${basedir}/src"/>
114 jsr166 1.99 <property name="4jdk7src.dir" location="${topsrc.dir}/jdk7"/>
115 jsr166 1.92 <property name="jsr166xsrc.dir" location="${topsrc.dir}/jsr166x"/>
116     <property name="jsr166ysrc.dir" location="${topsrc.dir}/jsr166y"/>
117     <property name="jsr166esrc.dir" location="${topsrc.dir}/jsr166e"/>
118     <property name="extra166ysrc.dir" location="${topsrc.dir}/extra166y"/>
119 jsr166 1.91
120 jsr166 1.125 <!-- Javadoc locations -->
121     <property name="javadocs.dir" location="${build.dir}/javadocs"/>
122     <property name="4jdk7javadocs.dir" location="${build.4jdk7.dir}/javadocs"/>
123     <property name="jsr166xjavadocs.dir" location="${build.jsr166x.dir}/javadocs"/>
124     <property name="jsr166yjavadocs.dir" location="${build.jsr166y.dir}/javadocs"/>
125     <property name="jsr166ejavadocs.dir" location="${build.jsr166e.dir}/javadocs"/>
126     <property name="extra166yjavadocs.dir" location="${build.extra166y.dir}/javadocs"/>
127    
128     <property name="dist.javadocs.dir" location="${dist.dir}/docs"/>
129     <property name="dist.4jdk7javadocs.dir" location="${dist.dir}/jsr166-4jdk7docs"/>
130 jsr166 1.124 <property name="dist.jsr166xjavadocs.dir" location="${dist.dir}/jsr166xdocs"/>
131     <property name="dist.jsr166yjavadocs.dir" location="${dist.dir}/jsr166ydocs"/>
132     <property name="dist.jsr166ejavadocs.dir" location="${dist.dir}/jsr166edocs"/>
133     <property name="dist.extra166yjavadocs.dir" location="${dist.dir}/extra166ydocs"/>
134 tim 1.1
135     <!-- Jar locations -->
136 jsr166 1.109 <property name="product.jar" location="${build.dir}/jsr166.jar"/>
137     <property name="4jdk7product.jar" location="${build.4jdk7.dir}/jsr166-4jdk7.jar"/>
138     <property name="jsr166x.jar" location="${build.jsr166x.dir}/jsr166x.jar"/>
139     <property name="jsr166y.jar" location="${build.jsr166y.dir}/jsr166y.jar"/>
140     <property name="jsr166e.jar" location="${build.jsr166e.dir}/jsr166e.jar"/>
141     <property name="extra166y.jar" location="${build.extra166y.dir}/extra166y.jar"/>
142 jsr166 1.106 <property name="junit.jar" location="${lib.dir}/junit.jar"/>
143 jsr166 1.65
144 jsr166 1.91 <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
145     <property name="jdkapi5docs.url" value="http://docs.oracle.com/javase/1.5.0/docs/api/"/>
146     <property name="jdkapi6docs.url" value="http://docs.oracle.com/javase/6/docs/api/"/>
147     <property name="jdkapi7docs.url" value="http://docs.oracle.com/javase/7/docs/api/"/>
148    
149     <property name="jdkapi8docs.url" value="http://download.java.net/jdk8/docs/api/"/>
150 jsr166 1.123 <!-- The below does not yet exist as of 2013-01 -->
151 jsr166 1.91 <!-- <property name="jdkapi8docs.url" value="http://docs.oracle.com/javase/8/docs/api/"/> -->
152 jsr166 1.107
153     <!-- Default jdk api doc location (latest stable release seems best) -->
154 jsr166 1.91 <property name="jdkapidocs.url" value="${jdkapi7docs.url}"/>
155    
156 jsr166 1.115 <!-- Define the "jtreg" task -->
157     <!-- See the docs in "jtreg -onlineHelp" -->
158     <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"
159     classpath="${lib.dir}/jtreg.jar" />
160    
161 tim 1.59 <!-- Test classpath -->
162     <path id="test.classpath">
163     <pathelement location="${build.testcases.dir}"/>
164     <pathelement location="${junit.jar}"/>
165     </path>
166 tim 1.28
167 jsr166 1.118 <macrodef name="run-tck-tests">
168 jsr166 1.122 <attribute name="tck.src.dir" default="${tck.src.dir}"/>
169     <attribute name="source" default="6"/>
170 jsr166 1.118 <attribute name="target"/>
171     <attribute name="workdir"/>
172 jsr166 1.122 <attribute name="classes"/>
173 jsr166 1.118 <attribute name="jvmflags" default=""/>
174     <sequential>
175    
176     <mkdir dir="@{workdir}/tck-classes"/>
177    
178 jsr166 1.122 <javac srcdir="@{tck.src.dir}"
179 jsr166 1.118 destdir="@{workdir}/tck-classes"
180     debug="${build.debug}"
181     debuglevel="${build.debuglevel}"
182     deprecation="${build.deprecation}"
183 jsr166 1.122 source="@{source}"
184 jsr166 1.118 classpath="${junit.jar}"
185 jsr166 1.122 bootclasspath="@{classes}:${bootclasspath@{source}}"
186 jsr166 1.118 includeAntRuntime="false"
187     includeJavaRuntime="false"
188     executable="${javac@{target}}"
189     fork="true">
190    
191 jsr166 1.121 <include name="*.java"/>
192 jsr166 1.118 <compilerarg value="-XDignore.symbol.file=true"/>
193     <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
194     <compilerarg line="${build.args}"/>
195    
196     </javac>
197    
198     <java classname="JSR166TestCase"
199     failonerror="true"
200     jvm="${java@{target}}"
201     fork="true">
202 jsr166 1.122 <jvmarg value="-Xbootclasspath/p:@{classes}"/>
203 jsr166 1.118 <jvmarg line="@{jvmflags}"/>
204     <classpath>
205     <pathelement location="${junit.jar}"/>
206     <pathelement location="@{workdir}/tck-classes"/>
207     </classpath>
208     </java>
209    
210     </sequential>
211     </macrodef>
212    
213 jsr166 1.65 <!-- ALoops classpath -->
214     <path id="loops.classpath">
215     <pathelement location="${build.loops.dir}"/>
216     </path>
217    
218 jsr166 1.100 <!-- Support @jls tag, used in jdk8+ javadoc -->
219 jsr166 1.120 <property name="javadoc.jls.cite" value="The Java&amp;trade; Language Specification"/>
220 jsr166 1.100 <property name="javadoc.jls.option" value="jls:a:See &lt;cite&gt;${javadoc.jls.cite}&lt;/cite&gt;:"/>
221 tim 1.28
222 tim 1.59 <!-- Main targets -->
223 tim 1.28
224 dl 1.80 <target name="dists"
225 jsr166 1.107 depends="dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
226 dl 1.80 description="Builds all public jars and docs"/>
227 tim 1.11
228 tim 1.28 <target name="compile"
229 jsr166 1.100 depends="configure-compiler"
230 jsr166 1.102 description="Compiles src/main sources to build dir">
231 tim 1.27
232 tim 1.1 <mkdir dir="${build.classes.dir}"/>
233 tim 1.27
234 tim 1.60 <javac srcdir="${src.dir}"
235 jsr166 1.100 destdir="${build.classes.dir}"
236     debug="${build.debug}"
237     debuglevel="${build.debuglevel}"
238     deprecation="${build.deprecation}"
239     classpath=""
240     includeAntRuntime="false"
241     includeJavaRuntime="false"
242     executable="${javac8}"
243     fork="true">
244 tim 1.1
245 jsr166 1.68 <include name="**/*.java"/>
246 dl 1.83 <compilerarg value="-XDignore.symbol.file=true"/>
247 jsr166 1.100 <compilerarg value="-Xlint:all"/>
248 dl 1.73 <compilerarg line="${build.args}"/>
249 tim 1.1
250     </javac>
251     </target>
252    
253    
254 tim 1.28 <target name="jar"
255 tim 1.59 depends="compile"
256     description="Builds library jar from compiled sources">
257    
258     <jar destfile="${product.jar}">
259     <fileset dir="${build.classes.dir}"/>
260     </jar>
261     </target>
262    
263 tim 1.1
264 tim 1.28 <target name="test"
265 jsr166 1.103 depends="configure-tests, report-tests"
266 tim 1.29 description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
267 tim 1.1
268    
269 tim 1.59 <target name="docs"
270 jsr166 1.102 description="Builds javadocs for src/main to dist dir">
271 tim 1.59
272 jsr166 1.125 <delete dir="${javadocs.dir}"/>
273     <mkdir dir="${javadocs.dir}"/>
274 tim 1.59
275 jsr166 1.88 <!-- the packagenames="none" hack below prevents scanning the -->
276     <!-- sourcepath for packages -->
277    
278 jsr166 1.125 <javadoc destdir="${javadocs.dir}"
279 jsr166 1.88 packagenames="none"
280 jsr166 1.100 link="${jdkapi8docs.url}"
281 jsr166 1.88 overview="${src.dir}/intro.html"
282 jsr166 1.119 sourcepath="${src.dir}:${jdk8src.dir}"
283 jsr166 1.100 classpath=""
284     executable="${javadoc8}">
285 jsr166 1.119 <fileset dir="${src.dir}" defaultexcludes="yes">
286     <include name="**/*.java"/>
287     </fileset>
288 jsr166 1.100 <arg value="-XDignore.symbol.file=true"/>
289     <arg value="-tag"/>
290     <arg value="${javadoc.jls.option}"/>
291 tim 1.59 </javadoc>
292     </target>
293    
294    
295 tim 1.28 <target name="dist"
296 jsr166 1.125 depends="dist-clean, dist-jar, dist-docs"
297 tim 1.16 description="Puts all distributable products in single hierarchy"/>
298 tim 1.1
299 tim 1.58
300 tim 1.42 <target name="release"
301     depends="dist"
302     description="Puts entire CVS tree, plus distribution productions, in a jar">
303    
304     <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
305    
306     <jar basedir="${basedir}" destfile="${release.jar}">
307 tim 1.58 <!-- <exclude name="build/**"/> -->
308 tim 1.42 <exclude name="${release.jar}"/>
309     <exclude name="user.properties"/>
310     <exclude name="etc/notes/**"/>
311 tim 1.58 <exclude name="src/emulation/**"/>
312 tim 1.44 <exclude name="**/SyntaxTest.java"/>
313 tim 1.58 <exclude name="**/SuperfluousAbstract.java"/>
314 tim 1.42 </jar>
315     </target>
316 tim 1.1
317 tim 1.59
318 tim 1.11 <target name="clean"
319     description="Removes all build products">
320 tim 1.27
321 tim 1.11 <delete dir="${build.dir}"/>
322 tim 1.27
323 tim 1.1 </target>
324    
325    
326 tim 1.11 <target name="dist-clean"
327     description="Removes all build and distribution products">
328 tim 1.27
329 tim 1.11 <delete dir="${dist.dir}"/>
330 tim 1.27
331 tim 1.9 </target>
332 tim 1.10
333    
334 tim 1.11 <!-- Internal targets -->
335 tim 1.9
336 tim 1.16
337 tim 1.28 <target name="dist-jar"
338     depends="clean, jar">
339 tim 1.11 <copy file="${product.jar}" todir="${dist.dir}"/>
340 jsr166 1.125 </target>
341 tim 1.27
342 jsr166 1.125 <target name="dist-docs"
343     depends="clean, docs">
344     <mirror-dir src="${javadocs.dir}" dst="${dist.javadocs.dir}"/>
345 tim 1.11 </target>
346    
347    
348 tim 1.28 <target name="compile-tests"
349     depends="jar">
350 tim 1.27
351 tim 1.1 <mkdir dir="${build.testcases.dir}"/>
352 tim 1.37
353 tim 1.60 <javac srcdir="${tck.src.dir}"
354 jsr166 1.111 destdir="${build.testcases.dir}"
355     debug="${build.debug}"
356     debuglevel="${build.debuglevel}"
357     deprecation="${build.deprecation}"
358     source="6"
359     classpath="${junit.jar}"
360 jsr166 1.119 bootclasspath="@{product.jar}:${bootclasspath6}"
361 jsr166 1.111 includeAntRuntime="false"
362     includeJavaRuntime="false"
363     executable="${javac8}"
364     fork="true">
365 tim 1.60
366 jsr166 1.111 <include name="**/*.java"/>
367 dl 1.84 <compilerarg value="-XDignore.symbol.file=true"/>
368 jsr166 1.111 <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
369 jsr166 1.118 <compilerarg line="${build.args}"/>
370 jsr166 1.65
371 tim 1.60 </javac>
372    
373     <javac srcdir="${test.src.dir}"
374 jsr166 1.111 destdir="${build.testcases.dir}"
375     debug="${build.debug}"
376     debuglevel="${build.debuglevel}"
377     deprecation="${build.deprecation}"
378     source="6"
379 jsr166 1.112 classpath=""
380 jsr166 1.119 bootclasspath="@{product.jar}:${bootclasspath6}"
381 jsr166 1.111 includeAntRuntime="false"
382     includeJavaRuntime="false"
383     executable="${javac8}"
384     fork="true">
385 tim 1.1
386 jsr166 1.111 <include name="jsr166/test/**/*.java"/>
387 dl 1.84 <compilerarg value="-XDignore.symbol.file=true"/>
388 jsr166 1.111 <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
389 jsr166 1.118 <compilerarg line="${build.args}"/>
390 jsr166 1.65
391 tim 1.1 </javac>
392 tim 1.27
393 tim 1.62 <!--
394     <javac srcdir="${jtreg.src.dir}"
395     destdir="${build.testcases.dir}"
396     debug="${build.debug}"
397     debuglevel="${build.debuglevel}"
398     deprecation="${build.deprecation}"
399     source="${build.sourcelevel}"
400     fork="true">
401    
402 jsr166 1.118 <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
403     <compilerarg value="-XDignore.symbol.file=true"/>
404 tim 1.62 <compilerarg line="${build.args}"/>
405 jsr166 1.65
406 tim 1.62 </javac>
407     -->
408    
409 tim 1.1 </target>
410 tim 1.11
411 tim 1.1
412 tim 1.28 <target name="run-tests"
413     depends="compile-tests">
414 tim 1.27
415     <!-- May be overridden by user.properties -->
416     <property name="testcase" value="*"/>
417    
418 tim 1.1 <mkdir dir="${build.reports.dir}"/>
419 tim 1.27
420 tim 1.1 <junit printsummary="true"
421     showoutput="true"
422     errorProperty="junit.failed"
423     failureProperty="junit.failed"
424 tim 1.12 dir="${build.reports.dir}"
425 jsr166 1.111 jvm="${java8}"
426 tim 1.12 fork="true">
427    
428 jsr166 1.111 <jvmarg value="-Xbootclasspath/p:${product.jar}"/>
429 tim 1.64 <jvmarg value="-server"/>
430     <jvmarg value="-showversion"/>
431 jsr166 1.65
432 tim 1.59 <classpath refid="test.classpath"/>
433 tim 1.1
434     <formatter type="xml"/>
435    
436 tim 1.62 <batchtest todir="${build.reports.dir}" unless="no.test.tck">
437 tim 1.60 <fileset dir="${tck.src.dir}">
438     <include name="**/${testcase}Test.java"/>
439     </fileset>
440 tim 1.62 </batchtest>
441 jsr166 1.65
442 tim 1.62 <batchtest todir="${build.reports.dir}" if="do.test.old">
443 tim 1.60 <fileset dir="${test.src.dir}">
444     <include name="jsr166/test/**/${testcase}Test.java"/>
445 tim 1.1 </fileset>
446     </batchtest>
447 tim 1.62
448 jsr166 1.65 <!--
449 tim 1.62 <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
450     <fileset dir="${jtreg.src.dir}">
451     <include name="**/${testcase}Test.java"/>
452     </fileset>
453     </batchtest>
454     -->
455 tim 1.1
456     </junit>
457 tim 1.27
458 tim 1.1 </target>
459    
460    
461 tim 1.28 <target name="report-tests"
462     depends="run-tests">
463    
464 tim 1.54 <!-- Sets junit.report.format to frames if redirection is present,
465 tim 1.1 otherwise sets it to noframes. -->
466     <available property="junit.report.format"
467     value="frames"
468     classname="org.apache.xalan.lib.Redirect"
469     />
470     <property name="junit.report.format" value="noframes"/>
471    
472     <junitreport todir="${build.reports.dir}">
473     <fileset dir="${build.reports.dir}">
474     <include name="TEST-*.xml"/>
475     </fileset>
476 jsr166 1.75 <report format="${junit.report.format}" todir="${build.reports.dir}"
477 tim 1.1 />
478     </junitreport>
479    
480     <fail message="Test Cases Failed" if="junit.failed"/>
481 tim 1.28
482 tim 1.18 </target>
483    
484    
485 tim 1.32 <target name="configure-compiler">
486 tim 1.54
487     <property name="unchecked.option" value="-Xlint:unchecked"/>
488    
489     <condition property="warnunchecked.arg" value="${unchecked.option}">
490 tim 1.57 <istrue value="${build.warnunchecked}"/>
491 tim 1.32 </condition>
492    
493 tim 1.37 <property name="warnunchecked.arg" value=""/>
494 tim 1.34
495 tim 1.32
496     <!-- Common options in javac invocations -->
497 tim 1.57 <property name="build.args" value="${warnunchecked.arg}"/>
498 tim 1.33
499     </target>
500    
501    
502 tim 1.37 <target name="configure-tests"
503     depends="configure-compiler">
504 tim 1.28
505     <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
506 tim 1.18 <available property="junit.available"
507 tim 1.28 classname="junit.framework.Protectable"/>
508    
509 tim 1.54 <!-- Xalan -->
510     <available property="xalan.available"
511     classname="org.apache.xalan.Version"/>
512    
513 jsr166 1.65
514 tim 1.59 <!-- Ant 1.6beta and later don't need or want this check -->
515 jsr166 1.65 <!--
516 tim 1.59 <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
517     unless="junit.available"/>
518    
519 tim 1.54 <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
520     unless="xalan.available"/>
521 tim 1.59 -->
522 tim 1.30
523 tim 1.28 </target>
524    
525    
526 jsr166 1.65 <!-- Various demos and test programs -->
527    
528    
529 jsr166 1.103 <target name="loops" depends="configure-compiler"
530 jsr166 1.65 description="Benchmark from Doug Lea's AQS paper">
531    
532     <mkdir dir="${build.loops.dir}"/>
533    
534     <javac srcdir="${loops.src.dir}"
535     destdir="${build.loops.dir}"
536     debug="${build.debug}"
537     debuglevel="${build.debuglevel}"
538     deprecation="${build.deprecation}"
539     source="${build.sourcelevel}"
540     fork="true">
541    
542     <compilerarg line="${build.args}"/>
543     <classpath refid="loops.classpath"/>
544 dl 1.84 <compilerarg value="-XDignore.symbol.file=true"/>
545 jsr166 1.65
546     </javac>
547    
548     <java classname="ALoops" fork="true">
549     <classpath refid="loops.classpath"/>
550     </java>
551    
552     </target>
553    
554    
555 jsr166 1.99 <!-- jsr166 4jdk7 -->
556 jsr166 1.92
557 jsr166 1.99 <target name="4jdk7compile"
558 jsr166 1.92 depends="configure-compiler"
559 jsr166 1.99 description="Compiles src/jdk7 sources, targeting jdk7">
560 jsr166 1.92
561 jsr166 1.99 <mkdir dir="${build.4jdk7.classes.dir}"/>
562 jsr166 1.92
563 jsr166 1.99 <javac srcdir="${4jdk7src.dir}"
564     destdir="${build.4jdk7.classes.dir}"
565 jsr166 1.92 debug="${build.debug}"
566     debuglevel="${build.debuglevel}"
567     deprecation="${build.deprecation}"
568 jsr166 1.107 source="6"
569 jsr166 1.92 classpath=""
570 jsr166 1.119 bootclasspath="${bootclasspath6}"
571 jsr166 1.92 includeAntRuntime="false"
572     includeJavaRuntime="false"
573 jsr166 1.97 executable="${javac7}"
574 jsr166 1.92 fork="true">
575    
576     <include name="**/*.java"/>
577     <compilerarg value="-XDignore.symbol.file=true"/>
578     <compilerarg value="-Xlint:all"/>
579 jsr166 1.118 <compilerarg line="${build.args}"/>
580 jsr166 1.92
581     </javac>
582 jsr166 1.118 </target>
583 jsr166 1.92
584 jsr166 1.116
585     <target name="4jdk7-jar"
586     depends="4jdk7compile"
587     description="Builds library jar from compiled sources">
588    
589     <jar destfile="${4jdk7product.jar}">
590 jsr166 1.99 <fileset dir="${build.4jdk7.classes.dir}"/>
591 jsr166 1.97 </jar>
592    
593 jsr166 1.92 </target>
594    
595    
596 jsr166 1.99 <target name="4jdk7-test-tck"
597 jsr166 1.116 depends="4jdk7-jar"
598 jsr166 1.99 description="Runs tck tests for jsr166-4jdk7 directly">
599 jsr166 1.116
600 jsr166 1.97 <run-tck-tests
601 jsr166 1.116 target="7"
602     workdir="${build.4jdk7.dir}"
603 jsr166 1.122 classes="${4jdk7product.jar}"/>
604 jsr166 1.97 </target>
605    
606    
607 jsr166 1.99 <target name="4jdk7-test-tck-junit"
608     depends="4jdk7compile"
609     description="Runs tck tests for jsr166-4jdk7 via junit task (experimental)">
610 jsr166 1.97
611     <junit printsummary="true"
612     showoutput="true"
613     errorProperty="junit.failed"
614     failureProperty="junit.failed"
615     includeantruntime="true"
616     jvm="${java7}"
617     fork="true">
618    
619 jsr166 1.99 <jvmarg value="-Xbootclasspath/p:${4jdk7product.jar}"/>
620 jsr166 1.97 <jvmarg value="-server"/>
621 jsr166 1.92
622 jsr166 1.97 <classpath>
623     <pathelement location="${junit.jar}"/>
624 jsr166 1.99 <pathelement location="${build.4jdk7.tck.classes.dir}"/>
625 jsr166 1.97 </classpath>
626 jsr166 1.92
627 jsr166 1.97 <formatter type="brief"/>
628 jsr166 1.92
629 jsr166 1.97 <test name="JSR166TestCase" haltonfailure="no">
630     </test>
631 jsr166 1.92
632 jsr166 1.97 </junit>
633 jsr166 1.92 </target>
634    
635 jsr166 1.115 <target name="4jdk7-test-jtreg"
636     depends="4jdk7compile"
637     description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task">
638     <delete dir="${build.4jdk7.dir}/JTwork" quiet="true"/>
639     <delete dir="${build.4jdk7.dir}/JTreport" quiet="true"/>
640     <mkdir dir="${build.4jdk7.dir}/JTwork/scratch"/>
641     <mkdir dir="${build.4jdk7.dir}/JTreport"/>
642     <jtreg dir="${jtreg.src.dir}"
643     jdk="${jdk7.home}"
644     workDir="${build.4jdk7.dir}/JTwork"
645     reportDir="${build.4jdk7.dir}/JTreport">
646    
647     <arg value="-Xbootclasspath/p:${4jdk7product.jar}"/>
648     <arg value="-agentvm"/>
649     <arg value="-v:nopass,fail"/>
650     <arg value="-vmoptions:-esa -ea"/>
651     <arg value="-automatic"/>
652     <arg value="-k:!ignore"/>
653     </jtreg>
654     </target>
655    
656    
657     <target name="4jdk7-test"
658     depends="4jdk7-test-tck, 4jdk7-test-jtreg"
659     description="Runs tck and jtreg tests for jsr166-4jdk7">
660     </target>
661    
662 jsr166 1.92
663 jsr166 1.99 <target name="4jdk7docs"
664 jsr166 1.102 description="Builds javadocs for src/jdk7 to dist dir">
665 jsr166 1.92
666 jsr166 1.125 <delete dir="${4jdk7javadocs.dir}"/>
667     <mkdir dir="${4jdk7javadocs.dir}"/>
668 jsr166 1.92
669 jsr166 1.125 <javadoc destdir="${4jdk7javadocs.dir}"
670 jsr166 1.92 packagenames="none"
671     link="${jdkapi7docs.url}"
672 jsr166 1.99 overview="${4jdk7src.dir}/intro.html"
673 jsr166 1.119 sourcepath="${4jdk7src.dir}:${jdk7src.dir}"
674 jsr166 1.92 classpath=""
675 jsr166 1.99 executable="${javadoc7}">
676     <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
677 jsr166 1.92 <include name="**/*.java"/>
678     </fileset>
679 jsr166 1.119 <arg value="-XDignore.symbol.file=true"/>
680 jsr166 1.92 </javadoc>
681     </target>
682    
683    
684 jsr166 1.99 <target name="4jdk7dist"
685 jsr166 1.125 depends="4jdk7dist-jar, 4jdk7dist-docs"
686 jsr166 1.92 description="Puts all distributable products in single hierarchy"/>
687    
688    
689 jsr166 1.99 <target name="4jdk7clean"
690 jsr166 1.109 description="Removes all 4jdk7 build products">
691 jsr166 1.92
692 jsr166 1.99 <delete dir="${build.4jdk7.dir}"/>
693 jsr166 1.92
694     </target>
695    
696    
697 jsr166 1.99 <target name="4jdk7dist-clean"
698 jsr166 1.92 description="Removes all build and distribution products">
699    
700     </target>
701    
702 jsr166 1.99 <target name="4jdk7dist-jar"
703 jsr166 1.118 depends="4jdk7clean, 4jdk7-jar">
704 jsr166 1.125 <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
705     </target>
706 jsr166 1.92
707    
708 jsr166 1.125 <target name="4jdk7dist-docs"
709     depends="4jdk7clean, 4jdk7docs">
710     <mirror-dir src="${4jdk7javadocs.dir}" dst="${dist.4jdk7javadocs.dir}"/>
711 jsr166 1.92 </target>
712    
713 jsr166 1.109
714 dl 1.70 <!-- jsr166x -->
715    
716     <target name="jsr166xcompile"
717 jsr166 1.103 depends="configure-compiler"
718 jsr166 1.105 description="Compiles jsr166x sources to build dir">
719 dl 1.70
720 jsr166 1.114 <mkdir dir="${build.jsr166x.classes.dir}"/>
721 dl 1.70
722 jsr166 1.105 <javac srcdir="${topsrc.dir}"
723 jsr166 1.114 destdir="${build.jsr166x.classes.dir}"
724 jsr166 1.105 debug="${build.debug}"
725     debuglevel="${build.debuglevel}"
726     deprecation="${build.deprecation}"
727     classpath=""
728 jsr166 1.119 bootclasspath="${bootclasspath6}"
729 jsr166 1.107 source="5"
730 jsr166 1.105 includeAntRuntime="false"
731     includeJavaRuntime="false"
732     executable="${javac7}"
733     fork="true">
734 dl 1.70
735 jsr166 1.105 <include name="jsr166x/**/*.java"/>
736 dl 1.84 <compilerarg value="-XDignore.symbol.file=true"/>
737 jsr166 1.105 <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
738 jsr166 1.118 <compilerarg line="${build.args}"/>
739 dl 1.70
740     </javac>
741     </target>
742    
743    
744 jsr166 1.118 <target name="jsr166x-jar"
745 dl 1.70 depends="jsr166xcompile"
746     description="Builds library jar from compiled sources">
747    
748 jsr166 1.106 <jar destfile="${jsr166x.jar}">
749 jsr166 1.114 <fileset dir="${build.jsr166x.classes.dir}"/>
750 dl 1.70 </jar>
751    
752     </target>
753    
754    
755     <target name="jsr166xdocs"
756 jsr166 1.102 description="Builds javadocs to dist dir">
757 dl 1.70
758 jsr166 1.125 <delete dir="${jsr166xjavadocs.dir}"/>
759     <mkdir dir="${jsr166xjavadocs.dir}"/>
760 dl 1.70
761 jsr166 1.125 <javadoc destdir="${jsr166xjavadocs.dir}"
762 jsr166 1.107 packagenames="jsr166x.*"
763 jsr166 1.91 link="${jdkapidocs.url}"
764 jsr166 1.119 sourcepath="${topsrc.dir}:${jdk6src.dir}"
765     bootclasspath="${bootclasspath6}"
766 jsr166 1.107 source="5"
767 jsr166 1.118 executable="${javadoc7}">
768     <arg value="-XDignore.symbol.file=true"/>
769 dl 1.70
770 jsr166 1.118 </javadoc>
771 dl 1.70 </target>
772    
773    
774     <target name="jsr166xdist"
775 jsr166 1.125 depends="jsr166xdist-jar, jsr166xdist-docs"
776 dl 1.70 description="Puts all distributable products in single hierarchy"/>
777    
778    
779     <target name="jsr166xclean"
780 jsr166 1.109 description="Removes all jsr166x build products">
781 dl 1.70
782     <delete dir="${build.jsr166x.dir}"/>
783    
784     </target>
785    
786    
787     <target name="jsr166xdist-clean"
788     description="Removes all build and distribution products">
789    
790     </target>
791    
792    
793     <target name="jsr166xdist-jar"
794 jsr166 1.118 depends="jsr166xclean, jsr166x-jar">
795 jsr166 1.106 <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
796 jsr166 1.125 </target>
797 dl 1.70
798 jsr166 1.125 <target name="jsr166xdist-docs"
799     depends="jsr166xclean, jsr166xdocs">
800     <mirror-dir src="${jsr166xjavadocs.dir}" dst="${dist.jsr166xjavadocs.dir}"/>
801 dl 1.70 </target>
802    
803 dl 1.74 <!-- jsr166y -->
804    
805    
806     <target name="jsr166ycompile"
807 jsr166 1.103 depends="configure-compiler"
808 dl 1.74 description="Compiles jsr166y sources">
809    
810 jsr166 1.114 <mkdir dir="${build.jsr166y.classes.dir}"/>
811 dl 1.74
812 jsr166 1.103 <javac srcdir="${topsrc.dir}"
813 jsr166 1.114 destdir="${build.jsr166y.classes.dir}"
814 jsr166 1.103 debug="${build.debug}"
815     debuglevel="${build.debuglevel}"
816     deprecation="${build.deprecation}"
817 jsr166 1.107 source="6"
818 jsr166 1.103 classpath=""
819 jsr166 1.119 bootclasspath="${bootclasspath6}"
820 jsr166 1.103 includeAntRuntime="false"
821     includeJavaRuntime="false"
822     executable="${javac7}"
823     fork="true">
824 dl 1.74
825 jsr166 1.103 <include name="jsr166y/**/*.java"/>
826 dl 1.83 <compilerarg value="-XDignore.symbol.file=true"/>
827 jsr166 1.103 <compilerarg value="-Xlint:all"/>
828 jsr166 1.118 <compilerarg line="${build.args}"/>
829    
830 dl 1.74 </javac>
831     </target>
832    
833    
834 jsr166 1.118 <target name="jsr166y-jar"
835 dl 1.74 depends="jsr166ycompile"
836     description="Builds library jar from compiled sources">
837    
838 jsr166 1.106 <jar destfile="${jsr166y.jar}" index="true">
839 jsr166 1.114 <fileset dir="${build.jsr166y.classes.dir}"/>
840 dl 1.74 </jar>
841    
842     </target>
843    
844    
845     <target name="jsr166ydocs"
846 jsr166 1.102 description="Builds javadocs to dist dir">
847 dl 1.74
848 jsr166 1.125 <delete dir="${jsr166yjavadocs.dir}"/>
849     <mkdir dir="${jsr166yjavadocs.dir}"/>
850 dl 1.74
851 jsr166 1.125 <javadoc destdir="${jsr166yjavadocs.dir}"
852 jsr166 1.107 packagenames="jsr166y.*"
853 jsr166 1.91 link="${jdkapidocs.url}"
854 jsr166 1.119 sourcepath="${topsrc.dir}:${jdk6src.dir}"
855     bootclasspath="${bootclasspath6}"
856 jsr166 1.107 source="6"
857 jsr166 1.118 executable="${javadoc7}">
858     <arg value="-XDignore.symbol.file=true"/>
859 dl 1.74
860 jsr166 1.118 </javadoc>
861 dl 1.74 </target>
862    
863    
864     <target name="jsr166ydist"
865 jsr166 1.125 depends="jsr166ydist-jar, jsr166ydist-docs"
866 dl 1.74 description="Puts all distributable products in single hierarchy"/>
867    
868    
869     <target name="jsr166yclean"
870 jsr166 1.109 description="Removes all jsr166y build products">
871 dl 1.74
872     <delete dir="${build.jsr166y.dir}"/>
873    
874     </target>
875    
876    
877     <target name="jsr166ydist-clean"
878     description="Removes all build and distribution products">
879    
880     </target>
881    
882     <target name="jsr166ydist-jar"
883 jsr166 1.118 depends="jsr166yclean, jsr166y-jar">
884 jsr166 1.106 <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
885 jsr166 1.125 </target>
886 dl 1.74
887 jsr166 1.125 <target name="jsr166ydist-docs"
888     depends="jsr166yclean, jsr166ydocs">
889     <mirror-dir src="${jsr166yjavadocs.dir}" dst="${dist.jsr166yjavadocs.dir}"/>
890 dl 1.74 </target>
891    
892 dl 1.90
893 dl 1.76 <!-- extra166y -->
894    
895    
896     <target name="extra166ycompile"
897 jsr166 1.118 depends="configure-compiler, jsr166y-jar"
898 dl 1.76 description="Compiles extra166y sources">
899    
900 jsr166 1.114 <mkdir dir="${build.extra166y.classes.dir}"/>
901 dl 1.76
902 jsr166 1.103 <javac srcdir="${topsrc.dir}"
903 jsr166 1.114 destdir="${build.extra166y.classes.dir}"
904 jsr166 1.103 debug="${build.debug}"
905     debuglevel="${build.debuglevel}"
906     deprecation="${build.deprecation}"
907 jsr166 1.119 bootclasspath="@{jsr166y.jar}:${bootclasspath6}"
908 jsr166 1.105 classpath=""
909 jsr166 1.107 source="6"
910 jsr166 1.103 includeAntRuntime="false"
911     includeJavaRuntime="false"
912     executable="${javac7}"
913     fork="true">
914 dl 1.76
915 jsr166 1.103 <include name="extra166y/**/*.java"/>
916 dl 1.83 <compilerarg value="-XDignore.symbol.file=true"/>
917 jsr166 1.103 <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
918 jsr166 1.118 <compilerarg line="${build.args}"/>
919 dl 1.76
920     </javac>
921     </target>
922    
923    
924 jsr166 1.118 <target name="extra166y-jar"
925 dl 1.76 depends="extra166ycompile"
926     description="Builds library jar from compiled sources">
927    
928 jsr166 1.106 <jar destfile="${extra166y.jar}" index="true">
929 jsr166 1.114 <fileset dir="${build.extra166y.classes.dir}"/>
930 dl 1.76 </jar>
931    
932     </target>
933    
934    
935     <target name="extra166ydocs"
936 jsr166 1.107 description="Builds javadocs to build dir">
937 dl 1.76
938 jsr166 1.125 <delete dir="${extra166yjavadocs.dir}"/>
939     <mkdir dir="${extra166yjavadocs.dir}"/>
940 dl 1.76
941 jsr166 1.125 <javadoc destdir="${extra166yjavadocs.dir}"
942 jsr166 1.107 packagenames="extra166y.*"
943 jsr166 1.91 link="${jdkapidocs.url}"
944 jsr166 1.119 sourcepath="${topsrc.dir}:${jdk6src.dir}"
945     bootclasspath="${bootclasspath6}"
946 jsr166 1.107 source="6"
947 jsr166 1.118 executable="${javadoc7}">
948     <arg value="-XDignore.symbol.file=true"/>
949 dl 1.76
950 jsr166 1.118 </javadoc>
951 dl 1.76 </target>
952    
953    
954     <target name="extra166ydist"
955 jsr166 1.125 depends="extra166ydist-jar, extra166ydist-docs"
956 dl 1.76 description="Puts all distributable products in single hierarchy"/>
957    
958    
959     <target name="extra166yclean"
960 jsr166 1.109 description="Removes all extra166y build products">
961 dl 1.76
962     <delete dir="${build.extra166y.dir}"/>
963    
964     </target>
965    
966    
967     <target name="extra166ydist-clean"
968     description="Removes all build and distribution products">
969    
970     </target>
971    
972     <target name="extra166ydist-jar"
973 jsr166 1.118 depends="extra166yclean, extra166y-jar">
974 jsr166 1.106 <copy file="${extra166y.jar}" todir="${dist.dir}"/>
975 jsr166 1.125 </target>
976 dl 1.76
977 jsr166 1.125 <target name="extra166ydist-docs"
978     depends="extra166yclean, extra166ydocs">
979     <mirror-dir src="${extra166yjavadocs.dir}" dst="${dist.extra166yjavadocs.dir}"/>
980 dl 1.76 </target>
981    
982 dl 1.90 <!-- jsr166e -->
983    
984     <target name="jsr166ecompile"
985 jsr166 1.94 depends="configure-compiler"
986 dl 1.90 description="Compiles jsr166e sources">
987    
988 jsr166 1.114 <mkdir dir="${build.jsr166e.classes.dir}"/>
989 dl 1.90
990 jsr166 1.95 <javac srcdir="${topsrc.dir}"
991 jsr166 1.114 destdir="${build.jsr166e.classes.dir}"
992 jsr166 1.94 debug="${build.debug}"
993     debuglevel="${build.debuglevel}"
994     deprecation="${build.deprecation}"
995 jsr166 1.107 source="7"
996 jsr166 1.94 classpath=""
997     includeAntRuntime="false"
998     includeJavaRuntime="false"
999     executable="${javac7}"
1000     fork="true">
1001 dl 1.90
1002 jsr166 1.95 <include name="jsr166e/**/*.java"/>
1003 dl 1.90 <compilerarg value="-XDignore.symbol.file=true"/>
1004 jsr166 1.94 <compilerarg value="-Xlint:all"/>
1005 jsr166 1.118 <compilerarg line="${build.args}"/>
1006 dl 1.90
1007     </javac>
1008     </target>
1009    
1010    
1011 jsr166 1.118 <target name="jsr166e-jar"
1012 dl 1.90 depends="jsr166ecompile"
1013     description="Builds library jar from compiled sources">
1014    
1015 jsr166 1.106 <jar destfile="${jsr166e.jar}" index="true">
1016 jsr166 1.114 <fileset dir="${build.jsr166e.classes.dir}"/>
1017 dl 1.90 </jar>
1018    
1019     </target>
1020    
1021    
1022     <target name="jsr166edocs"
1023 jsr166 1.107 description="Builds javadocs to build dir">
1024 dl 1.90
1025 jsr166 1.125 <delete dir="${jsr166ejavadocs.dir}"/>
1026     <mkdir dir="${jsr166ejavadocs.dir}"/>
1027 dl 1.90
1028 jsr166 1.125 <javadoc destdir="${jsr166ejavadocs.dir}"
1029 jsr166 1.107 packagenames="jsr166e.*"
1030     link="${jdkapidocs.url}"
1031 jsr166 1.119 sourcepath="${topsrc.dir}:${jdk7src.dir}"
1032 jsr166 1.107 source="7"
1033 jsr166 1.118 executable="${javadoc7}">
1034     <arg value="-XDignore.symbol.file=true"/>
1035    
1036 jsr166 1.96 </javadoc>
1037 dl 1.90 </target>
1038    
1039    
1040 jsr166 1.122 <target name="jsr166e-test-tck"
1041     depends="jsr166e-jar"
1042     description="Runs tck tests for jsr166e">
1043    
1044     <run-tck-tests
1045     tck.src.dir="${test.src.dir}/tck-jsr166e"
1046     source="7"
1047     target="8"
1048     workdir="${build.jsr166e.dir}"
1049     classes="${jsr166e.jar}"/>
1050     </target>
1051    
1052    
1053 dl 1.90 <target name="jsr166edist"
1054 jsr166 1.125 depends="jsr166edist-jar, jsr166edist-docs"
1055 dl 1.90 description="Puts all distributable products in single hierarchy"/>
1056    
1057    
1058     <target name="jsr166eclean"
1059 jsr166 1.109 description="Removes all jsr166e build products">
1060 dl 1.90 <delete dir="${build.jsr166e.dir}"/>
1061     </target>
1062    
1063    
1064     <target name="jsr166edist-clean"
1065     description="Removes all build and distribution products">
1066    
1067     </target>
1068    
1069     <target name="jsr166edist-jar"
1070 jsr166 1.118 depends="jsr166eclean, jsr166e-jar">
1071 jsr166 1.106 <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
1072 jsr166 1.125 </target>
1073 dl 1.90
1074 jsr166 1.125 <target name="jsr166edist-docs"
1075     depends="jsr166eclean, jsr166edocs">
1076     <mirror-dir src="${jsr166ejavadocs.dir}" dst="${dist.jsr166ejavadocs.dir}"/>
1077 dl 1.90 </target>
1078    
1079 tim 1.1 </project>

dl@cs.oswego.edu
ViewVC Help
Powered by ViewVC 1.1.27