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

Diff of /jsr166/build.xml

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

revision 1.47 by tim, Fri Aug 1 19:34:05 2003 UTC revision 1.98 by jsr166, Wed Jan 16 07:39:51 2013 UTC
# Line 8  Line 8 
8    
9    User-specific settings are read from user.properties.    User-specific settings are read from user.properties.
10    See user.properties.sample for an explanation of some useful settings.    See user.properties.sample for an explanation of some useful settings.
11    
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      where each of the above is a JDK or a symlink to same.
20  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
21    </description>    </description>
22    
# Line 21  Line 30 
30    
31    
32    <!-- Compilation options -->    <!-- Compilation options -->
33    <property name="build.sourcelevel"    value="1.5"/>    <property name="build.sourcelevel"    value="1.6"/>
   <property name="build.docsourcelevel" value="1.4"/>  
34    <property name="build.debug"          value="true"/>    <property name="build.debug"          value="true"/>
35    <property name="build.debuglevel"     value="source,lines,vars"/>    <property name="build.debuglevel"     value="source,lines,vars"/>
36    <property name="build.deprecation"    value="false"/>    <property name="build.deprecation"    value="false"/>
37    
38    <!-- Build locations -->    <!-- Build locations -->
39    <property name="build.dir"            location="build"/>    <property name="build.dir"                   location="build"/>
40    <property name="build.classes.dir"    location="${build.dir}/classes"/>    <property name="build.classes.dir"           location="${build.dir}/classes"/>
41    <property name="build.emulation.dir"  location="${build.dir}/emulation"/>    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
42    <property name="build.testcases.dir"  location="${build.dir}/testcases"/>    <property name="build.loops.dir"             location="${build.dir}/loops"/>
43    <property name="build.lib.dir"        location="${build.dir}/lib"/>    <property name="build.lib.dir"               location="${build.dir}/lib"/>
44    <property name="build.ant.dir"        location="${build.dir}/ant"/>    <property name="build.javadocs.dir"          location="${build.dir}/javadocs"/>
45    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>    <property name="build.reports.dir"           location="${build.dir}/reports"/>
46    <property name="build.stripped.dir"   location="${build.dir}/stripped"/>  
47    <property name="build.reports.dir"    location="${build.dir}/reports"/>    <property name="build.jdk7.dir"              location="${build.dir}/jdk7"/>
48    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>    <property name="build.jdk7.lib.dir"          location="${build.jdk7.dir}"/>
49    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>    <property name="build.jdk7.classes.dir"      location="${build.jdk7.dir}/classes"/>
50    <property name="build.filter.doccheck.dir" location="${build.dir}/filterdocchk"/>    <property name="build.jdk7.tck.classes.dir"  location="${build.jdk7.dir}/tck/classes"/>
51      <property name="build.jdk7.docs.dir"         location="${build.jdk7.dir}/docs"/>
52    
53      <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
54      <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>
55      <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>
56    
57      <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>
58      <property name="build.jsr166ylib.dir"        location="${build.dir}/jsr166ylib"/>
59      <property name="build.jsr166yjavadocs.dir"   location="${build.dir}/jsr166yjavadocs"/>
60    
61      <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>
62      <property name="build.jsr166elib.dir"        location="${build.dir}/jsr166elib"/>
63      <property name="build.jsr166ejavadocs.dir"   location="${build.dir}/jsr166ejavadocs"/>
64    
65      <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>
66      <property name="build.extra166ylib.dir"      location="${build.dir}/extra166ylib"/>
67      <property name="build.extra166yjavadocs.dir" location="${build.dir}/extra166yjavadocs"/>
68    
69      <!-- JDK binary locations -->
70      <property name="jdks.home"  location="${user.home}/jdk"/>
71    
72      <macrodef name="defjdklocations">
73        <attribute name="v"/>
74        <sequential>
75        <property name="jdk@{v}.home"  location="${jdks.home}/jdk@{v}"/>
76        <property name="java@{v}"      location="${jdk@{v}.home}/bin/java"/>
77        <property name="javac@{v}"     location="${jdk@{v}.home}/bin/javac"/>
78        <property name="javadoc@{v}"   location="${jdk@{v}.home}/bin/javadoc"/>
79        <property name="bootdir@{v}"   location="${jdk@{v}.home}/jre/lib"/>
80        <property name="bootclasspath@{v}"
81         value="${bootdir@{v}}/resources.jar:${bootdir@{v}}/rt.jar:${bootdir@{v}}/jsse.jar:${bootdir@{v}}/jce.jar:${bootdir@{v}}/:${bootdir@{v}}/charsets.jar"/>
82        </sequential>
83      </macrodef>
84    
85      <defjdklocations v="6"/>
86      <defjdklocations v="7"/>
87      <defjdklocations v="8"/>
88    
89      <macrodef name="run-tck-tests">
90        <attribute name="jvm"/>
91        <attribute name="tck.classes"/>
92        <attribute name="product.jar" default="${product.jar}"/>
93        <attribute name="jvmflags" default=""/>
94        <sequential>
95        <java classname="JSR166TestCase"
96              jvm="@{jvm}" fork="true">
97            <jvmarg value="-Xbootclasspath/p:@{product.jar}"/>
98            <jvmarg line="@{jvmflags}"/>
99            <classpath>
100              <pathelement location="${junit.jar}"/>
101              <pathelement location="@{tck.classes}"/>
102            </classpath>
103        </java>
104        </sequential>
105      </macrodef>
106    
107    <!-- Source locations -->    <!-- Source locations -->
108    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
   <property name="emulation.src.dir"    location="${basedir}/src/emulation"/>  
109    <property name="test.src.dir"         location="${basedir}/src/test"/>    <property name="test.src.dir"         location="${basedir}/src/test"/>
110    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>    <property name="loops.src.dir"        location="${basedir}/src/loops"/>
111    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
112      <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
113    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
114    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
115      <property name="topsrc.dir"           location="${basedir}/src"/>
116      <property name="jdk7src.dir"          location="${topsrc.dir}/jdk7"/>
117      <property name="jsr166xsrc.dir"       location="${topsrc.dir}/jsr166x"/>
118      <property name="jsr166ysrc.dir"       location="${topsrc.dir}/jsr166y"/>
119      <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>
120      <property name="extra166ysrc.dir"     location="${topsrc.dir}/extra166y"/>
121      <property name="jdksrc.dir"           location="/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"/>
122    
123    <!-- Distribution locations -->    <!-- Distribution locations -->
124    <property name="dist.javadocs.dir"    location="${dist.dir}/docs"/>    <property name="dist.javadocs.dir"           location="${dist.dir}/docs"/>
125      <property name="dist.jdk7.docs.dir"          location="${dist.dir}/jsr166-jdk7docs"/>
126      <property name="dist.jsr166xjavadocs.dir"    location="${dist.dir}/jsr166xdocs"/>
127      <property name="dist.jsr166yjavadocs.dir"    location="${dist.dir}/jsr166ydocs"/>
128      <property name="dist.jsr166ejavadocs.dir"    location="${dist.dir}/jsr166edocs"/>
129      <property name="dist.extra166yjavadocs.dir"  location="${dist.dir}/extra166ydocs"/>
130    
131    <!-- Jar locations -->    <!-- Jar locations -->
132    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
133      <property name="jdk7product.jar"      location="${build.jdk7.lib.dir}/jsr166-jdk7.jar"/>
134      <property name="jsr166xproduct.jar"   location="${build.jsr166xlib.dir}/jsr166x.jar"/>
135      <property name="jsr166yproduct.jar"   location="${build.jsr166ylib.dir}/jsr166y.jar"/>
136      <property name="jsr166eproduct.jar"   location="${build.jsr166elib.dir}/jsr166e.jar"/>
137      <property name="extra166yproduct.jar" location="${build.extra166ylib.dir}/extra166y.jar"/>
138    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
   <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>  
   
   
