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

Diff of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.107 by jsr166, Sat Jan 19 23:40:04 2013 UTC revision 1.200 by jsr166, Sat Mar 26 06:22:49 2016 UTC
# Line 1  Line 1 
1  <project name="jsr166" default="usage">  <project name="jsr166" default="usage"
2      xmlns:if="ant:if" xmlns:unless="ant:unless">
3    
4    <description>    <description>
5  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
# Line 16  Line 17 
17    $HOME/jdk/jdk6    $HOME/jdk/jdk6
18    $HOME/jdk/jdk7    $HOME/jdk/jdk7
19    $HOME/jdk/jdk8    $HOME/jdk/jdk8
20      $HOME/jdk/jdk9
21    where each of the above is a JDK or a symlink to same, and    where each of the above is a JDK or a symlink to same, and
22    $HOME/jdk/src/jdk6    $HOME/jdk/src/jdk6
23    $HOME/jdk/src/jdk7    $HOME/jdk/src/jdk7
24    $HOME/jdk/src/jdk8    $HOME/jdk/src/jdk8
25      $HOME/jdk/src/jdk9
26    where each of the above is a complete JDK source tree    where each of the above is a complete JDK source tree
27    (e.g. mercurial forest) or a symlink to same.    (e.g. mercurial forest) or a symlink to same.
28    
29      Alternatively, define ant variables thus:
30      ant -Djdk$N.home=... -Djdk$N.src.home=...
31      for $N in 6 7 8 9 ...
32    
33      As of 2015-09, there is incomplete hacky support for jigsaw
34      Build for jigsaw using something like:
35      ant -Djdk9.home="$HOME/jdk/jigsaw" -Djdk9.src.home="$HOME/jdk/src/jigsaw" clean test dist
36      "docs" target is still broken.
37  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
38    </description>    </description>
39    
40    <target name="usage" description="Advises user to run with -projecthelp">    <!-- Display main targets by running 'ant -projecthelp' -->
41      <echo>Run "ant -projecthelp" for full usage information.</echo>    <target name="usage">
42        <java classname="org.apache.tools.ant.Main">
43          <arg value="-projecthelp" />
44        </java>
45    </target>    </target>
46    
47      <!-- HOWTO printf debug: <echo message="prop=${prop}"/> -->
48    
49    <!-- User-specific settings -->    <!-- User-specific settings -->
50    <property file="user.properties"/>    <property file="user.properties"/>
51    
52    
53    <!-- Compilation options -->    <!-- Compilation options -->
54    <property name="build.sourcelevel"    value="1.6"/>    <property name="build.sourcelevel"    value="6"/>
55    <property name="build.debug"          value="true"/>    <property name="build.debug"          value="true"/>
56    <property name="build.debuglevel"     value="source,lines,vars"/>    <property name="build.debuglevel"     value="source,lines,vars"/>
57    <property name="build.deprecation"    value="false"/>    <property name="build.deprecation"    value="false"/>
58      <property name="build.javadoc.access" value="protected"/>
59    
60    <!-- Build locations -->    <!-- Build locations -->
61    <property name="build.dir"                   location="build"/>    <property name="build.dir"                   location="build"/>
62    <property name="build.classes.dir"           location="${build.dir}/classes"/>    <property name="build.classes.dir"           location="${build.dir}/classes"/>
63    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
64    <property name="build.loops.dir"             location="${build.dir}/loops"/>    <property name="build.loops.dir"             location="${build.dir}/loops"/>
   <property name="build.lib.dir"               location="${build.dir}/lib"/>  
   <property name="build.javadocs.dir"          location="${build.dir}/javadocs"/>  
65    <property name="build.reports.dir"           location="${build.dir}/reports"/>    <property name="build.reports.dir"           location="${build.dir}/reports"/>
66    
67    <property name="build.4jdk7.dir"              location="${build.dir}/4jdk7"/>    <property name="build.4jdk7.dir"             location="${build.dir}/jsr166-4jdk7"/>
68    <property name="build.4jdk7.lib.dir"          location="${build.4jdk7.dir}"/>    <property name="build.4jdk7.classes.dir"     location="${build.4jdk7.dir}/classes"/>
69    <property name="build.4jdk7.classes.dir"      location="${build.4jdk7.dir}/classes"/>    <property name="build.4jdk7.tck.classes.dir" location="${build.4jdk7.dir}/tck-classes"/>
70    <property name="build.4jdk7.tck.classes.dir"  location="${build.4jdk7.dir}/tck/classes"/>    <property name="build.4jdk7.docs.dir"        location="${build.4jdk7.dir}/docs"/>
71    <property name="build.4jdk7.docs.dir"         location="${build.4jdk7.dir}/docs"/>  
72      <property name="build.4jdk8.dir"             location="${build.dir}/jsr166-4jdk8"/>
73      <property name="build.4jdk8.classes.dir"     location="${build.4jdk8.dir}/classes"/>
74      <property name="build.4jdk8.tck.classes.dir" location="${build.4jdk8.dir}/tck-classes"/>
75      <property name="build.4jdk8.docs.dir"        location="${build.4jdk8.dir}/docs"/>
76    
77    <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>    <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
   <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>  
   <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>  
   
78    <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>    <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>
   <property name="build.jsr166ylib.dir"        location="${build.dir}/jsr166ylib"/>  
   <property name="build.jsr166yjavadocs.dir"   location="${build.dir}/jsr166yjavadocs"/>  
   
79    <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>    <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>
   <property name="build.jsr166elib.dir"        location="${build.dir}/jsr166elib"/>  
   <property name="build.jsr166ejavadocs.dir"   location="${build.dir}/jsr166ejavadocs"/>  
   
80    <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>    <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>
   <property name="build.extra166ylib.dir"      location="${build.dir}/extra166ylib"/>  
   <property name="build.extra166yjavadocs.dir" location="${build.dir}/extra166yjavadocs"/>  
81    
82    <!-- JDK binary locations -->    <property name="build.jsr166x.classes.dir"   location="${build.jsr166x.dir}/classes"/>
83      <property name="build.jsr166y.classes.dir"   location="${build.jsr166y.dir}/classes"/>
84      <property name="build.jsr166e.classes.dir"   location="${build.jsr166e.dir}/classes"/>
85      <property name="build.extra166y.classes.dir" location="${build.extra166y.dir}/classes"/>
86    
87      <!-- JDK locations -->
88    <property name="jdks.home"  location="${user.home}/jdk"/>    <property name="jdks.home"  location="${user.home}/jdk"/>
89    
90    <macrodef name="defjdklocations">    <macrodef name="defjdklocations">
91      <attribute name="v"/>      <attribute name="v"/>
92      <sequential>      <sequential>
93      <property name="jdk@{v}.home"   location="${jdks.home}/jdk@{v}"/>      <property name="jdk@{v}.home"     location="${jdks.home}/jdk@{v}"/>
94      <property name="java@{v}"       location="${jdk@{v}.home}/bin/java"/>      <property name="java@{v}"         location="${jdk@{v}.home}/bin/java"/>
95      <property name="javac@{v}"      location="${jdk@{v}.home}/bin/javac"/>      <property name="javac@{v}"        location="${jdk@{v}.home}/bin/javac"/>
96      <property name="javadoc@{v}"    location="${jdk@{v}.home}/bin/javadoc"/>      <property name="javadoc@{v}"      location="${jdk@{v}.home}/bin/javadoc"/>
97      <property name="bootdir@{v}"    location="${jdk@{v}.home}/jre/lib"/>      <property name="jdk@{v}.src.home" location="${jdks.home}/src/jdk@{v}"/>
98      <property name="jdk@{v}src.dir" location="${jdks.home}/src/jdk@{v}/jdk/src/share/classes"/>      <local name="have.java.base"/>
99      <property name="bootclasspath@{v}"      <available property="have.java.base"
100       value="${bootdir@{v}}/resources.jar:${bootdir@{v}}/rt.jar:${bootdir@{v}}/jsse.jar:${bootdir@{v}}/jce.jar:${bootdir@{v}}/:${bootdir@{v}}/charsets.jar"/>        file="${jdk@{v}.src.home}/jdk/src/java.base/share/classes" type="dir"/>
101        <property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/java.base/share/classes"
102          if:set="have.java.base"/>
103        <property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/share/classes"
104          unless:set="have.java.base"/>
105        <local name="modules"/>
106        <available property="modules" file="${jdk@{v}.home}/jmods" type="dir"/>
107        <local name="boot.jar.dir"/>
108        <property name="boot.jar.dir"   location="${jdk@{v}.home}/jre/lib" unless:set="modules"/>
109        <path id="bootclasspath@{v}" unless:set="modules">
110          <pathelement path="${boot.jar.dir}/resources.jar"/>
111          <pathelement path="${boot.jar.dir}/rt.jar"/>
112          <pathelement path="${boot.jar.dir}/jsse.jar"/>
113          <pathelement path="${boot.jar.dir}/jce.jar"/>
114          <pathelement path="${boot.jar.dir}/charsets.jar"/>
115        </path>
116        <property name="bootclasspath@{v}" value="${toString:bootclasspath@{v}}" unless:set="modules"/>
117      </sequential>      </sequential>
118    </macrodef>    </macrodef>
119    
120    <defjdklocations v="6"/>    <macrodef name="mirror-dir">
121    <defjdklocations v="7"/>      <attribute name="src"/>
122    <defjdklocations v="8"/>      <attribute name="dst"/>
   
   <macrodef name="run-tck-tests">  
     <attribute name="jvm"/>  
     <attribute name="tck.classes"/>  
     <attribute name="product.jar" default="${product.jar}"/>  
     <attribute name="jvmflags" default=""/>  