139    
140    <!-- Files excluded from dist-docs and emulation jar -->    <!-- Bootclasspath argument -->
141    <patternset id="unsafe.exclusion">    <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
     <exclude name="java/util/Random.*"/>  
     <exclude name="sun/misc/Unsafe.*"/>  
   </patternset>  
   
   <!-- Files excludes from emulation jar -->  
   <patternset id="atomic.exclusion">  
     <exclude name="java/util/concurrent/atomic/AtomicBoolean*"/>  
     <exclude name="java/util/concurrent/atomic/AtomicInteger*"/>  
     <exclude name="java/util/concurrent/atomic/AtomicLong*"/>  
     <exclude name="java/util/concurrent/atomic/AtomicReference*"/>  
   </patternset>  
142    
143      <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
144      <property name="jdkapi5docs.url"      value="http://docs.oracle.com/javase/1.5.0/docs/api/"/>
145      <property name="jdkapi6docs.url"      value="http://docs.oracle.com/javase/6/docs/api/"/>
146      <property name="jdkapi7docs.url"      value="http://docs.oracle.com/javase/7/docs/api/"/>
147    
148      <property name="jdkapi8docs.url"      value="http://download.java.net/jdk8/docs/api/"/>
149      <!-- The below does not yet exist as of 2012-11 -->
150      <!-- <property name="jdkapi8docs.url" value="http://docs.oracle.com/javase/8/docs/api/"/> -->
151      <property name="jdkapidocs.url"       value="${jdkapi7docs.url}"/>
152    
153      <!-- Test classpath -->
154      <path id="test.classpath">
155        <pathelement location="${build.testcases.dir}"/>
156        <pathelement location="${junit.jar}"/>
157      </path>
158    
159      <!-- ALoops classpath -->
160      <path id="loops.classpath">
161        <pathelement location="${build.loops.dir}"/>
162      </path>
163    
164    
165    <!-- Main targets -->    <!-- Main targets -->
166    
167      <target name="dists"
168              depends="dist, jsr166xdist, jsr166ydist,jsr166edist,  extra166ydist"
169              description="Builds all public jars and docs"/>
170    
171    <target name="compile"    <target name="compile"
172            depends="init, configure-compiler, prepare-src"            depends="init, configure-compiler"
173            description="Compiles main sources to build folder">            description="Compiles main sources to build folder">
174    
     <property name="prepare.src.dir" value="${src.dir}"/>  
   
175      <mkdir dir="${build.classes.dir}"/>      <mkdir dir="${build.classes.dir}"/>
176    
177  <!--      <javac srcdir="${src.dir}"
     <echo>javac ${gjc.args}</echo>  
     <echo>bootclasspath=${compile.bootclasspath}</echo>  
 -->  
   
     <javac srcdir="${prepare.src.dir}"  
178            destdir="${build.classes.dir}"            destdir="${build.classes.dir}"
179              debug="${build.debug}"              debug="${build.debug}"
180         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
# Line 99  Line 182 
182             source="${build.sourcelevel}"             source="${build.sourcelevel}"
183               fork="true">               fork="true">
184    
185        <compilerarg    line="${gjc.args}"/>        <include name="**/*.java"/>
186        <bootclasspath refid="compile.bootclasspath"/>        <compilerarg value="-XDignore.symbol.file=true"/>
187    
188    <!--
189          <exclude name="java/lang/**"/>
190          <compilerarg line="${build.args}"/>
191          <compilerarg line="-Xlint -Xmaxwarns 1000"/>
192    -->
193    
194      </javac>      </javac>
195    
196    </target>    </target>
197    
198    
   <target name="jar"  
           depends="configure-emulation, init-jar, native-jar, emulation-jar"  
           description="Builds library jar from compiled sources"/>  
   
   
   <target name="test"  
           depends="init, configure-tests, report-tests"  
           description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />  
   
199    
200    <target name="checkstyle"    <target name="jar"
201            depends="filter-src"            depends="compile"
202            description="Reports on style errors in Java source (verbose, mostly chaff)">            description="Builds library jar from compiled sources">
203    
204      <taskdef resource="checkstyletask.properties"      <mkdir dir="${build.lib.dir}"/>
             classpath="${lib.dir}/checkstyle-all-2.4.jar"/>  
205    
206      <checkstyle>      <jar destfile="${product.jar}">
207        <formatter type="plain"/>  <!-- also available: type="xml" -->        <fileset dir="${build.classes.dir}"/>
208        <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>      </jar>
     </checkstyle>  
209    
210    </target>    </target>
211    
212    
   <target name="doccheck"  
           depends="filter-doccheck"  
           description="Reports on javadoc style errors">  
   
     <delete dir="${build.doccheck.dir}"/>  
     <mkdir dir="${build.doccheck.dir}"/>  
213    
214      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"    <target name="test"
215           docletpath="${lib.dir}/doccheck.jar"            depends="init, configure-tests, report-tests"
216              destdir="${build.doccheck.dir}">            description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
       <packageset dir="${build.filter.doccheck.dir}"/>  
     </javadoc>  
217    
   </target>  
218    
219    
220    <target name="docs"    <target name="docs"
           depends="filter-src"  
221            description="Builds javadocs with custom tags to build folder">            description="Builds javadocs with custom tags to build folder">
222    
223      <delete dir="${build.javadocs.dir}"/>      <delete dir="${build.javadocs.dir}"/>
224      <mkdir dir="${build.javadocs.dir}"/>      <mkdir dir="${build.javadocs.dir}"/>
225    
226      <javadoc destdir="${build.javadocs.dir}"      <!-- the packagenames="none" hack below prevents scanning the -->
227                  link="http://java.sun.com/j2se/1.4.1/docs/api"      <!-- sourcepath for packages -->
             overview="${src.dir}/intro.html"  
               source="${build.docsourcelevel}">  
   
       <tag name="revised" description="Last revised:"/>  
       <tag name="spec"    description="Specified by:"/>  
       <tag name="editor"  description="Last edited by:"/>  
       <tag name="fixme"   description="FIX ME:"/>  
   
       <packageset dir="${build.filter.src.dir}"/>  