123      <sequential>      <sequential>
124      <java classname="JSR166TestCase"      <delete dir="@{dst}"/>
125            jvm="@{jvm}" fork="true">      <mkdir dir="@{dst}"/>
126          <jvmarg value="-Xbootclasspath/p:@{product.jar}"/>      <copy todir="@{dst}" preservelastmodified="true">
127          <jvmarg line="@{jvmflags}"/>        <fileset dir="@{src}"/>
128          <classpath>      </copy>
           <pathelement location="${junit.jar}"/>  
           <pathelement location="@{tck.classes}"/>  
         </classpath>  
     </java>  
129      </sequential>      </sequential>
130    </macrodef>    </macrodef>
131    
132      <defjdklocations v="6"/>
133      <defjdklocations v="7"/>
134      <defjdklocations v="8"/>
135      <defjdklocations v="9"/>
136    
137    <!-- Source locations -->    <!-- Source locations -->
138    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
139    <property name="test.src.dir"         location="${basedir}/src/test"/>    <property name="test.src.dir"         location="${basedir}/src/test"/>
140    <property name="loops.src.dir"        location="${basedir}/src/loops"/>    <property name="loops.src.dir"        location="${basedir}/src/loops"/>
141    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
142    <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>    <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>
143      <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg-jdk8"/>
144      <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>
145      <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>
146    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
147    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
148    <property name="topsrc.dir"           location="${basedir}/src"/>    <property name="topsrc.dir"           location="${basedir}/src"/>
149    <property name="4jdk7src.dir"         location="${topsrc.dir}/jdk7"/>    <property name="4jdk7src.dir"         location="${topsrc.dir}/jdk7"/>
150      <property name="4jdk8src.dir"         location="${topsrc.dir}/jdk8"/>
151    <property name="jsr166xsrc.dir"       location="${topsrc.dir}/jsr166x"/>    <property name="jsr166xsrc.dir"       location="${topsrc.dir}/jsr166x"/>
152    <property name="jsr166ysrc.dir"       location="${topsrc.dir}/jsr166y"/>    <property name="jsr166ysrc.dir"       location="${topsrc.dir}/jsr166y"/>
153    <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>    <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>
154    <property name="extra166ysrc.dir"     location="${topsrc.dir}/extra166y"/>    <property name="extra166ysrc.dir"     location="${topsrc.dir}/extra166y"/>
   <property name="jdksrc.dir"           location="/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"/>  
155    
156    <!-- Distribution locations -->    <!-- Javadoc locations -->
157    <property name="dist.javadocs.dir"          location="${dist.dir}/docs"/>    <property name="docs.dir"          location="${build.dir}/docs"/>
158    <property name="dist.4jdk7.docs.dir"        location="${dist.dir}/jsr166-4jdk7docs"/>    <property name="4jdk7docs.dir"     location="${build.4jdk7.dir}/docs"/>
159    <property name="dist.jsr166xjavadocs.dir"   location="${dist.dir}/jsr166xdocs"/>    <property name="4jdk8docs.dir"     location="${build.4jdk8.dir}/docs"/>
160    <property name="dist.jsr166yjavadocs.dir"   location="${dist.dir}/jsr166ydocs"/>    <property name="jsr166xdocs.dir"   location="${build.jsr166x.dir}/docs"/>
161    <property name="dist.jsr166ejavadocs.dir"   location="${dist.dir}/jsr166edocs"/>    <property name="jsr166ydocs.dir"   location="${build.jsr166y.dir}/docs"/>
162    <property name="dist.extra166yjavadocs.dir" location="${dist.dir}/extra166ydocs"/>    <property name="jsr166edocs.dir"   location="${build.jsr166e.dir}/docs"/>
163      <property name="extra166ydocs.dir" location="${build.extra166y.dir}/docs"/>
164    
165      <property name="dist.docs.dir"          location="${dist.dir}/docs"/>
166      <property name="dist.4jdk7docs.dir"     location="${dist.dir}/jsr166-4jdk7docs"/>
167      <property name="dist.4jdk8docs.dir"     location="${dist.dir}/jsr166-4jdk8docs"/>
168      <property name="dist.jsr166xdocs.dir"   location="${dist.dir}/jsr166xdocs"/>
169      <property name="dist.jsr166ydocs.dir"   location="${dist.dir}/jsr166ydocs"/>
170      <property name="dist.jsr166edocs.dir"   location="${dist.dir}/jsr166edocs"/>
171      <property name="dist.extra166ydocs.dir" location="${dist.dir}/extra166ydocs"/>
172    
173    <!-- Jar locations -->    <!-- Jar locations -->
174    <property name="product.jar"      location="${build.lib.dir}/jsr166.jar"/>    <property name="product.jar"      location="${build.dir}/jsr166.jar"/>
175    <property name="4jdk7product.jar" location="${build.4jdk7.lib.dir}/jsr166-4jdk7.jar"/>    <property name="4jdk7product.jar" location="${build.4jdk7.dir}/jsr166-4jdk7.jar"/>
176    <property name="jsr166x.jar"      location="${build.jsr166xlib.dir}/jsr166x.jar"/>    <property name="4jdk8product.jar" location="${build.4jdk8.dir}/jsr166-4jdk8.jar"/>
177    <property name="jsr166y.jar"      location="${build.jsr166ylib.dir}/jsr166y.jar"/>    <property name="jsr166x.jar"      location="${build.jsr166x.dir}/jsr166x.jar"/>
178    <property name="jsr166e.jar"      location="${build.jsr166elib.dir}/jsr166e.jar"/>    <property name="jsr166y.jar"      location="${build.jsr166y.dir}/jsr166y.jar"/>
179    <property name="extra166y.jar"    location="${build.extra166ylib.dir}/extra166y.jar"/>    <property name="jsr166e.jar"      location="${build.jsr166e.dir}/jsr166e.jar"/>
180      <property name="extra166y.jar"    location="${build.extra166y.dir}/extra166y.jar"/>
181    <property name="junit.jar"        location="${lib.dir}/junit.jar"/>    <property name="junit.jar"        location="${lib.dir}/junit.jar"/>
182    
183    <!-- Bootclasspath argument -->    <!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag -->
184    <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>    <property name="java5.docroot.url"      value="http://docs.oracle.com/javase/1.5.0/docs"/>
185      <property name="java6.docroot.url"      value="http://docs.oracle.com/javase/6/docs"/>
186      <property name="java7.docroot.url"      value="http://docs.oracle.com/javase/7/docs"/>
187      <property name="java8.docroot.url"      value="http://docs.oracle.com/javase/8/docs"/>
188      <!-- The expected canonical location does not yet exist as of 2016-03 -->
189      <!-- <property name="java9.docroot.url" value="http://docs.oracle.com/javase/9/docs"/> -->
190      <property name="java9.docroot.url"      value="http://download.java.net/jdk9/docs"/>
191      <!-- Default jdk doc location (latest stable release seems best) -->
192      <property name="java.docroot.url"       value="${java8.docroot.url}"/>
193    
194    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
195    <property name="jdkapi5docs.url"      value="http://docs.oracle.com/javase/1.5.0/docs/api/"/>    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>
196    <property name="jdkapi6docs.url"      value="http://docs.oracle.com/javase/6/docs/api/"/>    <property name="java6.api.url"      value="${java6.docroot.url}/api/"/>
197    <property name="jdkapi7docs.url"      value="http://docs.oracle.com/javase/7/docs/api/"/>    <property name="java7.api.url"      value="${java7.docroot.url}/api/"/>
198      <property name="java8.api.url"      value="${java8.docroot.url}/api/"/>
199    <property name="jdkapi8docs.url"      value="http://download.java.net/jdk8/docs/api/"/>    <property name="java9.api.url"      value="${java9.docroot.url}/api/"/>
200    <!-- The below does not yet exist as of 2012-11 -->    <property name="java.api.url"       value="${java.docroot.url}/api/"/>
201    <!-- <property name="jdkapi8docs.url" value="http://docs.oracle.com/javase/8/docs/api/"/> -->  
202      <!-- Define the "jtreg" task -->
203    <!-- Default jdk api doc location (latest stable release seems best) -->    <!-- See the docs in "jtreg -onlineHelp" -->
204    <property name="jdkapidocs.url"       value="${jdkapi7docs.url}"/>    <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"
205               classpath="${lib.dir}/jtreg.jar" />
206    <!-- Test classpath -->  
207    <path id="test.classpath">    <!-- Tck options; see JSR166TestCase.java
208      <pathelement location="${build.testcases.dir}"/>     To profile a single tck test class:
209      <pathelement location="${junit.jar}"/>     ant -Djsr166.profileTests=true -Djsr166.profileThreshold=10 -Djsr166.tckTestClass=CompletableFutureTest tck
210    </path>     To stress test a single tck test class:
211       ant -Djsr166.tckTestClass=CountedCompleterTest -Djsr166.runsPerTest=100 tck
212       To stress test a single tck test method:
213       ant -Djsr166.tckTestClass=RecursiveTaskTest -Djsr166.runsPerTest=1000 -Djsr166.methodFilter=testAbnormalInvokeAll3 tck
214      -->
215      <property name="jsr166.tckTestClass"     value="JSR166TestCase"/>
216      <macrodef name="run-tck-tests">
217        <attribute name="tck.src.dir" default="${tck.src.dir}"/>
218        <attribute name="target"/>
219        <attribute name="compile-target" default="@{target}"/>
220        <attribute name="workdir"/>
221        <attribute name="classes"/>
222        <attribute name="jvmflags" default="-ea -esa -Djsr166.testImplementationDetails=true"/>
223        <element name="javac-elements" optional="true"/>
224    
225        <sequential>
226    
227        <local name="modules"/>
228        <condition property="modules">
229          <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>
230        </condition>
231    
232        <mkdir dir="@{workdir}/tck-classes"/>
233    
234        <javac srcdir="@{tck.src.dir}"
235               destdir="@{workdir}/tck-classes"
236               debug="${build.debug}"
237               debuglevel="${build.debuglevel}"
238               deprecation="${build.deprecation}"
239               source="@{compile-target}"
240               target="@{compile-target}"
241               classpath="${junit.jar}"
242               includeAntRuntime="false"
243               includeJavaRuntime="false"
244               executable="${javac@{compile-target}}"
245               fork="true">
246    
247          <include name="*.java"/>
248          <compilerarg value="-XDignore.symbol.file=true"/>
249          <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
250          <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
251          <compilerarg value="-Xpatch:${build.classes.dir}" if:set="modules"/>
252          <compilerarg line="${build.args}"/>
253          <javac-elements/>
254    
255        </javac>
256    
257        <java classname="${jsr166.tckTestClass}"
258              failonerror="true"
259              jvm="${java@{target}}"
260              fork="true">
261            <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
262            <jvmarg value="-Xpatch:${build.classes.dir}" if:set="modules"/>
263            <jvmarg line="@{jvmflags}"/>
264    
265            <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
266            <syspropertyset id="system-properties-used-by-tck">
267              <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
268              <propertyref prefix="jsr166."/>
269              <propertyref name="test.timeout.factor"/>
270            </syspropertyset>
271    
272            <classpath>
273              <pathelement location="${junit.jar}"/>
274              <pathelement location="@{workdir}/tck-classes"/>
275            </classpath>
276        </java>
277    
278        </sequential>
279      </macrodef>
280    
281      <!-- Define jtreg test sets for different jdk versions -->
282      <fileset dir="${jtreg9.src.dir}">
283        <patternset id="jdk9.jtreg.tests">
284          <include name="**/*.java"/>
285        </patternset>
286      </fileset>
287    
288      <fileset dir="${jtreg8.src.dir}">
289        <patternset id="jdk8.jtreg.tests">
290          <include name="**/*.java"/>
291          <exclude name="**/SpliteratorCharacteristics.java"/>
292          <!-- https://bugs.openjdk.java.net/browse/JDK-6842353 -->
293          <exclude name="**/GCDuringIteration.java"/>
294        </patternset>
295      </fileset>
296    
297      <fileset dir="${jtreg7.src.dir}">
298        <patternset id="jdk7.jtreg.tests">
299          <include name="**/*.java"/>
300        </patternset>
301      </fileset>
302    
303      <!-- ant -Djtreg.flags=-timeoutFactor:4 -->
304      <property name="jtreg.flags" value=""/>
305    
306      <macrodef name="run-jtreg-tests">
307        <!-- ant -Djtreg9.src.dir=src/test/jtreg/util/concurrent/CompletableFuture jtreg -->
308        <attribute name="source" default="7"/>
309        <attribute name="target"/>
310        <attribute name="workdir"/>
311        <attribute name="classes"/>
312        <attribute name="jtregflags" default=""/>
313    
314        <sequential>
315    
316        <!-- ant -Djtreg.verbose=time,fail,error jtreg -->
317        <property name="jtreg.verbose" value="nopass,fail,error"/>
318    
319        <local name="modules"/>
320        <condition property="modules">
321          <available file="${jdk@{target}.home}/jmods" type="dir"/>
322        </condition>
323    
324        <delete dir="@{workdir}/JTwork"   quiet="true"/>
325        <delete dir="@{workdir}/JTreport" quiet="true"/>
326        <mkdir dir="@{workdir}/JTwork/scratch"/>
327        <!-- workaround for https://bugs.openjdk.java.net/browse/CODETOOLS-7901571 -->
328        <mkdir dir="@{workdir}/JTreport/html"/>
329        <mkdir dir="@{workdir}/JTreport/text"/>
330        <jtreg dir="${jtreg@{target}.src.dir}"
331               jdk="${jdk@{target}.home}"
332               workDir="@{workdir}/JTwork"
333               reportDir="@{workdir}/JTreport">
334          <patternset refid="jdk@{target}.jtreg.tests"/>
335          <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
336          <arg value="-Xpatch:${build.classes.dir}" if:set="modules"/>
337          <arg value="-agentvm"/>
338          <arg value="-verbose:${jtreg.verbose}"/>
339          <arg value="-vmoptions:-esa -ea"/>
340          <arg value="-automatic"/>
341          <arg value="-k:!ignore"/>
342          <arg line="@{jtregflags}"/>
343          <arg line="${jtreg.flags}"/>
344        </jtreg>
345        </sequential>
346      </macrodef>
347    
348    <!-- ALoops classpath -->    <!-- ALoops classpath -->
349    <path id="loops.classpath">    <path id="loops.classpath">
# Line 170  Line 351 
351    </path>    </path>
352    
353    <!-- Support @jls tag, used in jdk8+ javadoc -->    <!-- Support @jls tag, used in jdk8+ javadoc -->
354    <!-- TODO: How do we get &trade to work? -->    <property name="javadoc.jls.cite" value="The Java&amp;trade; Language Specification"/>
   <!-- TODO: Why isn't @jls a "standard" tag? -->  
   <!--   property name="javadoc.jls.cite" value="The Java&trade; Language Specification" -->  
   <property name="javadoc.jls.cite" value="The Java Language Specification"/>  