228    
229        <javadoc destdir="${build.javadocs.dir}"
230                 packagenames="none"
231                 link="${jdkapidocs.url}"
232                 overview="${src.dir}/intro.html"
233                 sourcepath="${src.dir}:${jdksrc.dir}"
234                 additionalparam="-XDignore.symbol.file=true" >
235          <fileset dir="${src.dir}" defaultexcludes="yes">
236            <include name="**/*.java"/>
237          </fileset>
238      </javadoc>      </javadoc>
239    
240    </target>    </target>
241    
242    
   <target name="strip"  
           depends="init, configure-compiler"  
           description="Strip generics from java source (not working yet)">  
   
     <mkdir dir="${build.stripped.dir}"/>  
   
     <!--  
      # javac -s doesn't reliably generate compilable code. It generates  
      # bridge methods (marked as "synthetic") that can have identical  
      # signatures to existing methods except for the return value.  
      -->  
     <javac srcdir="${src.dir}"  
           destdir="${build.stripped.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
   
       <compilerarg    line="${gjc.args} -s"/>  
       <bootclasspath refid="compile.bootclasspath"/>  
   
     </javac>  
   
   </target>  
   
243    
244    <target name="dist"    <target name="dist"
245            depends="init, dist-clean, dist-jar, dist-docs"            depends="init, dist-clean, dist-jar, dist-docs"
246            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
247    
248    
249    <target name="release"    <target name="release"
250            depends="dist"            depends="dist"
251            description="Puts entire CVS tree, plus distribution productions, in a jar">            description="Puts entire CVS tree, plus distribution productions, in a jar">
252    
 <!--  
     #keep build dir? - dl  
     <delete dir="${build.dir}"/>  
 -->  
253      <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>      <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
254    
255      <jar basedir="${basedir}" destfile="${release.jar}">      <jar basedir="${basedir}" destfile="${release.jar}">
256          <!-- <exclude name="build/**"/> -->
257        <exclude name="${release.jar}"/>        <exclude name="${release.jar}"/>
258        <exclude name="user.properties"/>        <exclude name="user.properties"/>
259        <exclude name="etc/notes/**"/>        <exclude name="etc/notes/**"/>
260        <exclude name="lib/gjc/2.1/**"/>        <exclude name="src/emulation/**"/>
261        <exclude name="**/SyntaxTest.java"/>        <exclude name="**/SyntaxTest.java"/>
262          <exclude name="**/SuperfluousAbstract.java"/>
263      </jar>      </jar>
264    
265    </target>    </target>
266    
267    
268    
269    <target name="clean"    <target name="clean"
270            description="Removes all build products">            description="Removes all build products">
271    
# Line 233  Line 276 
276    </target>    </target>
277    
278    
279    
280    <target name="dist-clean"    <target name="dist-clean"
281            description="Removes all build and distribution products">            description="Removes all build and distribution products">
282    
# Line 241  Line 285 
285    </target>    </target>
286    
287    
288    
289    <target name="dist-docs"    <target name="dist-docs"
           depends="filter-src"  
290            description="Builds javadocs without custom tags to dist folder">            description="Builds javadocs without custom tags to dist folder">
291    
292      <delete dir="${dist.javadocs.dir}"/>      <delete dir="${dist.javadocs.dir}"/>
293      <mkdir dir="${dist.javadocs.dir}"/>      <mkdir dir="${dist.javadocs.dir}"/>
294    
295      <javadoc destdir="${dist.javadocs.dir}"      <!-- the packagenames="none" hack below prevents scanning the -->
296                  link="http://java.sun.com/j2se/1.4.1/docs/api"      <!-- sourcepath for packages -->
             overview="${src.dir}/intro.html"  
               source="${build.docsourcelevel}">  
   
       <packageset dir="${build.filter.src.dir}"/>  
297    
298        <javadoc destdir="${dist.javadocs.dir}"
299                 packagenames="none"
300                 link="${jdkapidocs.url}"
301                 overview="${src.dir}/intro.html"
302                 sourcepath="${src.dir}:${jdksrc.dir}"
303                 additionalparam="-XDignore.symbol.file=true" >
304          <fileset dir="${src.dir}" defaultexcludes="yes">
305            <include name="**/*.java"/>
306          </fileset>
307      </javadoc>      </javadoc>
308    
309    </target>    </target>
# Line 269  Line 318 
318      <!-- Version is kept in a separate file -->      <!-- Version is kept in a separate file -->
319      <loadfile property="version" srcFile="version.properties"/>      <loadfile property="version" srcFile="version.properties"/>
320      <echo>Building JSR-166 version ${version}</echo>      <echo>Building JSR-166 version ${version}</echo>
321        <echo>java.home is ${java.home}</echo>
322    
323    </target>    </target>
324    
325    
326    <target name="init-jar">    <target name="dist-jar"
327              depends="clean, jar">
328    
329      <mkdir dir="${build.lib.dir}"/>      <copy file="${product.jar}" todir="${dist.dir}"/>
330    
331    </target>    </target>
332    
333    
334    <target name="native-jar"    <target name="compile-tests"
335            depends="compile"            depends="jar">
           unless="build.emulation.true">  
336    
337      <jar destfile="${product.jar}">      <mkdir dir="${build.testcases.dir}"/>
       <fileset dir="${build.classes.dir}"/>  
     </jar>  
338    
339    </target>      <javac srcdir="${tck.src.dir}"
340              destdir="${build.testcases.dir}"
341                debug="${build.debug}"
342           debuglevel="${build.debuglevel}"
343          deprecation="${build.deprecation}"
344               source="${build.sourcelevel}"
345                 fork="true">
346    
347          <compilerarg value="${bootclasspath.args}"/>
348          <compilerarg line="${build.args}"/>
349          <compilerarg value="-XDignore.symbol.file=true"/>
350    
351    <target name="compile-emulation"        <classpath refid="test.classpath"/>
           depends="init, configure-compiler"  
           if="build.emulation.true">  