355    <property name="javadoc.jls.option" value="jls:a:See &lt;cite&gt;${javadoc.jls.cite}&lt;/cite&gt;:"/>    <property name="javadoc.jls.option" value="jls:a:See &lt;cite&gt;${javadoc.jls.cite}&lt;/cite&gt;:"/>
356    
357    <!-- Main targets -->    <!-- Main targets -->
358    
359      <property name="build.main.java.version" value="9"/>
360      <property name="build.main.javac" value="${javac9}"/>
361    
362    <target name="dists"    <target name="dists"
363            depends="dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"            depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
364            description="Builds all public jars and docs"/>            description="Builds all public jars and docs"/>
365    
366    <target name="compile"    <target name="compile"
367            depends="configure-compiler"            depends="configure-compiler"
368            description="Compiles src/main sources to build dir">            description="Compiles src/main sources to build dir">
369    
370      <mkdir dir="${build.classes.dir}"/>      <local name="modules"/>
371        <condition property="modules">
372          <and>
373            <available file="${jdk9.home}/jmods" type="dir"/>
374            <equals arg1="9" arg2="${build.main.java.version}"/>
375          </and>
376        </condition>
377    
378        <local name="destdir"/>
379        <property name="destdir" value="${build.classes.dir}/java.base" if:set="modules"/>
380        <property name="destdir" value="${build.classes.dir}" unless:set="modules"/>
381    
382        <mkdir dir="${destdir}"/>
383    
384      <javac srcdir="${src.dir}"      <javac srcdir="${src.dir}"
385             destdir="${build.classes.dir}"             destdir="${destdir}"
386             debug="${build.debug}"             debug="${build.debug}"
387             debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
388             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
389             classpath=""             classpath=""
390             includeAntRuntime="false"             includeAntRuntime="false"
391             includeJavaRuntime="false"             includeJavaRuntime="false"
392             executable="${javac8}"             executable="${build.main.javac}"
393             fork="true">             fork="true">
394    
395        <include name="**/*.java"/>        <include name="**/*.java"/>
396        <compilerarg line="${build.args}"/>        <compilerarg value="-Xmodule:java.base" if:set="modules"/>
397          <compilerarg value="-Xprefer:source"/>
398        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
399        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
400          <compilerarg value="-Werror"/>
401  <!--        <compilerarg value="-Xdoclint:all/protected"/>
402        <exclude name="java/lang/**"/>        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
403        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
       <compilerarg line="-Xlint -Xmaxwarns 1000"/>  
 -->  
404    
405      </javac>      </javac>
406    
407        <!-- We need jdk9's Contended annotation, but at compile time only -->
408        <delete file="${destdir}/jdk/internal/vm/annotation/Contended.class"/>
409    </target>    </target>
410    
411    
   
412    <target name="jar"    <target name="jar"
413            depends="compile"            depends="compile"
414            description="Builds library jar from compiled sources">            description="Builds library jar from compiled sources">
415    
     <mkdir dir="${build.lib.dir}"/>  
   
416      <jar destfile="${product.jar}">      <jar destfile="${product.jar}">
417        <fileset dir="${build.classes.dir}"/>        <fileset dir="${build.classes.dir}"/>
418          <manifest>
419            <attribute name="Built-By" value="${user.name}"/>
420            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
421          </manifest>
422      </jar>      </jar>
   
423    </target>    </target>
424    
425    
   
   <target name="test"  
           depends="configure-tests, report-tests"  
           description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />  
   
   
   
426    <target name="docs"    <target name="docs"
427            description="Builds javadocs for src/main to dist dir">            description="Builds javadocs for src/main to dist dir">
428    
429      <delete dir="${dist.javadocs.dir}"/>      <delete dir="${docs.dir}"/>
430      <mkdir dir="${dist.javadocs.dir}"/>      <mkdir dir="${docs.dir}"/>
431    
432      <!-- the packagenames="none" hack below prevents scanning the -->      <!-- the packagenames="none" hack below prevents scanning the -->
433      <!-- sourcepath for packages -->      <!-- sourcepath for packages -->
434    
435      <javadoc destdir="${dist.javadocs.dir}"      <javadoc destdir="${docs.dir}"
436               packagenames="none"               packagenames="none"
437               link="${jdkapi8docs.url}"               link="${java9.api.url}"
438               overview="${src.dir}/intro.html"               overview="${src.dir}/intro.html"
439               sourcepath="${src.dir}:${jdk8src.dir}"               access="${build.javadoc.access}"
440                 sourcepath="${src.dir}:${jdk9.src.dir}"
441               classpath=""               classpath=""
442               executable="${javadoc8}">               executable="${javadoc9}">
       <arg value="-XDignore.symbol.file=true"/>  
       <arg value="-tag"/>  
       <arg value="${javadoc.jls.option}"/>  