352    
353      <mkdir dir="${build.emulation.dir}"/>      </javac>
354    
355      <javac srcdir="${emulation.src.dir}"      <javac srcdir="${test.src.dir}"
356            destdir="${build.emulation.dir}"            destdir="${build.testcases.dir}"
357              debug="${build.debug}"              debug="${build.debug}"
358         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
359        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
360             source="${build.sourcelevel}"             source="${build.sourcelevel}"
361               fork="true">               fork="true">
362    
363        <compilerarg    line="${gjc.args}"/>        <include name="jsr166/test/**"/>
364        <bootclasspath refid="compile.bootclasspath"/>  
365          <compilerarg value="${bootclasspath.args}"/>
366          <compilerarg line="${build.args}"/>
367          <compilerarg value="-XDignore.symbol.file=true"/>
368    
369          <classpath refid="test.classpath"/>
370    
371      </javac>      </javac>
372    
373    <!--
374        <javac srcdir="${jtreg.src.dir}"
375              destdir="${build.testcases.dir}"
376                debug="${build.debug}"
377           debuglevel="${build.debuglevel}"
378          deprecation="${build.deprecation}"
379               source="${build.sourcelevel}"
380                 fork="true">
381    
382          <compilerarg value="${bootclasspath.args}"/>
383          <compilerarg line="${build.args}"/>
384          <compilerarg value="-XDignore.symbol.file=true"/>
385    
386          <classpath refid="test.classpath"/>
387    
388        </javac>
389    -->
390    
391    </target>    </target>
392    
393    
394    <target name="emulation-jar"    <target name="run-tests"
395            depends="compile-emulation"            depends="compile-tests">
           if="build.emulation.true">  
396    
397        <!-- May be overridden by user.properties -->
398        <property name="testcase" value="*"/>
399    
400        <mkdir dir="${build.reports.dir}"/>
401    
402      <jar destfile="${product.jar}" duplicate="add">      <junit printsummary="true"
403        <fileset dir="${build.classes.dir}">               showoutput="true"
404          <patternset refid="atomic.exclusion"/>            errorProperty="junit.failed"
405          <patternset refid="unsafe.exclusion"/>          failureProperty="junit.failed"
406                        dir="${build.reports.dir}"
407                       fork="true">
408    
409          <jvmarg value="${bootclasspath.args}"/>
410          <jvmarg value="-server"/>
411          <jvmarg value="-showversion"/>
412    
413          <classpath refid="test.classpath"/>
414    
415          <formatter type="xml"/>
416    
417          <batchtest todir="${build.reports.dir}" unless="no.test.tck">
418            <fileset dir="${tck.src.dir}">
419              <include name="**/${testcase}Test.java"/>
420            </fileset>
421          </batchtest>
422    
423          <batchtest todir="${build.reports.dir}" if="do.test.old">
424            <fileset dir="${test.src.dir}">
425              <include name="jsr166/test/**/${testcase}Test.java"/>
426            </fileset>
427          </batchtest>
428    
429    <!--
430          <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
431            <fileset dir="${jtreg.src.dir}">
432              <include name="**/${testcase}Test.java"/>
433            </fileset>
434          </batchtest>
435    -->
436    
437        </junit>
438    
439      </target>
440    
441    
442      <target name="report-tests"
443              depends="run-tests">
444    
445        <!-- Sets junit.report.format to frames if redirection is present,
446             otherwise sets it to noframes. -->
447        <available property="junit.report.format"
448                      value="frames"
449                  classname="org.apache.xalan.lib.Redirect"
450        />
451        <property name="junit.report.format" value="noframes"/>
452    
453        <junitreport todir="${build.reports.dir}">
454          <fileset dir="${build.reports.dir}">
455            <include name="TEST-*.xml"/>
456        </fileset>        </fileset>
457        <fileset dir="${build.emulation.dir}"/>        <report format="${junit.report.format}" todir="${build.reports.dir}"
458      </jar>        />
459        </junitreport>
460    
461        <fail message="Test Cases Failed" if="junit.failed"/>
462    
463    </target>    </target>
464    
465    
466    <target name="dist-jar"    <target name="configure-compiler">
           depends="clean, jar">  
467    
468      <copy file="${product.jar}" todir="${dist.dir}"/>      <property name="unchecked.option" value="-Xlint:unchecked"/>
469    
470        <condition property="warnunchecked.arg" value="${unchecked.option}">
471          <istrue value="${build.warnunchecked}"/>
472        </condition>
473    
474        <property name="warnunchecked.arg" value=""/>
475    
476    
477        <!-- Common options in javac invocations -->
478        <property name="build.args" value="${warnunchecked.arg}"/>
479    
480    </target>    </target>
481    
482    
483    <target name="compile-ant-filter"    <target name="configure-tests"
484            depends="init">         depends="configure-compiler">
485    
486      <mkdir dir="${build.ant.dir}"/>      <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
487        <available property="junit.available"
488                   classname="junit.framework.Protectable"/>
489    
490      <javac srcdir="${ant.src.dir}"      <!-- Xalan -->
491            destdir="${build.ant.dir}"      <available property="xalan.available"
492             source="1.4"                 classname="org.apache.xalan.Version"/>
493      />  
494    
495        <!-- Ant 1.6beta and later don't need or want this check -->
496        <!--
497        <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
498              unless="junit.available"/>
499    
500        <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
501              unless="xalan.available"/>
502        -->
503    
504    </target>    </target>
505    
506    
507    <target name="filter-src"    <!-- Various demos and test programs -->
           depends="compile-ant-filter">  
508    
     <mkdir dir="${build.filter.src.dir}"/>  
509    
510      <copy todir="${build.filter.src.dir}">    <target name="loops" depends="init, configure-compiler"
511        <fileset dir="${src.dir}">            description="Benchmark from Doug Lea's AQS paper">
         <include name="**/*.html"/>  
       </fileset>  
     </copy>  
512    
513      <copy todir="${build.filter.src.dir}">      <mkdir dir="${build.loops.dir}"/>
514        <fileset dir="${src.dir}">  
515          <exclude name="**/*.html"/>      <javac srcdir="${loops.src.dir}"
516          <patternset refid="unsafe.exclusion"/>            destdir="${build.loops.dir}"
517        </fileset>              debug="${build.debug}"
518        <filterchain>         debuglevel="${build.debuglevel}"
519          deprecation="${build.deprecation}"
520               source="${build.sourcelevel}"
521                 fork="true">
522    
523          <!--        <compilerarg line="${build.args}"/>
524           # This filter gets rid of angle-bracketed type parameters        <classpath refid="loops.classpath"/>
525           # so that javadoc can run on the result. The following        <compilerarg value="-XDignore.symbol.file=true"/>
          # heuristic seems to work:  
          #  
          # For all lines not starting with space(s)-asterisk-space(s),  
          #   replace <something> with a space, where there may be more  
          #   than one right angle bracket at the end, and "something"  
          #   must not contain parens or pipes. (This may need some  
          #   tweaking.)  
          -->  
526    
527          <filterreader classname="jsr166.ant.filters.ReplaceFilter"      </javac>
528                        classpath="${build.ant.dir}">  
529            <param name="notmatching" value="^\s+\*\s.*$"/>      <java classname="ALoops" fork="true">
530            <param name="pattern"     value="&lt;[^|>()]+?>+"/>        <classpath refid="loops.classpath"/>
531            <param name="replacement" value=" "/>      </java>
         </filterreader>  
532    
533      </target>
534    
         <!--  
          # This filter uncomments lines beginning with "//@" so that  
          # javadoc can see imports that are needed to resolve links  
          # but that shouldn't be in the compiled code.  
          -->  
535    
536          <filterreader classname="jsr166.ant.filters.ReplaceFilter"    <!-- jdk7 -->
537                        classpath="${build.ant.dir}">  
538            <param name="matching"    value="^//@.*$"/>  
539            <param name="pattern"     value="^//@"/>    <target name="jdk7compile"
540            <param name="replacement" value=""/>            depends="configure-compiler"
541          </filterreader>            description="Compiles src/jdk7 sources">
542        </filterchain>  
543      </copy>      <mkdir dir="${build.jdk7.classes.dir}"/>
544    
545        <javac srcdir="${jdk7src.dir}"
546               destdir="${build.jdk7.classes.dir}"
547               debug="${build.debug}"
548               debuglevel="${build.debuglevel}"
549               deprecation="${build.deprecation}"
550               source="1.6"
551               classpath=""
552               bootclasspath="${bootclasspath6}"
553               includeAntRuntime="false"
554               includeJavaRuntime="false"
555               executable="${javac7}"
556               fork="true">
557    
558          <include name="**/*.java"/>
559          <compilerarg line="${build.args}"/>
560          <compilerarg value="-XDignore.symbol.file=true"/>
561          <compilerarg value="-Xlint:all"/>
562    
563        </javac>
564    
565        <mkdir dir="${build.jdk7.lib.dir}"/>
566    
567        <jar destfile="${jdk7product.jar}" index="true">
568          <fileset dir="${build.jdk7.classes.dir}"/>
569        </jar>
570    
571        <mkdir dir="${build.jdk7.tck.classes.dir}"/>
572    
573        <javac srcdir="${tck.src.dir}"
574               destdir="${build.jdk7.tck.classes.dir}"
575               debug="${build.debug}"
576               debuglevel="${build.debuglevel}"
577               deprecation="${build.deprecation}"
578               source="1.6"
579               classpath="${junit.jar}"
580               bootclasspath="${jdk7product.jar}:${bootclasspath6}"
581               includeAntRuntime="false"
582               includeJavaRuntime="false"
583               executable="${javac7}"
584               fork="true">
585    
586          <include name="**/*.java"/>
587          <compilerarg line="${build.args}"/>
588          <compilerarg value="-XDignore.symbol.file=true"/>
589          <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
590    
591        </javac>
592    
593    </target>    </target>
594    
595    
596      <target name="run-jdk7-tck-tests"
597              depends="jdk7compile"
598              description="Runs tck tests for jsr166-jdk7 directly">
599        <run-tck-tests
600          jvm="${java7}"
601          tck.classes="${build.jdk7.tck.classes.dir}"
602          product.jar="${jdk7product.jar}"/>
603      </target>
604    
605    
606      <target name="run-jdk7-tck-tests-via-junit-task"
607              depends="jdk7compile">
608    
609    <target name="filter-doccheck"      <junit printsummary="true"
610            depends="filter-src">             showoutput="true"
611               errorProperty="junit.failed"
612               failureProperty="junit.failed"
613               includeantruntime="true"
614               jvm="${java7}"
615               fork="true">
616    
617          <jvmarg value="-Xbootclasspath/p:${jdk7product.jar}"/>
618          <jvmarg value="-server"/>
619    
620          <classpath>
621            <pathelement location="${junit.jar}"/>
622            <pathelement location="${build.jdk7.tck.classes.dir}"/>
623          </classpath>
624    
625      <mkdir dir="${build.filter.doccheck.dir}"/>        <formatter type="brief"/>
626    
627      <copy todir="${build.filter.doccheck.dir}">        <test name="JSR166TestCase" haltonfailure="no">
628        <fileset dir="${build.filter.src.dir}">        </test>
629          <include name="**/*.html"/>  
630        </junit>
631      </target>
632    
633    
634      <target name="jdk7docs"
635              description="Builds javadocs with custom tags to build folder">
636    
637        <delete dir="${build.jdk7.docs.dir}"/>
638        <mkdir dir="${build.jdk7.docs.dir}"/>
639    
640        <javadoc destdir="${build.jdk7.docs.dir}"
641                 packagenames="none"
642                 link="${jdkapi7docs.url}"
643                 overview="${jdk7src.dir}/intro.html"
644                 sourcepath="${jdk7src.dir}"
645                 bootclasspath="${bootclasspath6}"
646                 classpath=""
647                 source="1.6"
648                 executable="${javadoc7}"
649                 additionalparam="-XDignore.symbol.file=true" >
650          <fileset dir="${jdk7src.dir}" defaultexcludes="yes">
651            <include name="**/*.java"/>
652        </fileset>        </fileset>
653      </copy>      </javadoc>
654    
655      </target>
656    
     <property name="generic.declarations"  
              value="/** Fake type parameter. */ public interface E {} /** Fake type parameter. */ public interface T {} /** Fake type parameter. */ public interface K {} /** Fake type parameter. */ public interface V {}"  
     />  
657    
658      <copy todir="${build.filter.doccheck.dir}">    <target name="jdk7dist"
659        <fileset dir="${build.filter.src.dir}">            depends="jdk7dist-clean, jdk7dist-jar, jdk7dist-docs"
660          <exclude name="**/*.html"/>            description="Puts all distributable products in single hierarchy"/>
661    
662    
663    
664      <target name="jdk7clean"
665              description="Removes all build products">
666    
667        <delete dir="${build.jdk7.dir}"/>
668    
669      </target>
670    
671    
672    
673      <target name="jdk7dist-clean"
674              description="Removes all build and distribution products">
675    
676      </target>
677    
678      <target name="jdk7dist-docs"
679              description="Builds javadocs without custom tags to dist folder">
680    
681        <delete dir="${dist.jdk7.docs.dir}"/>
682        <mkdir dir="${dist.jdk7.docs.dir}"/>
683    
684        <javadoc destdir="${dist.jdk7.docs.dir}"
685                 packagenames="none"
686                 link="${jdkapi7docs.url}"
687                 overview="${jdk7src.dir}/intro.html"
688                 sourcepath="${jdk7src.dir}"
689                 classpath=""
690                 executable="${javadoc7}"
691                 bootclasspath="${bootclasspath6}"
692                 source="1.6">
693          <arg value="-XDignore.symbol.file=true"/>
694          <fileset dir="${jdk7src.dir}" defaultexcludes="yes">
695            <include name="**/*.java"/>
696        </fileset>        </fileset>
697        <filterchain>      </javadoc>
698          <!--  
699           # These two filters try to make the source look like    </target>
700           # something that doccheck can process. The first removes  
701           # -source 1.4 assertions and the second adds in a bunch    <target name="jdk7dist-jar"
702           # of single letter public nested marker interfaces so that            depends="jdk7clean, jdk7compile">
          # the generic type parameters are recognized.  
          -->  
   
         <filterreader classname="jsr166.ant.filters.ReplaceFilter"  
                       classpath="${build.ant.dir}">  
           <param name="matching"    value="^\s*assert[\s ].*$"/>  
           <param name="pattern"     value="assert"/>  
           <param name="replacement" value="//assert"/>  
         </filterreader>  
   
         <filterreader classname="jsr166.ant.filters.ReplaceFilter"  
                       classpath="${build.ant.dir}">  
           <param name="matching"    value="^([^*]*(class|interface|implements) .*|)\{.*$"/>  
           <param name="pattern"     value="$"/>  
           <param name="replacement" value=" ${generic.declarations}"/>  
         </filterreader>  