443        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
444          <include name="**/*.java"/>          <include name="**/*.java"/>
445        </fileset>        </fileset>
446          <arg line="-Xdocrootparent ${java9.docroot.url}"/>
447          <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
448          <arg value="-XDignore.symbol.file=true"/>
449    <!--  TODO     <arg value="-Xmodule:java.base"/> -->
450          <arg value="-tag"/>
451          <arg value="${javadoc.jls.option}"/>
452          <arg value="-tag"/>
453          <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
454          <arg value="-tag"/>
455          <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
456          <arg value="-tag"/>
457          <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
458    <!-- tags added in jdk9 -->
459          <arg value="-tag"/>
460          <arg value="revised:X"/>
461          <arg value="-tag"/>
462          <arg value="spec:X"/>
463      </javadoc>      </javadoc>
   
464    </target>    </target>
465    
466    
   
467    <target name="dist"    <target name="dist"
468            depends="dist-clean, dist-jar, docs"            depends="dist-clean, dist-jar, dist-docs"
469            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
470    
471    
# Line 283  Line 483 
483        <exclude name="src/emulation/**"/>        <exclude name="src/emulation/**"/>
484        <exclude name="**/SyntaxTest.java"/>        <exclude name="**/SyntaxTest.java"/>
485        <exclude name="**/SuperfluousAbstract.java"/>        <exclude name="**/SuperfluousAbstract.java"/>
486          <manifest>
487            <attribute name="Built-By" value="${user.name}"/>
488            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
489          </manifest>
490      </jar>      </jar>
   
491    </target>    </target>
492    
493    
   
494    <target name="clean"    <target name="clean"
495            description="Removes all build products">            description="Removes all build products">
496    
497      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
     <delete dir="${build.classes.dir}"/>  
     <delete dir="${build.lib.dir}"/>  
498    
499    </target>    </target>
500    
501    
   
502    <target name="dist-clean"    <target name="dist-clean"
503            description="Removes all build and distribution products">            description="Removes all build and distribution products">
504    
505        <delete dir="${build.dir}"/>
506      <delete dir="${dist.dir}"/>      <delete dir="${dist.dir}"/>
507    
508    </target>    </target>
509    
510    
511      <target name="dist-jar"
512              depends="clean, jar">
513        <copy file="${product.jar}" todir="${dist.dir}"/>
514      </target>
515    
516    <!-- Internal targets -->    <target name="dist-docs"
517              depends="clean, docs">
518        <mirror-dir src="${docs.dir}" dst="${dist.docs.dir}"/>
519      </target>
520    
521      <target name="tck"
522              depends="jar"
523              description="Runs tck tests for main directly">
524    
525    <target name="dist-jar"      <run-tck-tests
526            depends="clean, jar">        target="${build.main.java.version}"
527          workdir="${build.dir}"
528          classes="${product.jar}"/>
529      </target>
530    
531      <target name="tck-parallelism-1"
532              description="Runs tck with given common pool parallelism">
533        <antcall target="tck">
534          <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="1"/>
535        </antcall>
536      </target>
537    
538      <target name="tck-parallelism-0"
539              description="Runs tck with given common pool parallelism">
540        <antcall target="tck">
541          <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="0"/>
542        </antcall>
543      </target>
544    
545      <target name="jtreg"
546              depends="jar"
547              description="Runs jtreg tests for main using the jtreg ant task">
548        <run-jtreg-tests
549           target="${build.main.java.version}"
550           workdir="${build.dir}"
551           classes="${product.jar}"/>
552      </target>
553    
554      <copy file="${product.jar}" todir="${dist.dir}"/>    <target name="test"
555              depends="tck, tck-parallelism-1, jtreg"
556              description="Runs tck and jtreg tests for main">
557      </target>
558    
559      <target name="jtreg8" description="Runs jtreg tests with jdk8">
560    
561        <antcall target="jtreg">
562          <param name="build.main.java.version" value="8"/>
563          <param name="build.main.javac" value="${javac8}"/>
564        </antcall>
565    
566    </target>    </target>
567    
568      <target name="test89"
569              description="Runs tck and jtreg tests for main for multiple java versions">
570    
571    <target name="compile-tests"      <antcall target="clean"/>
572            depends="jar">      <antcall target="test">
573          <param name="build.main.java.version" value="8"/>
574          <param name="build.main.javac" value="${javac8}"/>
575        </antcall>
576    
577      <mkdir dir="${build.testcases.dir}"/>      <antcall target="clean"/>
578        <antcall target="test">
579          <param name="build.main.java.version" value="9"/>
580          <param name="build.main.javac" value="${javac9}"/>
581        </antcall>
582    
583      <javac srcdir="${tck.src.dir}"    </target>
           destdir="${build.testcases.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
584    
       <compilerarg value="${bootclasspath.args}"/>  
       <compilerarg line="${build.args}"/>  
       <compilerarg value="-XDignore.symbol.file=true"/>  
585    
       <classpath refid="test.classpath"/>  
586    
587      </javac>    <target name="configure-compiler">
588        <fail message="ant version too old">
589          <condition>
590            <not> <antversion atleast="1.9.1"/> </not>
591          </condition>
592        </fail>
593    
594      <javac srcdir="${test.src.dir}"      <property name="unchecked.option" value="-Xlint:unchecked"/>
           destdir="${build.testcases.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
595    
596        <include name="jsr166/test/**"/>      <condition property="warnunchecked.arg" value="${unchecked.option}">
597          <istrue value="${build.warnunchecked}"/>
598        </condition>
599    
600        <compilerarg value="${bootclasspath.args}"/>      <property name="warnunchecked.arg" value=""/>
       <compilerarg line="${build.args}"/>  
       <compilerarg value="-XDignore.symbol.file=true"/>  
601    
       <classpath refid="test.classpath"/>  
602    
603      </javac>      <!-- Common options in javac invocations -->
604        <property name="build.args" value="${warnunchecked.arg}"/>
605    
606      </target>
607    
608  <!--  
609      <javac srcdir="${jtreg.src.dir}"  
610            destdir="${build.testcases.dir}"    <!-- Various demos and test programs -->
611    
612    
613      <target name="loops" depends="configure-compiler"
614              description="Benchmark from Doug Lea's AQS paper">
615    
616        <mkdir dir="${build.loops.dir}"/>
617    
618        <javac srcdir="${loops.src.dir}"
619              destdir="${build.loops.dir}"
620              debug="${build.debug}"              debug="${build.debug}"
621         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
622        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
623             source="${build.sourcelevel}"             source="${build.sourcelevel}"
624               target="${build.sourcelevel}"
625               fork="true">               fork="true">
626    
       <compilerarg value="${bootclasspath.args}"/>  
627        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
628          <classpath refid="loops.classpath"/>
629        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
630    
       <classpath refid="test.classpath"/>  
   
631      </javac>      </javac>
632  -->  
633        <java classname="ALoops" fork="true">
634          <classpath refid="loops.classpath"/>
635        </java>
636    
637    </target>    </target>
638    
639    
640    <target name="run-tests"    <target name="compile-test-loops" depends="jar"
641            depends="compile-tests">            description="compile all the perf tests in src/test/loops">
642    
643      <!-- May be overridden by user.properties -->      <mkdir dir="${build.dir}/test/loops"/>
     <property name="testcase" value="*"/>  
644    
645      <mkdir dir="${build.reports.dir}"/>      <javac srcdir="${basedir}/src/test/loops"
646               destdir="${build.dir}/test/loops"
647               debug="${build.debug}"
648               debuglevel="${build.debuglevel}"
649               deprecation="${build.deprecation}"
650               includeAntRuntime="false"
651               includeJavaRuntime="false"
652               executable="${javac9}"
653               fork="true">
654    
655      <junit printsummary="true"        <include name="*.java"/>
656               showoutput="true"        <compilerarg value="-XDignore.symbol.file=true"/>
657            errorProperty="junit.failed"        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
658          failureProperty="junit.failed"        <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
659                      dir="${build.reports.dir}"        <compilerarg line="${build.args}"/>
                    fork="true">  
660    
661        <jvmarg value="${bootclasspath.args}"/>      </javac>
       <jvmarg value="-server"/>  
       <jvmarg value="-showversion"/>  
662    
663        <classpath refid="test.classpath"/>    </target>
664    
       <formatter type="xml"/>  
665    
666        <batchtest todir="${build.reports.dir}" unless="no.test.tck">    <!-- jsr166 4jdk8 -->
         <fileset dir="${tck.src.dir}">  
           <include name="**/${testcase}Test.java"/>  
         </fileset>  
       </batchtest>  
   
       <batchtest todir="${build.reports.dir}" if="do.test.old">  
         <fileset dir="${test.src.dir}">  
           <include name="jsr166/test/**/${testcase}Test.java"/>  
         </fileset>  
       </batchtest>  
   
 <!--  
       <batchtest todir="${build.reports.dir}" if="do.test.jtreg">  
         <fileset dir="${jtreg.src.dir}">  
           <include name="**/${testcase}Test.java"/>  
         </fileset>  
       </batchtest>  
 -->  
667    
668      </junit>    <target name="4jdk8compile"
669              depends="configure-compiler"
670              description="Compiles src/jdk8 sources, targeting jdk8">
671    
672        <mkdir dir="${build.4jdk8.classes.dir}"/>
673    
674        <javac srcdir="${4jdk8src.dir}"
675               destdir="${build.4jdk8.classes.dir}"
676               debug="${build.debug}"
677               debuglevel="${build.debuglevel}"
678               deprecation="${build.deprecation}"
679               source="8"
680               target="8"
681               classpath=""
682               bootclasspath="${bootclasspath8}"
683               includeAntRuntime="false"
684               includeJavaRuntime="false"
685               executable="${javac8}"
686               fork="true">
687    
688          <include name="**/*.java"/>
689          <compilerarg value="-Xprefer:source"/>
690          <compilerarg value="-XDignore.symbol.file=true"/>
691          <compilerarg value="-Xlint:all"/>
692          <compilerarg value="-Werror"/>
693          <compilerarg line="${build.args}"/>
694    
695        </javac>
696    </target>    </target>
697    
698      <target name="4jdk8doclint"
699              depends="configure-compiler"
700              description="Finds doclint warnings">
701    
702    <target name="report-tests"      <mkdir dir="${build.4jdk8.classes.dir}"/>
           depends="run-tests">  
703    
704      <!-- Sets junit.report.format to frames if redirection is present,      <javac srcdir="${4jdk8src.dir}"
705           otherwise sets it to noframes. -->             destdir="${build.4jdk8.classes.dir}"
706      <available property="junit.report.format"             debug="${build.debug}"
707                    value="frames"             debuglevel="${build.debuglevel}"
708                classname="org.apache.xalan.lib.Redirect"             deprecation="${build.deprecation}"
709      />             source="8"
710      <property name="junit.report.format" value="noframes"/>             target="8"
711               classpath=""
712      <junitreport todir="${build.reports.dir}">             bootclasspath="${bootclasspath8}"
713        <fileset dir="${build.reports.dir}">             includeAntRuntime="false"
714          <include name="TEST-*.xml"/>             includeJavaRuntime="false"
715        </fileset>             executable="${javac8}"
716        <report format="${junit.report.format}" todir="${build.reports.dir}"             fork="true">
       />  
     </junitreport>  
717    
718      <fail message="Test Cases Failed" if="junit.failed"/>        <include name="**/*.java"/>
719          <compilerarg value="-Xprefer:source"/>
720          <compilerarg value="-XDignore.symbol.file=true"/>
721          <compilerarg value="-Xlint:all"/>
722          <compilerarg value="-Xdoclint:all/protected"/>
723          <compilerarg line="${build.args}"/>
724    
725        </javac>
726    </target>    </target>
727    
728    
729    <target name="configure-compiler">    <target name="4jdk8jar"
730              depends="4jdk8compile"
731              description="Builds library jar from compiled sources">
732    
733      <property name="unchecked.option" value="-Xlint:unchecked"/>      <jar destfile="${4jdk8product.jar}">
734          <fileset dir="${build.4jdk8.classes.dir}"/>
735          <manifest>
736            <attribute name="Built-By" value="${user.name}"/>
737            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
738          </manifest>
739        </jar>
740    
741      <condition property="warnunchecked.arg" value="${unchecked.option}">    </target>
       <istrue value="${build.warnunchecked}"/>  
     </condition>  
742    
     <property name="warnunchecked.arg" value=""/>  
743    
744      <target name="4jdk8-tck"
745              depends="4jdk8jar"
746              description="Runs tck tests for jsr166-4jdk8 directly">
747    
748      <!-- Common options in javac invocations -->      <run-tck-tests
749      <property name="build.args" value="${warnunchecked.arg}"/>        target="8"
750          workdir="${build.4jdk8.dir}"
751          classes="${4jdk8product.jar}">
752          <javac-elements>
753            <!-- JDK9+ test classes -->
754            <exclude name="*9Test.java"/>
755            <exclude name="*10Test.java"/>
756          </javac-elements>
757        </run-tck-tests>
758      </target>
759    
760    
761      <target name="4jdk8-jtreg"
762              depends="4jdk8jar"
763              description="Runs jtreg tests for jsr166-4jdk8 using the jtreg ant task">
764        <run-jtreg-tests
765           target="8"
766           workdir="${build.4jdk8.dir}"
767           classes="${4jdk8product.jar}"/>
768      </target>
769    
770    
771      <target name="4jdk8-test"
772              depends="4jdk8-tck, 4jdk8-jtreg"
773              description="Runs tck and jtreg tests for jsr166-4jdk8">
774    </target>    </target>
775    
776    
777    <target name="configure-tests"    <target name="4jdk8docs"
778         depends="configure-compiler">            description="Builds javadocs for src/jdk8 to dist dir">
779    
780      <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->      <delete dir="${4jdk8docs.dir}"/>
781      <available property="junit.available"      <mkdir dir="${4jdk8docs.dir}"/>
                classname="junit.framework.Protectable"/>  
   
     <!-- Xalan -->  
     <available property="xalan.available"  
                classname="org.apache.xalan.Version"/>  
   
   
     <!-- Ant 1.6beta and later don't need or want this check -->  
     <!--  
     <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"  
           unless="junit.available"/>  
   
     <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"  
           unless="xalan.available"/>  
     -->  
782    
783        <javadoc destdir="${4jdk8docs.dir}"
784                 packagenames="none"
785                 link="${java8.api.url}"
786                 overview="${4jdk8src.dir}/intro.html"
787                 access="${build.javadoc.access}"
788                 sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"
789                 classpath=""
790                 executable="${javadoc8}">
791          <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
792            <include name="**/*.java"/>
793          </fileset>
794          <arg line="-Xdocrootparent ${java8.docroot.url}"/>
795          <arg value="-XDignore.symbol.file=true"/>
796          <arg value="-tag"/>
797          <arg value="${javadoc.jls.option}"/>
798          <arg value="-tag"/>
799          <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
800          <arg value="-tag"/>
801          <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
802          <arg value="-tag"/>
803          <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
804        </javadoc>
805    </target>    </target>
806    
807    
808    <!-- Various demos and test programs -->    <target name="4jdk8dist"
809              depends="4jdk8dist-jar, 4jdk8dist-docs"
810              description="Puts all distributable products in single hierarchy"/>
811    
812    
813    <target name="loops" depends="configure-compiler"    <target name="4jdk8clean"
814            description="Benchmark from Doug Lea's AQS paper">            description="Removes all 4jdk8 build products">
815    
816      <mkdir dir="${build.loops.dir}"/>      <delete dir="${build.4jdk8.dir}"/>
817    
818      <javac srcdir="${loops.src.dir}"    </target>
           destdir="${build.loops.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
819    
       <compilerarg line="${build.args}"/>  
       <classpath refid="loops.classpath"/>  
       <compilerarg value="-XDignore.symbol.file=true"/>  
820    
821      </javac>    <target name="4jdk8dist-jar"
822              depends="4jdk8clean, 4jdk8jar">
823        <copy file="${4jdk8product.jar}" todir="${dist.dir}"/>
824      </target>
825    
     <java classname="ALoops" fork="true">  
       <classpath refid="loops.classpath"/>  
     </java>  
826    
827      <target name="4jdk8dist-docs"
828              depends="4jdk8clean, 4jdk8docs">
829        <mirror-dir src="${4jdk8docs.dir}" dst="${dist.4jdk8docs.dir}"/>
830    </target>    </target>
831    
832    
   <!-- jsr166 4jdk7 -->  
833    
834      <!-- jsr166 4jdk7 -->
835    
836    <target name="4jdk7compile"    <target name="4jdk7compile"
837            depends="configure-compiler"            depends="configure-compiler"
# Line 537  Line 845 
845             debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
846             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
847             source="6"             source="6"
848               target="6"
849             classpath=""             classpath=""
850             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
851             includeAntRuntime="false"             includeAntRuntime="false"
# Line 545  Line 854 
854             fork="true">             fork="true">
855    
856        <include name="**/*.java"/>        <include name="**/*.java"/>
857        <compilerarg line="${build.args}"/>        <compilerarg value="-Xprefer:source"/>
858        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
859        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
860          <compilerarg value="-Werror"/>
861          <compilerarg line="${build.args}"/>
862    
863      </javac>      </javac>
864      </target>
865    
866      <mkdir dir="${build.4jdk7.lib.dir}"/>    <target name="4jdk7doclint"
867              depends="configure-compiler"
868      <jar destfile="${4jdk7product.jar}" index="true">            description="Finds doclint warnings">
       <fileset dir="${build.4jdk7.classes.dir}"/>  
     </jar>  