703    
704        </filterchain>      <copy file="${jdk7product.jar}" todir="${dist.dir}"/>
     </copy>  
705    
706    </target>    </target>
707    
708      <!-- jsr166x -->
709    
   <target name="compile-tests"  
           depends="jar">  
710    
711      <mkdir dir="${build.testcases.dir}"/>    <target name="jsr166xcompile"
712              depends="init, configure-compiler"
713              description="Compiles jsr166x sources">
714    
715  <!--      <mkdir dir="${build.jsr166x.dir}"/>
     <echo>javac ${gjc.args}</echo>  
     <echo>bootclasspath=${test.compile.bootclasspath}</echo>  
     <echo>classpath="${test.classpath}"</echo>  
 -->  
716    
717      <javac srcdir="${test.src.dir}"      <javac srcdir="${jsr166xsrc.dir}"
718            destdir="${build.testcases.dir}"            destdir="${build.jsr166x.dir}"
719              debug="${build.debug}"              debug="${build.debug}"
720         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
721        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
722             source="${build.sourcelevel}"             source="${build.sourcelevel}"
723               fork="true">               fork="true">
724    
725        <compilerarg    line="${gjc.args}"/>        <include name="**/*.java"/>
726        <bootclasspath refid="test.compile.bootclasspath"/>        <compilerarg line="${build.args}"/>
727        <classpath     refid="test.classpath"/>        <compilerarg value="-XDignore.symbol.file=true"/>
728    
729      </javac>      </javac>
730    
731    </target>    </target>
732    
733    
   <target name="run-tests"  
           depends="compile-tests">  
734    
735      <!-- May be overridden by user.properties -->    <target name="jsr166xjar"
736      <property name="testcase" value="*"/>            depends="jsr166xcompile"
737              description="Builds library jar from compiled sources">
738    
739      <mkdir dir="${build.reports.dir}"/>      <mkdir dir="${build.jsr166xlib.dir}"/>
740    
741      <junit printsummary="true"      <jar destfile="${jsr166xproduct.jar}">
742               showoutput="true"        <fileset dir="${build.jsr166x.dir}"/>
743            errorProperty="junit.failed"      </jar>
         failureProperty="junit.failed"  
                     dir="${build.reports.dir}"  
                    fork="true">  
744    
745        <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>    </target>
746    
       <formatter type="xml"/>  
747    
       <batchtest todir="${build.reports.dir}">  
         <fileset dir="${test.src.dir}">  
           <include name="**/${testcase}Test.java"/>  
         </fileset>  
       </batchtest>  
748    
749      </junit>    <target name="jsr166xdocs"
750              description="Builds javadocs with custom tags to build folder">
751    
752        <delete dir="${build.jsr166xjavadocs.dir}"/>
753        <mkdir dir="${build.jsr166xjavadocs.dir}"/>
754    
755        <javadoc destdir="${build.jsr166xjavadocs.dir}"
756                 packagenames="jsr166x"
757                 link="${jdkapidocs.url}"
758                 source="${build.sourcelevel}"
759                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
760                 additionalparam="-XDignore.symbol.file=true" />
761    
762    </target>    </target>
763    
764    
765    <target name="report-tests"    <target name="jsr166xdist"
766            depends="run-tests">            depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs"
767              description="Puts all distributable products in single hierarchy"/>
768    
     <!-- Sets junit.report.format to frames if Xalan is present,  
          otherwise sets it to noframes. -->  
     <available property="junit.report.format"  
                   value="frames"  
               classname="org.apache.xalan.lib.Redirect"  
     />  
     <property name="junit.report.format" value="noframes"/>  
769    
     <junitreport todir="${build.reports.dir}">  
       <fileset dir="${build.reports.dir}">  
         <include name="TEST-*.xml"/>  
       </fileset>  
       <report styledir="${stylesheet.dir}"  
                 format="${junit.report.format}"  
                  todir="${build.reports.dir}"  
       />  
     </junitreport>  
770    
771      <fail message="Test Cases Failed" if="junit.failed"/>    <target name="jsr166xclean"
772              description="Removes all build products">
773    
774        <delete dir="${build.jsr166x.dir}"/>
775        <delete dir="${build.jsr166xlib.dir}"/>
776    
777    </target>    </target>
778    
779    
   <target name="configure-compiler">  
780    
781      <property name="gjc.version"    <target name="jsr166xdist-clean"
782               value="2.2"/>            description="Removes all build and distribution products">
783    
784      <condition property="novariance.arg" value="-novariance">    </target>
       <and>  
         <equals arg1="${gjc.version}" arg2="2.0"/>  
         <or>  
           <not><isset property="gjc.novariance"/></not>  
           <istrue value="${gjc.novariance}"/>  
         </or>  
       </and>  
     </condition>  
785    
     <property name="novariance.arg"  
              value=""/>  
786    
     <property name="gjc.dir"  
              value="${lib.dir}/gjc"/>  
787    
788      <property name="javac.jar"    <target name="jsr166xdist-docs"
789            location="${gjc.dir}/${gjc.version}/javac.jar"/>            description="Builds javadocs without custom tags to dist folder">
790    
791      <property name="collect.jar"      <delete dir="${dist.jsr166xjavadocs.dir}"/>
792            location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/>      <mkdir dir="${dist.jsr166xjavadocs.dir}"/>
793    
794        <javadoc destdir="${dist.jsr166xjavadocs.dir}"
795                 packagenames="jsr166x"
796                 link="${jdkapidocs.url}"
797                 source="${build.sourcelevel}"
798                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
799                 additionalparam="-XDignore.symbol.file=true" />
800    
801      <condition property="warnunchecked.arg" value="-warnunchecked">    </target>
       <istrue value="${gjc.warnunchecked}"/>  
     </condition>  