869    
870      <mkdir dir="${build.4jdk7.tck.classes.dir}"/>      <mkdir dir="${build.4jdk7.classes.dir}"/>
871    
872      <javac srcdir="${tck.src.dir}"      <javac srcdir="${4jdk7src.dir}"
873             destdir="${build.4jdk7.tck.classes.dir}"             destdir="${build.4jdk7.classes.dir}"
874             debug="${build.debug}"             debug="${build.debug}"
875             debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
876             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
877             source="6"             source="6"
878             classpath="${junit.jar}"             target="6"
879             bootclasspath="${4jdk7product.jar}:${bootclasspath6}"             classpath=""
880               bootclasspath="${bootclasspath6}"
881             includeAntRuntime="false"             includeAntRuntime="false"
882             includeJavaRuntime="false"             includeJavaRuntime="false"
883             executable="${javac7}"             executable="${javac8}"
884             fork="true">             fork="true">
885    
886        <include name="**/*.java"/>        <include name="**/*.java"/>
887        <compilerarg line="${build.args}"/>        <compilerarg value="-Xprefer:source"/>
888        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
889        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>        <compilerarg value="-Xlint:all"/>
890          <compilerarg value="-Xdoclint:all/protected"/>
891          <compilerarg line="${build.args}"/>
892    
893      </javac>      </javac>
894      </target>
895    
896    
897      <target name="4jdk7jar"
898              depends="4jdk7compile"
899              description="Builds library jar from compiled sources">
900    
901        <jar destfile="${4jdk7product.jar}">
902          <fileset dir="${build.4jdk7.classes.dir}"/>
903          <manifest>
904            <attribute name="Built-By" value="${user.name}"/>
905            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
906          </manifest>
907        </jar>
908    
909    </target>    </target>
910    
911    
912    <target name="4jdk7-test-tck"    <target name="4jdk7-tck"
913            depends="4jdk7compile"            depends="4jdk7jar"
914            description="Runs tck tests for jsr166-4jdk7 directly">            description="Runs tck tests for jsr166-4jdk7 directly">
915    
916      <run-tck-tests      <run-tck-tests
917        jvm="${java7}"        target="7"
918        tck.classes="${build.4jdk7.tck.classes.dir}"        workdir="${build.4jdk7.dir}"
919        product.jar="${4jdk7product.jar}"/>        classes="${4jdk7product.jar}">
920          <javac-elements>
921            <!-- JDK8+ test classes -->
922            <exclude name="*8Test.java"/>
923            <exclude name="*9Test.java"/>
924            <exclude name="*10Test.java"/>
925            <exclude name="DoubleAccumulatorTest.java"/>
926            <exclude name="DoubleAdderTest.java"/>
927            <exclude name="LongAccumulatorTest.java"/>
928            <exclude name="LongAdderTest.java"/>
929            <exclude name="CompletableFutureTest.java"/>
930            <exclude name="SplittableRandomTest.java"/>
931            <exclude name="StampedLockTest.java"/>
932            <exclude name="SubmissionPublisherTest.java"/>
933          </javac-elements>
934        </run-tck-tests>
935    </target>    </target>
936    
937    
938    <target name="4jdk7-test-tck-junit"    <target name="4jdk7-tck-junit"
939            depends="4jdk7compile"            depends="4jdk7compile"
940            description="Runs tck tests for jsr166-4jdk7 via junit task (experimental)">            description="Runs tck tests for jsr166-4jdk7 via junit task (experimental)">
941    
# Line 614  Line 957 
957    
958        <formatter type="brief"/>        <formatter type="brief"/>
959    
960        <test name="JSR166TestCase" haltonfailure="no">        <test name="${jsr166.tckTestClass}" haltonfailure="no">
961        </test>        </test>
962    
963      </junit>      </junit>
964    </target>    </target>
965    
966      <target name="4jdk7-jtreg"
967              depends="4jdk7jar"
968              description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task">
969        <run-jtreg-tests
970           target="7"
971           workdir="${build.4jdk7.dir}"
972           classes="${4jdk7product.jar}"/>
973      </target>
974    
975    
976      <target name="4jdk7-test"
977              depends="4jdk7-tck, 4jdk7-jtreg"
978              description="Runs tck and jtreg tests for jsr166-4jdk7">
979      </target>
980    
981    
982    <target name="4jdk7docs"    <target name="4jdk7docs"
983            description="Builds javadocs for src/jdk7 to dist dir">            description="Builds javadocs for src/jdk7 to dist dir">
984    
985      <delete dir="${dist.4jdk7.docs.dir}"/>      <delete dir="${4jdk7docs.dir}"/>
986      <mkdir dir="${dist.4jdk7.docs.dir}"/>      <mkdir dir="${4jdk7docs.dir}"/>
987    
988      <javadoc destdir="${dist.4jdk7.docs.dir}"      <javadoc destdir="${4jdk7docs.dir}"
989               packagenames="none"               packagenames="none"
990               link="${jdkapi7docs.url}"               link="${java7.api.url}"
991               overview="${4jdk7src.dir}/intro.html"               overview="${4jdk7src.dir}/intro.html"
992               sourcepath="${4jdk7src.dir}:${jdk7src.dir}"               access="${build.javadoc.access}"
993                 sourcepath="${4jdk7src.dir}:${jdk7.src.dir}"
994               classpath=""               classpath=""
995               executable="${javadoc7}">               executable="${javadoc7}">
       <arg value="-XDignore.symbol.file=true"/>  
996        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
997          <include name="**/*.java"/>          <include name="**/*.java"/>
998        </fileset>        </fileset>
999          <arg line="-Xdocrootparent ${java7.docroot.url}"/>
1000          <arg value="-XDignore.symbol.file=true"/>
1001      </javadoc>      </javadoc>
   
1002    </target>    </target>
1003    
1004    
1005    <target name="4jdk7dist"    <target name="4jdk7dist"
1006            depends="4jdk7dist-clean, 4jdk7dist-jar, 4jdk7docs"            depends="4jdk7dist-jar, 4jdk7dist-docs"
1007            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
1008    
1009    
   
1010    <target name="4jdk7clean"    <target name="4jdk7clean"
1011            description="Removes all build products">            description="Removes all 4jdk7 build products">
1012    
1013      <delete dir="${build.4jdk7.dir}"/>      <delete dir="${build.4jdk7.dir}"/>
1014    
1015    </target>    </target>
1016    
1017    
   
   <target name="4jdk7dist-clean"  
           description="Removes all build and distribution products">  
   
   </target>  
   
1018    <target name="4jdk7dist-jar"    <target name="4jdk7dist-jar"
1019            depends="4jdk7clean, 4jdk7compile">            depends="4jdk7clean, 4jdk7jar">
   
1020      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
1021      </target>
1022    
1023    
1024      <target name="4jdk7dist-docs"
1025              depends="4jdk7clean, 4jdk7docs">
1026        <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>
1027    </target>    </target>
1028    
   <!-- jsr166x -->  
1029    
1030      <!-- jsr166x -->
1031    
1032    <target name="jsr166xcompile"    <target name="jsr166xcompile"
1033            depends="configure-compiler"            depends="configure-compiler"
1034            description="Compiles jsr166x sources to build dir">            description="Compiles jsr166x sources to build dir">
1035    
1036      <mkdir dir="${build.jsr166x.dir}"/>      <mkdir dir="${build.jsr166x.classes.dir}"/>
1037    
1038      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
1039             destdir="${build.jsr166x.dir}"             destdir="${build.jsr166x.classes.dir}"
1040             debug="${build.debug}"             debug="${build.debug}"
1041             debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
1042             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
1043             classpath=""             classpath=""
            source="5"  
1044             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
1045               source="5"
1046               target="5"
1047             includeAntRuntime="false"             includeAntRuntime="false"
1048             includeJavaRuntime="false"             includeJavaRuntime="false"
1049             executable="${javac7}"             executable="${javac7}"
1050             fork="true">             fork="true">
1051    
1052        <include name="jsr166x/**/*.java"/>        <include name="jsr166x/**/*.java"/>
       <compilerarg line="${build.args}"/>  
1053        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
1054        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
1055          <compilerarg value="-Werror"/>
1056          <compilerarg line="${build.args}"/>
1057    
1058      </javac>      </javac>
   
1059    </target>    </target>
1060    
1061    
   
1062    <target name="jsr166xjar"    <target name="jsr166xjar"
1063            depends="jsr166xcompile"            depends="jsr166xcompile"
1064            description="Builds library jar from compiled sources">            description="Builds library jar from compiled sources">
1065    
     <mkdir dir="${build.jsr166xlib.dir}"/>  
   
1066      <jar destfile="${jsr166x.jar}">      <jar destfile="${jsr166x.jar}">
1067        <fileset dir="${build.jsr166x.dir}"/>        <fileset dir="${build.jsr166x.classes.dir}"/>
1068          <manifest>
1069            <attribute name="Built-By" value="${user.name}"/>
1070            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1071          </manifest>
1072      </jar>      </jar>
1073    
1074    </target>    </target>
1075    
1076    
   
1077    <target name="jsr166xdocs"    <target name="jsr166xdocs"
1078            description="Builds javadocs to dist dir">            description="Builds javadocs to dist dir">
1079    
1080      <delete dir="${build.jsr166xjavadocs.dir}"/>      <delete dir="${jsr166xdocs.dir}"/>
1081      <mkdir dir="${build.jsr166xjavadocs.dir}"/>      <mkdir dir="${jsr166xdocs.dir}"/>
1082    
1083      <javadoc destdir="${build.jsr166xjavadocs.dir}"      <javadoc destdir="${jsr166xdocs.dir}"
1084               packagenames="jsr166x.*"               packagenames="jsr166x.*"
1085               link="${jdkapidocs.url}"               link="${java.api.url}"
1086               source="5"               access="${build.javadoc.access}"
1087                 sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1088               bootclasspath="${bootclasspath6}"               bootclasspath="${bootclasspath6}"
1089               sourcepath="${topsrc.dir}:${jdk6src.dir}"               source="5"
1090               executable="${javadoc7}"               executable="${javadoc7}">
1091               additionalparam="-XDignore.symbol.file=true" />        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1092          <arg value="-XDignore.symbol.file=true"/>
1093    
1094        </javadoc>
1095    </target>    </target>
1096    
1097    
1098    <target name="jsr166xdist"    <target name="jsr166xdist"
1099            depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs"            depends="jsr166xdist-jar, jsr166xdist-docs"
1100            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
1101    
1102    
   
1103    <target name="jsr166xclean"    <target name="jsr166xclean"
1104            description="Removes all build products">            description="Removes all jsr166x build products">
1105    
1106      <delete dir="${build.jsr166x.dir}"/>      <delete dir="${build.jsr166x.dir}"/>
     <delete dir="${build.jsr166xlib.dir}"/>  
   
   </target>  
   
   
   
   <target name="jsr166xdist-clean"  
           description="Removes all build and distribution products">  
1107    
1108    </target>    </target>
1109    
1110    
   
   <target name="jsr166xdist-docs"  
           description="Builds javadocs to dist dir">  
   
     <delete dir="${dist.jsr166xjavadocs.dir}"/>  
     <mkdir dir="${dist.jsr166xjavadocs.dir}"/>  
   
     <javadoc destdir="${dist.jsr166xjavadocs.dir}"  
              packagenames="jsr166x.*"  
              link="${jdkapidocs.url}"  
              source="${build.sourcelevel}"  
              sourcepath="${topsrc.dir}:${jdk6src.dir}"  
              executable="${javadoc7}"  
              additionalparam="-XDignore.symbol.file=true" />  
   
   </target>  
   
1111    <target name="jsr166xdist-jar"    <target name="jsr166xdist-jar"
1112            depends="jsr166xclean, jsr166xjar">            depends="jsr166xclean, jsr166xjar">
   
1113      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
1114      </target>
1115    
1116      <target name="jsr166xdist-docs"
1117              depends="jsr166xclean, jsr166xdocs">
1118        <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>
1119    </target>    </target>
1120    
1121    <!-- jsr166y -->    <!-- jsr166y -->
# Line 788  Line 1125 
1125            depends="configure-compiler"            depends="configure-compiler"
1126            description="Compiles jsr166y sources">            description="Compiles jsr166y sources">
1127    
1128      <mkdir dir="${build.jsr166y.dir}"/>      <mkdir dir="${build.jsr166y.classes.dir}"/>
1129    
1130      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
1131             destdir="${build.jsr166y.dir}"             destdir="${build.jsr166y.classes.dir}"
1132             debug="${build.debug}"             debug="${build.debug}"
1133             debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
1134             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
1135             source="6"             source="6"
1136               target="6"
1137             classpath=""             classpath=""
1138             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
1139             includeAntRuntime="false"             includeAntRuntime="false"
# Line 804  Line 1142 
1142             fork="true">             fork="true">
1143    
1144        <include name="jsr166y/**/*.java"/>        <include name="jsr166y/**/*.java"/>
       <compilerarg line="${build.args}"/>  
1145        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
1146        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1147          <compilerarg value="-Werror"/>
1148          <compilerarg line="${build.args}"/>
1149    
1150      </javac>      </javac>
1151    </target>    </target>
1152    
# Line 815  Line 1155 
1155            depends="jsr166ycompile"            depends="jsr166ycompile"
1156            description="Builds library jar from compiled sources">            description="Builds library jar from compiled sources">
1157    
     <mkdir dir="${build.jsr166ylib.dir}"/>  
   
1158      <jar destfile="${jsr166y.jar}" index="true">      <jar destfile="${jsr166y.jar}" index="true">
1159        <fileset dir="${build.jsr166y.dir}"/>        <fileset dir="${build.jsr166y.classes.dir}"/>
1160          <manifest>
1161            <attribute name="Built-By" value="${user.name}"/>
1162            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1163          </manifest>
1164      </jar>      </jar>
1165    
1166    </target>    </target>
1167    
1168    
   
1169    <target name="jsr166ydocs"    <target name="jsr166ydocs"
1170            description="Builds javadocs to dist dir">            description="Builds javadocs to dist dir">
1171    
1172      <delete dir="${build.jsr166yjavadocs.dir}"/>      <delete dir="${jsr166ydocs.dir}"/>
1173      <mkdir dir="${build.jsr166yjavadocs.dir}"/>      <mkdir dir="${jsr166ydocs.dir}"/>
1174    
1175      <javadoc destdir="${build.jsr166yjavadocs.dir}"      <javadoc destdir="${jsr166ydocs.dir}"
1176               packagenames="jsr166y.*"               packagenames="jsr166y.*"
1177               link="${jdkapidocs.url}"               link="${java.api.url}"
1178               source="6"               access="${build.javadoc.access}"
1179                 sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1180               bootclasspath="${bootclasspath6}"               bootclasspath="${bootclasspath6}"
1181               sourcepath="${topsrc.dir}:${jdk6src.dir}"               source="6"
1182               executable="${javadoc7}"               executable="${javadoc7}">
1183               additionalparam="-XDignore.symbol.file=true" />        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1184          <arg value="-XDignore.symbol.file=true"/>
1185    
1186        </javadoc>
1187    </target>    </target>
1188    
1189    
1190    <target name="jsr166ydist"    <target name="jsr166ydist"
1191            depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs"            depends="jsr166ydist-jar, jsr166ydist-docs"
1192            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
1193    
1194    
   
1195    <target name="jsr166yclean"    <target name="jsr166yclean"
1196            description="Removes all build products">            description="Removes all jsr166y build products">
1197    
1198      <delete dir="${build.jsr166y.dir}"/>      <delete dir="${build.jsr166y.dir}"/>
     <delete dir="${build.jsr166ylib.dir}"/>  
   
   </target>  
   
   
   
   <target name="jsr166ydist-clean"  
           description="Removes all build and distribution products">  
1199    
1200    </target>    </target>
1201    
   <target name="jsr166ydist-docs"  
           description="Builds javadocs to dist dir">  
   
     <delete dir="${dist.jsr166yjavadocs.dir}"/>  
     <mkdir dir="${dist.jsr166yjavadocs.dir}"/>  
   
     <javadoc destdir="${dist.jsr166yjavadocs.dir}"  
              packagenames="jsr166y.*"  
              link="${jdkapidocs.url}"  
              source="${build.sourcelevel}"  
              sourcepath="${topsrc.dir}:${jdk6src.dir}"  
              executable="${javadoc7}"  
              additionalparam="-XDignore.symbol.file=true" />  
   
   </target>  
1202    
1203    <target name="jsr166ydist-jar"    <target name="jsr166ydist-jar"
1204            depends="jsr166yclean, jsr166yjar">            depends="jsr166yclean, jsr166yjar">
   
1205      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
1206      </target>
1207    
1208      <target name="jsr166ydist-docs"
1209              depends="jsr166yclean, jsr166ydocs">
1210        <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>
1211    </target>    </target>
1212    
1213    
# Line 895  Line 1218 
1218            depends="configure-compiler, jsr166yjar"            depends="configure-compiler, jsr166yjar"
1219            description="Compiles extra166y sources">            description="Compiles extra166y sources">
1220    
1221      <mkdir dir="${build.extra166y.dir}"/>      <mkdir dir="${build.extra166y.classes.dir}"/>
1222    
1223      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
1224             destdir="${build.extra166y.dir}"             destdir="${build.extra166y.classes.dir}"
1225             debug="${build.debug}"             debug="${build.debug}"
1226             debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
1227             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
1228               bootclasspath="@{jsr166y.jar}:${bootclasspath6}"
1229             classpath=""             classpath=""
1230             source="6"             source="6"
1231             bootclasspath="${jsr166y.jar}:${bootclasspath6}"             target="6"
1232             includeAntRuntime="false"             includeAntRuntime="false"
1233             includeJavaRuntime="false"             includeJavaRuntime="false"
1234             executable="${javac7}"             executable="${javac7}"
1235             fork="true">             fork="true">
1236    
1237        <include name="extra166y/**/*.java"/>        <include name="extra166y/**/*.java"/>
       <compilerarg line="${build.args}"/>  
1238        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
1239        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
1240          <compilerarg value="-Werror"/>
1241          <compilerarg line="${build.args}"/>
1242    
1243      </javac>      </javac>
   
1244    </target>    </target>
1245    
1246    
   
1247    <target name="extra166yjar"    <target name="extra166yjar"
1248            depends="extra166ycompile"            depends="extra166ycompile"
1249            description="Builds library jar from compiled sources">            description="Builds library jar from compiled sources">
1250    
     <mkdir dir="${build.extra166ylib.dir}"/>  
   
1251      <jar destfile="${extra166y.jar}" index="true">      <jar destfile="${extra166y.jar}" index="true">
1252        <fileset dir="${build.extra166y.dir}"/>        <fileset dir="${build.extra166y.classes.dir}"/>
1253          <manifest>
1254            <attribute name="Built-By" value="${user.name}"/>
1255            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1256          </manifest>
1257      </jar>      </jar>
1258    
1259    </target>    </target>
1260    
1261    
   
1262    <target name="extra166ydocs"    <target name="extra166ydocs"
1263            description="Builds javadocs to build dir">            description="Builds javadocs to build dir">
1264    
1265      <delete dir="${build.extra166yjavadocs.dir}"/>      <delete dir="${extra166ydocs.dir}"/>
1266      <mkdir dir="${build.extra166yjavadocs.dir}"/>      <mkdir dir="${extra166ydocs.dir}"/>
1267    
1268      <javadoc destdir="${build.extra166yjavadocs.dir}"      <javadoc destdir="${extra166ydocs.dir}"
1269               packagenames="extra166y.*"               packagenames="extra166y.*"
1270               link="${jdkapidocs.url}"               link="${java.api.url}"
1271               source="6"               access="${build.javadoc.access}"
1272                 sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1273               bootclasspath="${bootclasspath6}"               bootclasspath="${bootclasspath6}"
1274               sourcepath="${topsrc.dir}:${jdk6src.dir}"               source="6"
1275               executable="${javadoc7}"               executable="${javadoc7}">
1276               additionalparam="-XDignore.symbol.file=true" />        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1277          <arg value="-XDignore.symbol.file=true"/>
1278    
1279        </javadoc>
1280    </target>    </target>
1281    
1282    
1283    <target name="extra166ydist"    <target name="extra166ydist"
1284            depends="extra166ydist-clean, extra166ydist-jar, extra166ydist-docs"            depends="extra166ydist-jar, extra166ydist-docs"
1285            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
1286    
1287    
   
1288    <target name="extra166yclean"    <target name="extra166yclean"
1289            description="Removes all build products">            description="Removes all extra166y build products">
1290    
1291      <delete dir="${build.extra166y.dir}"/>      <delete dir="${build.extra166y.dir}"/>
     <delete dir="${build.extra166ylib.dir}"/>  
   
   </target>  
   
   
   
   <target name="extra166ydist-clean"  
           description="Removes all build and distribution products">  