802    
803      <property name="warnunchecked.arg" value=""/>    <target name="jsr166xdist-jar"
804              depends="jsr166xclean, jsr166xjar">
805    
806      <condition property="prepare.src.dir" value="${build.dir}/prepare-src">      <copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/>
       <istrue value="${build.nothreads}"/>  
     </condition>  
807    
808      </target>
809    
810      <!--    <!-- jsr166y -->
      ! Bootclasspath munging for source compilation.  
      -->  
811    
     <path id="pre.bootclasspath">  
       <pathelement location="${javac.jar}"/>  
     </path>  
   
     <path id="compile.bootclasspath">  
       <pathelement location="${build.classes.dir}"/>  
       <pathelement location="${collect.jar}"/>  
       <pathelement location="${rt.jar}"/>  
     </path>  
   
     <!-- Flatten paths into platform-appropriate strings -->  
     <property name="pre.bootclasspath"     refid="pre.bootclasspath"/>  
     <property name="compile.bootclasspath" refid="compile.bootclasspath"/>  
812    
813      <target name="jsr166ycompile"
814              depends="init, configure-compiler"
815              description="Compiles jsr166y sources">
816    
817      <!-- Common options in javac invocations -->      <mkdir dir="${build.jsr166y.dir}"/>
818      <property name="gjc.args"  
819               value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}"      <javac srcdir="${jsr166ysrc.dir}"
820      />            destdir="${build.jsr166y.dir}"
821                debug="${build.debug}"
822           debuglevel="${build.debuglevel}"
823          deprecation="${build.deprecation}"
824               source="${build.sourcelevel}"
825                 fork="true">
826    
827          <include name="**/*.java"/>
828          <compilerarg line="${build.args}"/>
829          <compilerarg value="-XDignore.symbol.file=true"/>
830          <compilerarg value="${bootclasspath.args}"/>
831    
832    <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
833    
834        </javac>
835    
836    </target>    </target>
837    
838    
   <target name="prepare-src"  
           depends="configure-compiler"  
           if="prepare.src.dir">  
839    
840      <mkdir dir="${prepare.src.dir}"/>    <target name="jsr166yjar"
841      <copy todir="${prepare.src.dir}">            depends="jsr166ycompile"
842        <fileset dir="${src.dir}">            description="Builds library jar from compiled sources">
843          <exclude name="java/lang/**"/>  
844        </fileset>      <mkdir dir="${build.jsr166ylib.dir}"/>
845      </copy>  
846        <jar destfile="${jsr166yproduct.jar}" index="true">
847          <fileset dir="${build.jsr166y.dir}"/>
848        </jar>
849    
850    </target>    </target>
851    
852    
   <target name="configure-emulation">  
853    
854      <condition property="build.emulation.true">    <target name="jsr166ydocs"
855        <or>            description="Builds javadocs with custom tags to build folder">
856          <and>  
857            <os family="windows"/>      <delete dir="${build.jsr166yjavadocs.dir}"/>
858            <not>      <mkdir dir="${build.jsr166yjavadocs.dir}"/>
859              <isset property="build.emulation"/>  
860            </not>      <javadoc destdir="${build.jsr166yjavadocs.dir}"
861          </and>               packagenames="jsr166y"
862          <istrue value="${build.emulation}"/>               link="${jdkapidocs.url}"
863        </or>               source="${build.sourcelevel}"
864      </condition>               sourcepath="${topsrc.dir}:${jdksrc.dir}"
865                 additionalparam="-XDignore.symbol.file=true" />
866    
867    </target>    </target>
868    
869    
870    <target name="configure-tests"    <target name="jsr166ydist"
871         depends="configure-compiler">            depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs"
872              description="Puts all distributable products in single hierarchy"/>
873    
     <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->  
     <available property="junit.available"  
                classname="junit.framework.Protectable"/>  
874    
     <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"  
           unless="junit.available"/>  
875    
876      <target name="jsr166yclean"
877              description="Removes all build products">
878    
879      <!--      <delete dir="${build.jsr166y.dir}"/>
880       ! Bootclasspath munging for testing, so JUnit can test our local      <delete dir="${build.jsr166ylib.dir}"/>
881       ! modifications to java.*.  
882       -->    </target>
883    
884    
885    
886      <target name="jsr166ydist-clean"
887              description="Removes all build and distribution products">
888    
889      </target>
890    
891      <path id="test.classpath">    <target name="jsr166ydist-docs"
892        <pathelement location="${product.jar}"/>            description="Builds javadocs without custom tags to dist folder">
       <pathelement location="${build.testcases.dir}"/>  
       <pathelement location="${junit.jar}"/>  
     </path>  
893    
894      <path id="test.compile.bootclasspath">      <delete dir="${dist.jsr166yjavadocs.dir}"/>
895        <pathelement location="${javac.jar}"/>      <mkdir dir="${dist.jsr166yjavadocs.dir}"/>
896        <pathelement location="${collect.jar}"/>  
897        <pathelement location="${rt.jar}"/>      <javadoc destdir="${dist.jsr166yjavadocs.dir}"
898      </path>               packagenames="jsr166y"
899                 link="${jdkapidocs.url}"
900                 source="${build.sourcelevel}"
901                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
902                 additionalparam="-XDignore.symbol.file=true" />
903    
904      </target>
905    
906      <path id="test.run.bootclasspath">    <target name="jsr166ydist-jar"
907        <pathelement location="${javac.jar}"/>            depends="jsr166yclean, jsr166yjar">
       <path refid="test.classpath"/>  
     </path>  
908    
909      <!-- Flatten test classpaths into platform-appropriate strings -->      <copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/>
     <property name="test.classpath"             refid="test.classpath"/>  
     <property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/>  
     <property name="test.run.bootclasspath"     refid="test.run.bootclasspath"/>  
910    
911    </target>    </target>
912    
913    
914      <!-- extra166y -->
915    
   <!-- Anthill targets -->  
916    
917    <target name="anthill-build"    <target name="extra166ycompile"
918            depends="jar, test, docs, dist-docs"/>            depends="init, configure-compiler, jsr166ycompile"
919              description="Compiles extra166y sources">
920    
921    <target name="anthill-publish">      <mkdir dir="${build.extra166y.dir}"/>
922    
923      <copy todir="${deployDir}/docs/private">      <javac srcdir="${extra166ysrc.dir}"
924        <fileset dir="${build.javadocs.dir}"/>            destdir="${build.extra166y.dir}"
925      </copy>              debug="${build.debug}"
926                classpath="${jsr166yproduct.jar}"
927           debuglevel="${build.debuglevel}"
928          deprecation="${build.deprecation}"
929               source="${build.sourcelevel}"
930                 fork="true">
931    
932      <copy todir="${deployDir}/docs/public">        <include name="**/*.java"/>
933        <fileset dir="${dist.javadocs.dir}"/>        <compilerarg line="${build.args}"/>
934      </copy>        <compilerarg value="-XDignore.symbol.file=true"/>
935          <compilerarg value="${bootclasspath.args}"/>
936    
937      <copy tofile="${deployDir}/index.html"  <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
           file="${basedir}/etc/anthill-index.html"/>  
938    
939      <copy todir="${deployDir}/notes">      </javac>
       <fileset dir="${basedir}/etc/notes"/>  
     </copy>  
940    
941    </target>    </target>
942    
943    
   <target name="ng" depends="test">  
     <java classname="SuperfluousAbstract" fork="true">  
944    
945        <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>    <target name="extra166yjar"
946              depends="extra166ycompile"
947              description="Builds library jar from compiled sources">
948    
949        <mkdir dir="${build.extra166ylib.dir}"/>
950    
951        <jar destfile="${extra166yproduct.jar}" index="true">
952          <fileset dir="${build.extra166y.dir}"/>
953        </jar>
954    
955      </target>
956    
957    
958    
959      <target name="extra166ydocs"
960              description="Builds javadocs with custom tags to build folder">
961    
962        <delete dir="${build.extra166yjavadocs.dir}"/>
963        <mkdir dir="${build.extra166yjavadocs.dir}"/>
964    
965        <javadoc destdir="${build.extra166yjavadocs.dir}"
966                 packagenames="extra166y"
967                 link="${jdkapidocs.url}"
968                 source="${build.sourcelevel}"
969                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
970                 additionalparam="-XDignore.symbol.file=true" />
971    
972      </target>
973    
974    
975      <target name="extra166ydist"
976              depends="extra166ydist-clean, extra166ydist-jar, extra166ydist-docs"
977              description="Puts all distributable products in single hierarchy"/>
978    
979    
980    
981      <target name="extra166yclean"
982              description="Removes all build products">
983    
984        <delete dir="${build.extra166y.dir}"/>
985        <delete dir="${build.extra166ylib.dir}"/>
986    
987      </target>
988    
989    
990    
991      <target name="extra166ydist-clean"
992              description="Removes all build and distribution products">
993    
994      </target>
995    
996      <target name="extra166ydist-docs"
997              description="Builds javadocs without custom tags to dist folder">
998    
999        <delete dir="${dist.extra166yjavadocs.dir}"/>
1000        <mkdir dir="${dist.extra166yjavadocs.dir}"/>
1001    
1002        <javadoc destdir="${dist.extra166yjavadocs.dir}"
1003                 packagenames="extra166y"
1004                 link="${jdkapidocs.url}"
1005                 source="${build.sourcelevel}"
1006                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
1007                 additionalparam="-XDignore.symbol.file=true" />
1008    
1009      </target>
1010    
1011      <target name="extra166ydist-jar"
1012              depends="extra166yclean, extra166yjar">
1013    
1014        <copy file="${extra166yproduct.jar}" todir="${dist.dir}"/>
1015    
1016      </target>
1017    
1018      <!-- jsr166e -->
1019    
1020      <target name="jsr166ecompile"
1021              depends="configure-compiler"
1022              description="Compiles jsr166e sources">
1023    
1024        <mkdir dir="${build.jsr166e.dir}"/>
1025    
1026        <javac srcdir="${topsrc.dir}"
1027               destdir="${build.jsr166e.dir}"
1028               debug="${build.debug}"
1029               debuglevel="${build.debuglevel}"
1030               deprecation="${build.deprecation}"
1031               source="1.7"
1032               classpath=""
1033               includeAntRuntime="false"
1034               includeJavaRuntime="false"
1035               executable="${javac7}"
1036               fork="true">
1037    
1038          <include name="jsr166e/**/*.java"/>
1039          <compilerarg line="${build.args}"/>
1040          <compilerarg value="-XDignore.symbol.file=true"/>
1041          <compilerarg value="-Xlint:all"/>
1042    
1043        </javac>
1044    
1045      </target>
1046    
1047    
1048    
1049      <target name="jsr166ejar"
1050              depends="jsr166ecompile"
1051              description="Builds library jar from compiled sources">
1052    
1053        <mkdir dir="${build.jsr166elib.dir}"/>
1054    
1055        <jar destfile="${jsr166eproduct.jar}" index="true">
1056          <fileset dir="${build.jsr166e.dir}"/>
1057        </jar>
1058    
     </java>  
1059    </target>    </target>
1060    
1061    
1062    
1063      <target name="jsr166edocs"
1064              description="Builds javadocs with custom tags to build folder">
1065    
1066        <delete dir="${build.jsr166ejavadocs.dir}"/>
1067        <mkdir dir="${build.jsr166ejavadocs.dir}"/>
1068    
1069        <javadoc destdir="${build.jsr166ejavadocs.dir}"
1070                 packagenames="jsr166e,jsr166e.extra"
1071                 link="${jdkapi7docs.url}"
1072                 source="1.7"
1073                 sourcepath="${topsrc.dir}:${jdk7src.dir}:${jdksrc.dir}"
1074                 executable="${javadoc7}"
1075                 additionalparam="-XDignore.symbol.file=true" >
1076          <fileset dir="${topsrc.dir}" defaultexcludes="yes">
1077            <include name="jsr166e/**/*.java"/>
1078          </fileset>
1079        </javadoc>
1080    
1081      </target>
1082    
1083    
1084      <target name="jsr166edist"
1085              depends="jsr166edist-clean, jsr166edist-jar, jsr166edist-docs"
1086              description="Puts all distributable products in single hierarchy"/>
1087    
1088    
1089    
1090      <target name="jsr166eclean"
1091              description="Removes all build products">
1092    
1093        <delete dir="${build.jsr166e.dir}"/>
1094        <delete dir="${build.jsr166elib.dir}"/>
1095    
1096      </target>
1097    
1098    
1099    
1100      <target name="jsr166edist-clean"
1101              description="Removes all build and distribution products">
1102    
1103      </target>
1104    
1105      <target name="jsr166edist-docs"
1106              description="Builds javadocs without custom tags to dist folder">
1107    
1108        <delete dir="${dist.jsr166ejavadocs.dir}"/>
1109        <mkdir dir="${dist.jsr166ejavadocs.dir}"/>
1110    
1111        <javadoc destdir="${dist.jsr166ejavadocs.dir}"
1112                 packagenames="jsr166e,jsr166e.extra"
1113                 link="${jdkapidocs.url}"
1114                 source="1.7"
1115                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
1116                 additionalparam="-XDignore.symbol.file=true" />
1117    
1118      </target>
1119    
1120      <target name="jsr166edist-jar"
1121              depends="jsr166eclean, jsr166ejar">
1122    
1123        <copy file="${jsr166eproduct.jar}" todir="${dist.dir}"/>
1124    
1125      </target>
1126    
1127  </project>  </project>

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.98

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