1292    
1293    </target>    </target>
1294    
   <target name="extra166ydist-docs"  
           description="Builds javadocs to dist dir">  
   
     <delete dir="${dist.extra166yjavadocs.dir}"/>  
     <mkdir dir="${dist.extra166yjavadocs.dir}"/>  
   
     <javadoc destdir="${dist.extra166yjavadocs.dir}"  
              packagenames="extra166y.*"  
              link="${jdkapidocs.url}"  
              source="${build.sourcelevel}"  
              sourcepath="${topsrc.dir}:${jdk6src.dir}"  
              executable="${javadoc7}"  
              additionalparam="-XDignore.symbol.file=true" />  
   
   </target>  
1295    
1296    <target name="extra166ydist-jar"    <target name="extra166ydist-jar"
1297            depends="extra166yclean, extra166yjar">            depends="extra166yclean, extra166yjar">
   
1298      <copy file="${extra166y.jar}" todir="${dist.dir}"/>      <copy file="${extra166y.jar}" todir="${dist.dir}"/>
1299      </target>
1300    
1301      <target name="extra166ydist-docs"
1302              depends="extra166yclean, extra166ydocs">
1303        <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>
1304    </target>    </target>
1305    
1306    <!-- jsr166e -->    <!-- jsr166e -->
1307    
1308      <property name="build.jsr166e.java.version" value="6"/>
1309      <property name="build.jsr166e.javac" value="${javac6}"/>
1310    
1311    <target name="jsr166ecompile"    <target name="jsr166ecompile"
1312            depends="configure-compiler"            depends="configure-compiler"
1313            description="Compiles jsr166e sources">            description="Compiles jsr166e sources">
1314    
1315      <mkdir dir="${build.jsr166e.dir}"/>      <mkdir dir="${build.jsr166e.classes.dir}"/>
1316    
1317      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
1318             destdir="${build.jsr166e.dir}"             destdir="${build.jsr166e.classes.dir}"
1319             debug="${build.debug}"             debug="${build.debug}"
1320             debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
1321             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
1322             source="7"             source="${build.jsr166e.java.version}"
1323               target="${build.jsr166e.java.version}"
1324             classpath=""             classpath=""
1325             includeAntRuntime="false"             includeAntRuntime="false"
1326             includeJavaRuntime="false"             includeJavaRuntime="false"
1327             executable="${javac7}"             executable="${build.jsr166e.javac}"
1328             fork="true">             fork="true">
1329    
1330        <include name="jsr166e/**/*.java"/>        <include name="jsr166e/**/*.java"/>
       <compilerarg line="${build.args}"/>  
1331        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
1332        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1333          <compilerarg value="-Werror"/>
1334          <compilerarg line="${build.args}"/>
1335    
1336      </javac>      </javac>
   
1337    </target>    </target>
1338    
1339      <!-- jsr166e: find doclint errors -->
1340      <target name="jsr166edoclint">
1341    
1342        <mkdir dir="${build.jsr166e.classes.dir}"/>
1343    
1344        <javac srcdir="${topsrc.dir}"
1345               destdir="${build.jsr166e.classes.dir}"
1346               debug="${build.debug}"
1347               debuglevel="${build.debuglevel}"
1348               deprecation="${build.deprecation}"
1349               source="${build.jsr166e.java.version}"
1350               target="${build.jsr166e.java.version}"
1351               classpath=""
1352               bootclasspath="${bootclasspath6}"
1353               includeAntRuntime="false"
1354               includeJavaRuntime="false"
1355               executable="${javac8}"
1356               fork="true">
1357    
1358          <include name="jsr166e/**/*.java"/>
1359          <compilerarg value="-XDignore.symbol.file=true"/>
1360          <compilerarg value="-Xlint:all"/>
1361          <compilerarg value="-Werror"/>
1362          <compilerarg value="-Xdoclint:all/protected"/>
1363    
1364        </javac>
1365      </target>
1366    
1367    
1368    <target name="jsr166ejar"    <target name="jsr166ejar"
1369            depends="jsr166ecompile"            depends="jsr166ecompile"
1370            description="Builds library jar from compiled sources">            description="Builds library jar from compiled sources">
1371    
     <mkdir dir="${build.jsr166elib.dir}"/>  
   
1372      <jar destfile="${jsr166e.jar}" index="true">      <jar destfile="${jsr166e.jar}" index="true">
1373        <fileset dir="${build.jsr166e.dir}"/>        <fileset dir="${build.jsr166e.classes.dir}"/>
1374          <manifest>
1375            <attribute name="Built-By" value="${user.name}"/>
1376            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1377          </manifest>
1378      </jar>      </jar>
1379    
1380    </target>    </target>
1381    
1382    
   
1383    <target name="jsr166edocs"    <target name="jsr166edocs"
1384            description="Builds javadocs to build dir">            description="Builds javadocs to build dir">
1385    
1386      <delete dir="${build.jsr166ejavadocs.dir}"/>      <delete dir="${jsr166edocs.dir}"/>
1387      <mkdir dir="${build.jsr166ejavadocs.dir}"/>      <mkdir dir="${jsr166edocs.dir}"/>
1388    
1389      <javadoc destdir="${build.jsr166ejavadocs.dir}"      <javadoc destdir="${jsr166edocs.dir}"
1390               packagenames="jsr166e.*"               packagenames="jsr166e.*"
1391               link="${jdkapidocs.url}"               link="${java.api.url}"
1392               source="7"               access="${build.javadoc.access}"
1393               sourcepath="${topsrc.dir}:${jdk7src.dir}"               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1394               executable="${javadoc7}"               source="${build.jsr166e.java.version}"
1395               additionalparam="-XDignore.symbol.file=true" >               executable="${javadoc7}">
1396          <arg line="-Xdocrootparent ${java.docroot.url}"/>
1397          <arg value="-XDignore.symbol.file=true"/>
1398    
1399      </javadoc>      </javadoc>
1400      </target>
1401    
1402    
1403      <target name="jsr166e-tck-one-java-version"
1404              depends="jsr166ejar">
1405    
1406        <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>
1407    
1408        <run-tck-tests
1409          tck.src.dir="${test.src.dir}/tck-jsr166e"
1410          target="${build.jsr166e.java.version}"
1411          workdir="${build.jsr166e.dir}"
1412          classes="${jsr166e.jar}"/>
1413      </target>
1414    
1415      <target name="jsr166e-tck"
1416              description="Runs tck tests for jsr166e for multiple java versions">
1417    
1418    <!--     <antcall target="clean"/> -->
1419    <!--     <antcall target="jsr166e-tck-one-java-version"> -->
1420    <!--       <param name="build.jsr166e.java.version" value="8"/> -->
1421    <!--       <param name="build.jsr166e.javac" value="${javac8}"/> -->
1422    <!--     </antcall> -->
1423    
1424        <antcall target="clean"/>
1425        <antcall target="jsr166e-tck-one-java-version">
1426          <param name="build.jsr166e.java.version" value="7"/>
1427          <param name="build.jsr166e.javac" value="${javac7}"/>
1428        </antcall>
1429    
1430        <antcall target="clean"/>
1431        <antcall target="jsr166e-tck-one-java-version">
1432          <param name="build.jsr166e.java.version" value="6"/>
1433          <param name="build.jsr166e.javac" value="${javac6}"/>
1434        </antcall>
1435    </target>    </target>
1436    
1437    
1438      <target name="jsr166e-test"
1439              depends="jsr166e-tck"
1440              description="Runs all tests for jsr166e">
1441      </target>
1442    
1443    <target name="jsr166edist"    <target name="jsr166edist"
1444            depends="jsr166edist-clean, jsr166edist-jar, jsr166edist-docs"            depends="jsr166edist-jar, jsr166edist-docs"
1445            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
1446    
1447    
   
1448    <target name="jsr166eclean"    <target name="jsr166eclean"
1449            description="Removes all build products">            description="Removes all jsr166e build products">
   
1450      <delete dir="${build.jsr166e.dir}"/>      <delete dir="${build.jsr166e.dir}"/>
     <delete dir="${build.jsr166elib.dir}"/>  
   
1451    </target>    </target>
1452    
1453    
1454      <target name="jsr166edist-jar"
1455    <target name="jsr166edist-clean"            depends="jsr166eclean, jsr166ejar">
1456            description="Removes all build and distribution products">      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
   
1457    </target>    </target>
1458    
1459    <target name="jsr166edist-docs"    <target name="jsr166edist-docs"
1460            description="Builds javadocs to dist dir">            depends="jsr166eclean, jsr166edocs">
1461        <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>
1462      </target>
1463    
     <delete dir="${dist.jsr166ejavadocs.dir}"/>  
     <mkdir dir="${dist.jsr166ejavadocs.dir}"/>  
1464    
1465      <javadoc destdir="${dist.jsr166ejavadocs.dir}"  <!-- Find buglets that can be detected by static build tools -->
              packagenames="jsr166e.*"  
              link="${jdkapidocs.url}"  
              source="7"  
              sourcepath="${topsrc.dir}:${jdk7src.dir}"  
              executable="${javadoc7}"  
              additionalparam="-XDignore.symbol.file=true" />  
1466    
1467      <target name="lint">
1468        <antcall target="dists">
1469          <param name="build.javadoc.access" value="public"/>
1470        </antcall>
1471    </target>    </target>
1472    
1473    <target name="jsr166edist-jar"  <!-- Generates all doclint warnings, even for private methods (rarely useful) -->
1474            depends="jsr166eclean, jsr166ejar">    <target name="lint-private">
1475        <antcall target="dist">
1476      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>        <param name="build.javadoc.access" value="private"/>
1477        </antcall>
1478    </target>    </target>
1479    
1480    
1481  </project>  </project>

Legend:
Removed from v.1.107  
changed lines
  Added in v.1.200

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