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

Diff of /jsr166/build.xml

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

revision 1.74 by dl, Thu Sep 13 11:19:25 2007 UTC revision 1.129 by jsr166, Wed Jan 23 07:17:13 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, and
20      $HOME/jdk/src/jdk6
21      $HOME/jdk/src/jdk7
22      $HOME/jdk/src/jdk8
23      where each of the above is a complete JDK source tree
24      (e.g. mercurial forest) or a symlink to same.
25  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
26    </description>    </description>
27    
28    <target name="usage" description="Advises user to run with -projecthelp">    <target name="usage" description="Display main targets by running 'ant -projecthelp'">
29      <echo>Run "ant -projecthelp" for full usage information.</echo>      <java classname="org.apache.tools.ant.Main">
30          <arg value="-projecthelp" />
31        </java>
32    </target>    </target>
33    
34    
# Line 21  Line 37 
37    
38    
39    <!-- Compilation options -->    <!-- Compilation options -->
40    <property name="build.sourcelevel"    value="1.5"/>    <property name="build.sourcelevel"    value="6"/>
41    <property name="build.debug"          value="true"/>    <property name="build.debug"          value="true"/>
42    <property name="build.debuglevel"     value="source,lines,vars"/>    <property name="build.debuglevel"     value="source,lines,vars"/>
43    <property name="build.deprecation"    value="false"/>    <property name="build.deprecation"    value="false"/>
44    
45    <!-- Build locations -->    <!-- Build locations -->
46    <property name="build.dir"            location="build"/>    <property name="build.dir"                   location="build"/>
47    <property name="build.classes.dir"    location="${build.dir}/classes"/>    <property name="build.classes.dir"           location="${build.dir}/classes"/>
48    <property name="build.testcases.dir"  location="${build.dir}/testcases"/>    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
49    <property name="build.j1.dir"         location="${build.dir}/j1"/>    <property name="build.loops.dir"             location="${build.dir}/loops"/>
50    <property name="build.loops.dir"      location="${build.dir}/loops"/>    <property name="build.reports.dir"           location="${build.dir}/reports"/>
51    <property name="build.lib.dir"        location="${build.dir}/lib"/>  
52    <property name="build.ant.dir"        location="${build.dir}/ant"/>    <property name="build.4jdk7.dir"             location="${build.dir}/jsr166-4jdk7"/>
53    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>    <property name="build.4jdk7.classes.dir"     location="${build.4jdk7.dir}/classes"/>
54    <property name="build.reports.dir"    location="${build.dir}/reports"/>    <property name="build.4jdk7.tck.classes.dir" location="${build.4jdk7.dir}/tck-classes"/>
55    <property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/>    <property name="build.4jdk7.docs.dir"        location="${build.4jdk7.dir}/docs"/>
56    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>  
57    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>    <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
58    <property name="build.dc-filter.dir"  location="${build.dir}/filterdocchk"/>    <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>
59    <property name="build.jsr166x.dir"    location="${build.dir}/jsr166x"/>    <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>
60    <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>    <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>
61    <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>  
62      <property name="build.jsr166x.classes.dir"   location="${build.jsr166x.dir}/classes"/>
63    <property name="build.jsr166y.dir"    location="${build.dir}/jsr166y"/>    <property name="build.jsr166y.classes.dir"   location="${build.jsr166y.dir}/classes"/>
64    <property name="build.jsr166ylib.dir"        location="${build.dir}/jsr166ylib"/>    <property name="build.jsr166e.classes.dir"   location="${build.jsr166e.dir}/classes"/>
65    <property name="build.jsr166yjavadocs.dir"   location="${build.dir}/jsr166yjavadocs"/>    <property name="build.extra166y.classes.dir" location="${build.extra166y.dir}/classes"/>
66    
67      <!-- JDK locations -->
68      <property name="jdks.home"  location="${user.home}/jdk"/>
69    
70      <macrodef name="defjdklocations">
71        <attribute name="v"/>
72        <sequential>
73        <property name="jdk@{v}.home"   location="${jdks.home}/jdk@{v}"/>
74        <property name="java@{v}"       location="${jdk@{v}.home}/bin/java"/>
75        <property name="javac@{v}"      location="${jdk@{v}.home}/bin/javac"/>
76        <property name="javadoc@{v}"    location="${jdk@{v}.home}/bin/javadoc"/>
77        <property name="jdk@{v}src.dir" location="${jdks.home}/src/jdk@{v}/jdk/src/share/classes"/>
78        <local name="boot.jar.dir"/>
79        <property name="boot.jar.dir"   location="${jdk@{v}.home}/jre/lib"/>
80        <path id="bootclasspath@{v}">
81          <pathelement path="${boot.jar.dir}/resources.jar"/>
82          <pathelement path="${boot.jar.dir}/rt.jar"/>
83          <pathelement path="${boot.jar.dir}/jsse.jar"/>
84          <pathelement path="${boot.jar.dir}/jce.jar"/>
85          <pathelement path="${boot.jar.dir}/charsets.jar"/>
86        </path>
87        <property name="bootclasspath@{v}" value="${toString:bootclasspath@{v}}"/>
88        </sequential>
89      </macrodef>
90    
91      <macrodef name="mirror-dir">
92        <attribute name="src"/>
93        <attribute name="dst"/>
94        <sequential>
95        <delete dir="@{dst}"/>
96        <mkdir dir="@{dst}"/>
97        <copy todir="@{dst}" preservelastmodified="true">
98          <fileset dir="@{src}"/>
99        </copy>
100        </sequential>
101      </macrodef>
102    
103      <defjdklocations v="6"/>
104      <defjdklocations v="7"/>
105      <defjdklocations v="8"/>
106    
107    <!-- Source locations -->    <!-- Source locations -->
108    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
109    <property name="test.src.dir"         location="${basedir}/src/test"/>    <property name="test.src.dir"         location="${basedir}/src/test"/>
   <property name="j1.src.dir"           location="${basedir}/src/javaone"/>  
110    <property name="loops.src.dir"        location="${basedir}/src/loops"/>    <property name="loops.src.dir"        location="${basedir}/src/loops"/>
111    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
112    <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>    <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
   <property name="ant.src.dir"          location="${basedir}/etc/ant"/>  
   <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>  
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"/>    <property name="topsrc.dir"           location="${basedir}/src"/>
116    <property name="jsr166xsrc.dir"       location="${basedir}/src/jsr166x"/>    <property name="4jdk7src.dir"         location="${topsrc.dir}/jdk7"/>
117    <property name="jsr166ysrc.dir"       location="${basedir}/src/jsr166y"/>    <property name="jsr166xsrc.dir"       location="${topsrc.dir}/jsr166x"/>
118      <property name="jsr166ysrc.dir"       location="${topsrc.dir}/jsr166y"/>
119    <!-- Distribution locations -->    <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>
120    <property name="dist.javadocs.dir"    location="${dist.dir}/docs"/>    <property name="extra166ysrc.dir"     location="${topsrc.dir}/extra166y"/>
121    <property name="dist.jsr166xjavadocs.dir"    location="${dist.dir}/jsr166xdocs"/>  
122    <property name="dist.jsr166yjavadocs.dir"    location="${dist.dir}/jsr166ydocs"/>    <!-- Javadoc locations -->
123      <property name="docs.dir"          location="${build.dir}/docs"/>
124      <property name="4jdk7docs.dir"     location="${build.4jdk7.dir}/docs"/>
125      <property name="jsr166xdocs.dir"   location="${build.jsr166x.dir}/docs"/>
126      <property name="jsr166ydocs.dir"   location="${build.jsr166y.dir}/docs"/>
127      <property name="jsr166edocs.dir"   location="${build.jsr166e.dir}/docs"/>
128      <property name="extra166ydocs.dir" location="${build.extra166y.dir}/docs"/>
129    
130      <property name="dist.docs.dir"          location="${dist.dir}/docs"/>
131      <property name="dist.4jdk7docs.dir"     location="${dist.dir}/jsr166-4jdk7docs"/>
132      <property name="dist.jsr166xdocs.dir"   location="${dist.dir}/jsr166xdocs"/>
133      <property name="dist.jsr166ydocs.dir"   location="${dist.dir}/jsr166ydocs"/>
134      <property name="dist.jsr166edocs.dir"   location="${dist.dir}/jsr166edocs"/>
135      <property name="dist.extra166ydocs.dir" location="${dist.dir}/extra166ydocs"/>
136    
137    <!-- Jar locations -->    <!-- Jar locations -->
138    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>    <property name="product.jar"      location="${build.dir}/jsr166.jar"/>
139    <property name="jsr166xproduct.jar"   location="${build.jsr166xlib.dir}/jsr166x.jar"/>    <property name="4jdk7product.jar" location="${build.4jdk7.dir}/jsr166-4jdk7.jar"/>
140    <property name="jsr166yproduct.jar"   location="${build.jsr166ylib.dir}/jsr166y.jar"/>    <property name="jsr166x.jar"      location="${build.jsr166x.dir}/jsr166x.jar"/>
141    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>    <property name="jsr166y.jar"      location="${build.jsr166y.dir}/jsr166y.jar"/>
142    <property name="concurrent.jar"       location="${lib.dir}/concurrent.jar"/>    <property name="jsr166e.jar"      location="${build.jsr166e.dir}/jsr166e.jar"/>
143      <property name="extra166y.jar"    location="${build.extra166y.dir}/extra166y.jar"/>
144    <!-- Bootclasspath argument -->    <property name="junit.jar"        location="${lib.dir}/junit.jar"/>
145    <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>  
146      <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
147      <property name="jdkapi5docs.url"      value="http://docs.oracle.com/javase/1.5.0/docs/api/"/>
148      <property name="jdkapi6docs.url"      value="http://docs.oracle.com/javase/6/docs/api/"/>
149      <property name="jdkapi7docs.url"      value="http://docs.oracle.com/javase/7/docs/api/"/>
150    
151      <property name="jdkapi8docs.url"      value="http://download.java.net/jdk8/docs/api/"/>
152      <!-- The below does not yet exist as of 2013-01 -->
153      <!-- <property name="jdkapi8docs.url" value="http://docs.oracle.com/javase/8/docs/api/"/> -->
154    
155      <!-- Default jdk api doc location (latest stable release seems best) -->
156      <property name="jdkapidocs.url"       value="${jdkapi7docs.url}"/>
157    
158      <!-- Define the "jtreg" task -->
159      <!-- See the docs in "jtreg -onlineHelp" -->
160      <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"
161               classpath="${lib.dir}/jtreg.jar" />
162    
163    <!-- Test classpath -->    <!-- Test classpath -->
164    <path id="test.classpath">    <path id="test.classpath">
# Line 84  Line 166 
166      <pathelement location="${junit.jar}"/>      <pathelement location="${junit.jar}"/>
167    </path>    </path>
168    
169      <macrodef name="run-tck-tests">
170        <attribute name="tck.src.dir" default="${tck.src.dir}"/>
171        <attribute name="source" default="6"/>
172        <attribute name="target"/>
173        <attribute name="workdir"/>
174        <attribute name="classes"/>
175        <attribute name="jvmflags" default=""/>
176        <sequential>
177    
178        <mkdir dir="@{workdir}/tck-classes"/>
179    
180        <javac srcdir="@{tck.src.dir}"
181               destdir="@{workdir}/tck-classes"
182               debug="${build.debug}"
183               debuglevel="${build.debuglevel}"
184               deprecation="${build.deprecation}"
185               source="@{source}"
186               classpath="${junit.jar}"
187               bootclasspath="@{classes}:${bootclasspath@{source}}"
188               includeAntRuntime="false"
189               includeJavaRuntime="false"
190               executable="${javac@{target}}"
191               fork="true">
192    
193          <include name="*.java"/>
194          <compilerarg value="-XDignore.symbol.file=true"/>
195          <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
196          <compilerarg line="${build.args}"/>
197    
198        </javac>
199    
200        <java classname="JSR166TestCase"
201              failonerror="true"
202              jvm="${java@{target}}"
203              fork="true">
204            <jvmarg value="-Xbootclasspath/p:@{classes}"/>
205            <jvmarg line="@{jvmflags}"/>
206            <classpath>
207              <pathelement location="${junit.jar}"/>
208              <pathelement location="@{workdir}/tck-classes"/>
209            </classpath>
210        </java>
211    
212        </sequential>
213      </macrodef>
214    
215    <!-- ALoops classpath -->    <!-- ALoops classpath -->
216    <path id="loops.classpath">    <path id="loops.classpath">
217      <pathelement location="${build.loops.dir}"/>      <pathelement location="${build.loops.dir}"/>
218    </path>    </path>
219    
220    <!-- J1 classpath -->    <!-- Support @jls tag, used in jdk8+ javadoc -->
221    <path id="j1.classpath">    <property name="javadoc.jls.cite" value="The Java&amp;trade; Language Specification"/>
222      <pathelement location="${build.classes.dir}"/>    <property name="javadoc.jls.option" value="jls:a:See &lt;cite&gt;${javadoc.jls.cite}&lt;/cite&gt;:"/>
     <pathelement location="${build.j1.dir}"/>  
     <pathelement location="${junit.jar}"/>  
   
     <!-- Include dl.u.c for BoundedBuffer comparison -->  
     <pathelement location="${concurrent.jar}"/>  
   </path>  
   
223    
224    <!-- Main targets -->    <!-- Main targets -->
225    
226      <target name="dists"
227              depends="dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
228              description="Builds all public jars and docs"/>
229    
230    <target name="compile"    <target name="compile"
231            depends="init, configure-compiler"            depends="configure-compiler"
232            description="Compiles main sources to build folder">            description="Compiles src/main sources to build dir">
233    
234      <mkdir dir="${build.classes.dir}"/>      <mkdir dir="${build.classes.dir}"/>
235    
236      <javac srcdir="${src.dir}"      <javac srcdir="${src.dir}"
237            destdir="${build.classes.dir}"             destdir="${build.classes.dir}"
238              debug="${build.debug}"             debug="${build.debug}"
239         debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
240        deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
241             source="${build.sourcelevel}"             classpath=""
242               fork="true">             includeAntRuntime="false"
243               includeJavaRuntime="false"
244               executable="${javac8}"
245               fork="true">
246    
247        <include name="**/*.java"/>        <include name="**/*.java"/>
248        <compilerarg value="-XDignore.symbol.file"/>        <compilerarg value="-XDignore.symbol.file=true"/>
249          <compilerarg value="-Xlint:all"/>
 <!--  
       <exclude name="java/lang/**"/>  
250        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
       <compilerarg line="-Xlint -Xmaxwarns 1000"/>  
 -->  
251    
252      </javac>      </javac>
   
253    </target>    </target>
254    
255    
   
256    <target name="jar"    <target name="jar"
257            depends="compile"            depends="compile"
258            description="Builds library jar from compiled sources">            description="Builds library jar from compiled sources">
259    
     <mkdir dir="${build.lib.dir}"/>  
   
260      <jar destfile="${product.jar}">      <jar destfile="${product.jar}">
261        <fileset dir="${build.classes.dir}"/>        <fileset dir="${build.classes.dir}"/>
262      </jar>      </jar>
   
263    </target>    </target>
264    
265    
   
266    <target name="test"    <target name="test"
267            depends="init, configure-tests, report-tests"            depends="configure-tests, report-tests"
268            description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />            description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
269    
270    
   
271    <target name="docs"    <target name="docs"
272            description="Builds javadocs with custom tags to build folder">            description="Builds javadocs for src/main to dist dir">
273    
274      <delete dir="${build.javadocs.dir}"/>      <delete dir="${docs.dir}"/>
275      <mkdir dir="${build.javadocs.dir}"/>      <mkdir dir="${docs.dir}"/>
276    
277      <javadoc destdir="${build.javadocs.dir}"      <!-- the packagenames="none" hack below prevents scanning the -->
278                  link="http://java.sun.com/javase/6/docs/api/"      <!-- sourcepath for packages -->
             overview="${src.dir}/intro.html"  
             sourcepath="${src.dir}:/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"  
     >            
   
       <packageset dir="${src.dir}"/>  
   
     </javadoc>  
279    
280    </target>      <javadoc destdir="${docs.dir}"
281                 packagenames="none"
282                 link="${jdkapi8docs.url}"
283                 overview="${src.dir}/intro.html"
284    <target name="doccheck"               sourcepath="${src.dir}:${jdk8src.dir}"
285            depends="filter-doccheck"               classpath=""
286            description="Reports on javadoc style errors">               executable="${javadoc8}">
287          <fileset dir="${src.dir}" defaultexcludes="yes">
288      <delete dir="${build.doccheck.dir}"/>          <include name="**/*.java"/>
289      <mkdir dir="${build.doccheck.dir}"/>        </fileset>
290          <arg value="-XDignore.symbol.file=true"/>
291      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"        <arg value="-tag"/>
292           docletpath="${lib.dir}/doccheck.jar"        <arg value="${javadoc.jls.option}"/>
             destdir="${build.doccheck.dir}">  
       <packageset dir="${build.dc-filter.dir}"/>  
293      </javadoc>      </javadoc>
   
     <echo>DocCheck output is in ${build.doccheck.dir}</echo>  
   
294    </target>    </target>
295    
296    
   
   <target name="checkstyle"  
           depends="filter-src"  
           description="Reports on style errors in Java source (verbose, mostly chaff)">  
   
     <taskdef resource="checkstyletask.properties"  
             classpath="${lib.dir}/checkstyle-all-3.1.jar"/>  
   
     <mkdir dir="${build.checkstyle.dir}"/>  
   
     <checkstyle config="etc/checkstyle/sun_checks.xml"  
        failOnViolation="false">  
       <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>  
       <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>  
     </checkstyle>  
   
     <style in="${build.checkstyle.dir}/checkstyle-report.xml"  
           out="${build.checkstyle.dir}/checkstyle-report.html"  
         style="${stylesheet.dir}/checkstyle-frames.xsl"/>  
   
   </target>  
   
   
   
297    <target name="dist"    <target name="dist"
298            depends="init, dist-clean, dist-jar, dist-docs"            depends="dist-clean, dist-jar, dist-docs"
299            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
300    
301    
   
302    <target name="release"    <target name="release"
303            depends="dist"            depends="dist"
304            description="Puts entire CVS tree, plus distribution productions, in a jar">            description="Puts entire CVS tree, plus distribution productions, in a jar">
# Line 235  Line 314 
314        <exclude name="**/SyntaxTest.java"/>        <exclude name="**/SyntaxTest.java"/>
315        <exclude name="**/SuperfluousAbstract.java"/>        <exclude name="**/SuperfluousAbstract.java"/>
316      </jar>      </jar>
   
317    </target>    </target>
318    
319    
   
320    <target name="clean"    <target name="clean"
321            description="Removes all build products">            description="Removes all build products">
322    
323      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
     <delete dir="${build.classes.dir}"/>  
     <delete dir="${build.lib.dir}"/>  
324    
325    </target>    </target>
326    
327    
   
328    <target name="dist-clean"    <target name="dist-clean"
329            description="Removes all build and distribution products">            description="Removes all build and distribution products">
330    
# Line 259  Line 333 
333    </target>    </target>
334    
335    
   
   <target name="dist-docs"  
           description="Builds javadocs without custom tags to dist folder">  
   
     <delete dir="${dist.javadocs.dir}"/>  
     <mkdir dir="${dist.javadocs.dir}"/>  
   
     <javadoc destdir="${dist.javadocs.dir}"  
             link="http://java.sun.com/javase/6/docs/api/"  
             overview="${src.dir}/intro.html"  
   
             sourcepath="${src.dir}:/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"  
      >  
 <!--  
       <packageset dir="${src.dir}" defaultexcludes="yes">  
       <include name="java/util/concurrent"/>  
       <include name="java/util/concurrent/atomic"/>  
       <include name="java/util/concurrent/locks"/>  
       </packageset>  
 -->  
       <fileset dir="${topsrc.dir}" defaultexcludes="yes">  
       <include name="main/java/util/concurrent/*.java"/>  
       <include name="main/java/util/concurrent/atomic/*.java"/>  
       <include name="main/java/util/concurrent/locks/*.java"/>  
       <include name="main/java/util/*.java"/>  
 <!--  
       <include name="main/java/util/concurrent/*.html"/>  
       <include name="main/java/util/concurrent/atomic/*.html"/>  
       <include name="main/java/util/concurrent/locks/*.html"/>  
       <include name="main/java/util/*.html"/>  
 -->  
 <!--      <include name="jsr166x/*.java"/> -->  
       </fileset>  
     </javadoc>  
   
   </target>  
   
   
   
336    <!-- Internal targets -->    <!-- Internal targets -->
337    
338    
   <target name="init">  
   
     <!-- Version is kept in a separate file -->  
     <loadfile property="version" srcFile="version.properties"/>  
     <echo>Building JSR-166 version ${version}</echo>  
     <echo>java.home is ${java.home}</echo>  
   
   </target>  
   
   
339    <target name="dist-jar"    <target name="dist-jar"
340            depends="clean, jar">            depends="clean, jar">
   
341      <copy file="${product.jar}" todir="${dist.dir}"/>      <copy file="${product.jar}" todir="${dist.dir}"/>
   
   </target>  
   
   
   <target name="compile-ant-filter"  
           depends="init">  
   
     <mkdir dir="${build.ant.dir}"/>  
   
     <javac srcdir="${ant.src.dir}"  
           destdir="${build.ant.dir}"  
            source="1.4"/>  
   
   </target>  
   
   
   <target name="filter-src"  
           depends="compile-ant-filter">  
   
     <mkdir dir="${build.filter.src.dir}"/>  
   
     <copy todir="${build.filter.src.dir}">  
       <fileset dir="${src.dir}">  
         <include name="**/*.html"/>  
       </fileset>  
     </copy>  
   
     <copy todir="${build.filter.src.dir}">  
       <fileset dir="${src.dir}">  
         <exclude name="**/*.html"/>  
         <!-- Files excluded from dist-docs -->  
         <exclude name="java/util/Random.*"/>  
         <exclude name="sun/misc/Unsafe.*"/>  
       </fileset>  
       <!--  
       <filterchain>  
       -->  
   
         <!--  
          # This filter gets rid of angle-bracketed type parameters  
          # so that javadoc can run on the result. The following  
          # 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.)  
          -->  
   
         <!--  
         <filterreader classname="jsr166.ant.filters.ReplaceFilter"  
                       classpath="${build.ant.dir}">  
           <param name="notmatching" value="^\s+\*\s.*$"/>  
           <param name="pattern"     value="&lt;[^|>()]+?>+"/>  
           <param name="replacement" value=" "/>  
         </filterreader>  
         -->  
   
       <!--  
       </filterchain>  
       -->  
     </copy>  
   
342    </target>    </target>
343    
344      <target name="dist-docs"
345    <target name="filter-doccheck"            depends="clean, docs">
346            depends="filter-src">      <mirror-dir src="${docs.dir}" dst="${dist.docs.dir}"/>
   
     <mkdir dir="${build.dc-filter.dir}"/>  
   
     <copy todir="${build.dc-filter.dir}">  
       <fileset dir="${build.filter.src.dir}">  
         <include name="**/*.html"/>  
       </fileset>  
     </copy>  
   
     <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 {}"  
     />  
   
     <copy todir="${build.dc-filter.dir}">  
       <fileset dir="${build.filter.src.dir}">  
         <exclude name="**/*.html"/>  
       </fileset>  
       <filterchain>  
         <!--  
          # These two filters try to make the source look like  
          # something that doccheck can process. The first removes  
          # -source 1.4 assertions and the second adds in a bunch  
          # of single letter public nested marker interfaces so that  
          # 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>  
   
       </filterchain>  
     </copy>  
   
347    </target>    </target>
348    
349    
# Line 436  Line 353 
353      <mkdir dir="${build.testcases.dir}"/>      <mkdir dir="${build.testcases.dir}"/>
354    
355      <javac srcdir="${tck.src.dir}"      <javac srcdir="${tck.src.dir}"
356            destdir="${build.testcases.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="6"
361               fork="true">             classpath="${junit.jar}"
362               bootclasspath="@{product.jar}:${bootclasspath6}"
363               includeAntRuntime="false"
364               includeJavaRuntime="false"
365               executable="${javac8}"
366               fork="true">
367    
368        <compilerarg value="${bootclasspath.args}"/>        <include name="**/*.java"/>
369          <compilerarg value="-XDignore.symbol.file=true"/>
370          <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
371        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
372    
       <classpath refid="test.classpath"/>  
   
373      </javac>      </javac>
374    
375      <javac srcdir="${test.src.dir}"      <javac srcdir="${test.src.dir}"
376            destdir="${build.testcases.dir}"             destdir="${build.testcases.dir}"
377              debug="${build.debug}"             debug="${build.debug}"
378         debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
379        deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
380             source="${build.sourcelevel}"             source="6"
381               fork="true">             classpath=""
382               bootclasspath="@{product.jar}:${bootclasspath6}"
383        <include name="jsr166/test/**"/>             includeAntRuntime="false"
384               includeJavaRuntime="false"
385        <compilerarg value="${bootclasspath.args}"/>             executable="${javac8}"
386               fork="true">
387    
388          <include name="jsr166/test/**/*.java"/>
389          <compilerarg value="-XDignore.symbol.file=true"/>
390          <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
391        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
392    
       <classpath refid="test.classpath"/>  
   
393      </javac>      </javac>
394    
395  <!--  <!--
# Line 476  Line 401 
401             source="${build.sourcelevel}"             source="${build.sourcelevel}"
402               fork="true">               fork="true">
403    
404        <compilerarg value="${bootclasspath.args}"/>        <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
405          <compilerarg value="-XDignore.symbol.file=true"/>
406        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
407    
       <classpath refid="test.classpath"/>  
   
408      </javac>      </javac>
409  -->  -->
410    
# Line 500  Line 424 
424            errorProperty="junit.failed"            errorProperty="junit.failed"
425          failureProperty="junit.failed"          failureProperty="junit.failed"
426                      dir="${build.reports.dir}"                      dir="${build.reports.dir}"
427                        jvm="${java8}"
428                     fork="true">                     fork="true">
429    
430        <jvmarg value="${bootclasspath.args}"/>        <jvmarg value="-Xbootclasspath/p:${product.jar}"/>
431        <jvmarg value="-server"/>        <jvmarg value="-server"/>
432        <jvmarg value="-showversion"/>        <jvmarg value="-showversion"/>
433    
# Line 550  Line 475 
475        <fileset dir="${build.reports.dir}">        <fileset dir="${build.reports.dir}">
476          <include name="TEST-*.xml"/>          <include name="TEST-*.xml"/>
477        </fileset>        </fileset>
478        <report styledir="${stylesheet.dir}"        <report format="${junit.report.format}" todir="${build.reports.dir}"
                 format="${junit.report.format}"  
                  todir="${build.reports.dir}"  
479        />        />
480      </junitreport>      </junitreport>
481    
# Line 602  Line 525 
525    </target>    </target>
526    
527    
   
   <!-- Anthill targets -->  
   
   <target name="anthill-build">  
   
     <!-- Override this in user.properties -->  
     <property name="tiger.home" location="e:/j2sdk1.5.0"/>  
   
     <exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java">  
       <arg value="-Xmx256000000"/>  
       <!-- classpath of new JVM -->  
       <arg value="-classpath"/> <arg path="${java.class.path}"/>  
       <!-- location of Ant home directory -->  
       <arg value="-Dant.home=${ant.home}"/>  
       <!-- the Ant main class -->  
       <arg value="org.apache.tools.ant.Main"/>  
       <!-- The build file -->  
       <arg value="-buildfile"/>  <arg value="build.xml"/>  
       <!-- the target to build on the new Ant instance -->  
       <arg value="-DJAVA_HOME=${tiger.home}"/>  
       <arg value="do-anthill-build"/>  
     </exec>  
   </target>  
   
   <target name="do-anthill-build"  
           depends="jar, test, docs, dist-docs"/>  
   
   <target name="anthill-publish">  
   
     <copy todir="${deployDir}/docs/private">  
       <fileset dir="${build.javadocs.dir}"/>  
     </copy>  
   
     <copy todir="${deployDir}/docs/public">  
       <fileset dir="${dist.javadocs.dir}"/>  
     </copy>  
   
     <copy tofile="${deployDir}/index.html"  
           file="${basedir}/etc/anthill-index.html"/>  
   
     <copy todir="${deployDir}/notes">  
       <fileset dir="${basedir}/etc/notes"/>  
     </copy>  
   
   </target>  
   
   
   
528    <!-- Various demos and test programs -->    <!-- Various demos and test programs -->
529    
530    
531    <target name="sample" depends="init, configure-compiler"    <target name="loops" depends="configure-compiler"
           description="Standalone demo program">  
   
     <mkdir dir="${build.testcases.dir}"/>  
   
     <javac srcdir="${test.src.dir}"  
           destdir="${build.testcases.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
   
       <include name="jsr166/test/Sample.java"/>  
   
     </javac>  
   
     <copy todir="${build.testcases.dir}">  
       <fileset dir="${test.src.dir}">  
         <include name="**/*.properties"/>  
       </fileset>  
     </copy>  
   
   
     <java classname="jsr166.test.Sample" fork="true">  
       <classpath refid="test.classpath"/>  
       <!-- <jvmarg value="-ea"/> -->  
       <!-- <jvmarg value="-server"/> -->  
       <!-- <arg value="1000"/> -->  
     </java>  
   </target>  
   
   
   <target name="loops" depends="init, configure-compiler"  
532            description="Benchmark from Doug Lea's AQS paper">            description="Benchmark from Doug Lea's AQS paper">
533    
534      <mkdir dir="${build.loops.dir}"/>      <mkdir dir="${build.loops.dir}"/>
# Line 701  Line 543 
543    
544        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
545        <classpath refid="loops.classpath"/>        <classpath refid="loops.classpath"/>
546          <compilerarg value="-XDignore.symbol.file=true"/>
547    
548      </javac>      </javac>
549    
# Line 711  Line 554 
554    </target>    </target>
555    
556    
557    <target name="compile-j1" depends="init, configure-compiler, compile">    <!-- jsr166 4jdk7 -->
   
     <mkdir dir="${build.j1.dir}"/>  
558    
559      <javac srcdir="${j1.src.dir}"    <target name="4jdk7compile"
560            destdir="${build.j1.dir}"            depends="configure-compiler"
561              debug="${build.debug}"            description="Compiles src/jdk7 sources, targeting jdk7">
562         debuglevel="${build.debuglevel}"  
563        deprecation="${build.deprecation}"      <mkdir dir="${build.4jdk7.classes.dir}"/>
564             source="${build.sourcelevel}" >  
565        <javac srcdir="${4jdk7src.dir}"
566               destdir="${build.4jdk7.classes.dir}"
567               debug="${build.debug}"
568               debuglevel="${build.debuglevel}"
569               deprecation="${build.deprecation}"
570               source="6"
571               classpath=""
572               bootclasspath="${bootclasspath6}"
573               includeAntRuntime="false"
574               includeJavaRuntime="false"
575               executable="${javac7}"
576               fork="true">
577    
578        <include name="**/*.java"/>        <include name="**/*.java"/>
579        <exclude name="**/dijkstra/**"/>        <compilerarg value="-XDignore.symbol.file=true"/>
580          <compilerarg value="-Xlint:all"/>
581        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
       <classpath refid="j1.classpath"/>  
582    
583      </javac>      </javac>
   
584    </target>    </target>
585    
586    
587    <target name="sw" depends="compile-j1"    <target name="4jdk7jar"
588            description="Runs the SwingWorker demo">            depends="4jdk7compile"
589              description="Builds library jar from compiled sources">
     <!--  
     <java classname="jsr166.swing.SwingWorkerDemo" fork="true">  
       <classpath refid="j1.classpath"/>  
     </java>  
     -->  
   
     <copy todir="${build.j1.dir}" file="${j1.src.dir}/jsr166/swing/SwingWorker.html"/>  
590    
591      <exec dir="${build.j1.dir}" executable="appletviewer.exe">      <jar destfile="${4jdk7product.jar}">
592        <arg value="${build.j1.dir}/SwingWorker.html"/>        <fileset dir="${build.4jdk7.classes.dir}"/>
593      </exec>      </jar>
594    
595    </target>    </target>
596    
   <target name="j1" depends="compile-j1"  
           description="Runs a standalone JavaOne program">  
   
     <java classname="${j1.test}" fork="true">  
       <classpath refid="j1.classpath"/>  
       <jvmarg value="-client"/>  
   
       <!-- TestPseudoRandom args -->  
       <arg value="2"/>  
       <arg value="25"/>  
       <arg value="100000"/>  
   
       <!-- WebCrawler args -->  
       <!--  
       <arg value="jsr166.webcrawler.WebCrawler3"/>  
       <arg value="http://www.priorartisans.com"/>  
       <arg value="25"/>  
       -->  
597    
598      </java>    <target name="4jdk7-test-tck"
599              depends="4jdk7jar"
600              description="Runs tck tests for jsr166-4jdk7 directly">
601    
602        <run-tck-tests
603          target="7"
604          workdir="${build.4jdk7.dir}"
605          classes="${4jdk7product.jar}"/>
606    </target>    </target>
607    
608    
609    <target name="test-j1" depends="compile-j1"    <target name="4jdk7-test-tck-junit"
610            description="Runs testcases from the JavaOne source directories">            depends="4jdk7compile"
611              description="Runs tck tests for jsr166-4jdk7 via junit task (experimental)">
612    
613      <junit printsummary="true"      <junit printsummary="true"
614               showoutput="true"             showoutput="true"
615            errorProperty="junit.failed"             errorProperty="junit.failed"
616          failureProperty="junit.failed"             failureProperty="junit.failed"
617                      dir="${build.j1.dir}"             includeantruntime="true"
618                     fork="true">             jvm="${java7}"
619               fork="true">
620    
621        <!-- <jvmarg value="-server"/> -->        <jvmarg value="-Xbootclasspath/p:${4jdk7product.jar}"/>
622        <classpath refid="j1.classpath"/>        <jvmarg value="-server"/>
       <formatter type="xml"/>  
623    
624        <batchtest todir="${build.j1.dir}">        <classpath>
625          <fileset dir="${j1.src.dir}">          <pathelement location="${junit.jar}"/>
626            <include name="**/*Test.java"/>          <pathelement location="${build.4jdk7.tck.classes.dir}"/>
627          </fileset>        </classpath>
       </batchtest>  
628    
629      </junit>        <formatter type="brief"/>
630    
631      <available property="junit.report.format"        <test name="JSR166TestCase" haltonfailure="no">
632                    value="frames"        </test>
               classname="org.apache.xalan.lib.Redirect"/>  
     <property name="junit.report.format" value="noframes"/>  
   
     <junitreport todir="${build.j1.dir}">  
       <fileset dir="${build.j1.dir}">  
         <include name="TEST-*.xml"/>  
       </fileset>  
       <report styledir="${stylesheet.dir}"  
                 format="${junit.report.format}"  
                  todir="${build.j1.dir}"  
       />  
     </junitreport>  
633    
634      <fail message="Test Cases Failed" if="junit.failed"/>      </junit>
635      </target>
636    
637      <target name="4jdk7-test-jtreg"
638              depends="4jdk7compile"
639              description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task">
640        <delete dir="${build.4jdk7.dir}/JTwork"   quiet="true"/>
641        <delete dir="${build.4jdk7.dir}/JTreport" quiet="true"/>
642        <mkdir dir="${build.4jdk7.dir}/JTwork/scratch"/>
643        <mkdir dir="${build.4jdk7.dir}/JTreport"/>
644        <jtreg dir="${jtreg.src.dir}"
645               jdk="${jdk7.home}"
646               workDir="${build.4jdk7.dir}/JTwork"
647               reportDir="${build.4jdk7.dir}/JTreport">
648    
649          <arg value="-Xbootclasspath/p:${4jdk7product.jar}"/>
650          <arg value="-agentvm"/>
651          <arg value="-v:nopass,fail"/>
652          <arg value="-vmoptions:-esa -ea"/>
653          <arg value="-automatic"/>
654          <arg value="-k:!ignore"/>
655        </jtreg>
656    </target>    </target>
657    
658    
659      <target name="4jdk7-test"
660              depends="4jdk7-test-tck, 4jdk7-test-jtreg"
661              description="Runs tck and jtreg tests for jsr166-4jdk7">
662      </target>
663    
   <!-- C++ and JNI definitions and demos -->  
664    
665    <target name="configure-cpp">    <target name="4jdk7docs"
666              description="Builds javadocs for src/jdk7 to dist dir">
667    
668        <delete dir="${4jdk7docs.dir}"/>
669        <mkdir dir="${4jdk7docs.dir}"/>
670    
671        <javadoc destdir="${4jdk7docs.dir}"
672                 packagenames="none"
673                 link="${jdkapi7docs.url}"
674                 overview="${4jdk7src.dir}/intro.html"
675                 sourcepath="${4jdk7src.dir}:${jdk7src.dir}"
676                 classpath=""
677                 executable="${javadoc7}">
678          <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
679            <include name="**/*.java"/>
680          </fileset>
681          <arg value="-XDignore.symbol.file=true"/>
682        </javadoc>
683      </target>
684    
     <!-- Define tasks and types -->  
685    
686      <path id="cpptasks.path">    <target name="4jdk7dist"
687        <pathelement location="${lib.dir}/cpptasks.jar"/>            depends="4jdk7dist-jar, 4jdk7dist-docs"
688      </path>            description="Puts all distributable products in single hierarchy"/>
     <taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/>  
     <typedef resource="cpptasks.types" classpathref="cpptasks.path"/>  
689    
     <!-- Set platform property for JNI includes -->  
690    
691      <condition property="platform" value="linux">    <target name="4jdk7clean"
692        <os name="Linux"/>            description="Removes all 4jdk7 build products">
693      </condition>  
694      <condition property="platform" value="win32">      <delete dir="${build.4jdk7.dir}"/>
       <os family="windows"/>  
     </condition>  
     <condition property="platform" value="solaris">  
       <os name="SunOS"/>  
     </condition>  
695    
696    </target>    </target>
697    
698    
699    <target name="cppdemo" depends="configure-cpp">    <target name="4jdk7dist-clean"
700              description="Removes all build and distribution products">
701    
702      <mkdir dir="${build.dir}"/>    </target>
703    
704      <cc multithreaded="true"    <target name="4jdk7dist-jar"
705                   name="g++"            depends="4jdk7clean, 4jdk7jar">
706                 objdir="${build.dir}"      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
707                outfile="${build.dir}/CppDemo">    </target>
       <fileset dir="${test.src.dir}" includes="CppDemo.cpp"/>  
       <libset libs="stdc++"/>  
     </cc>  
708    
     <exec executable="${build.dir}/CppDemo">  
       <arg line="count in word frequency of word in command line count"/>  
     </exec>  
709    
710      <target name="4jdk7dist-docs"
711              depends="4jdk7clean, 4jdk7docs">
712        <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>
713    </target>    </target>
714    
715    
716    <target name="jnidemo" depends="init, configure-compiler, configure-cpp">    <!-- jsr166x -->
717    
718      <mkdir dir="${build.testcases.dir}"/>    <target name="jsr166xcompile"
719              depends="configure-compiler"
720              description="Compiles jsr166x sources to build dir">
721    
722      <javac srcdir="${test.src.dir}"      <mkdir dir="${build.jsr166x.classes.dir}"/>
           destdir="${build.testcases.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
       <compilerarg value="${bootclasspath.args}"/>  
       <compilerarg line="${build.args}"/>  
       <classpath refid="test.classpath"/>  
       <include name="JniDemo.java"/>  
     </javac>  
723    
724      <javah destdir="${build.testcases.dir}"      <javac srcdir="${topsrc.dir}"
725        classpathref="test.classpath">             destdir="${build.jsr166x.classes.dir}"
726        <class name="JniDemo"/>             debug="${build.debug}"
727      </javah>             debuglevel="${build.debuglevel}"
728               deprecation="${build.deprecation}"
729      <cc multithreaded="true"             classpath=""
730                   name="g++"             bootclasspath="${bootclasspath6}"
731                 objdir="${build.dir}"             source="5"
732                outfile="${build.dir}/JniDemo"             includeAntRuntime="false"
733                outtype="shared">             includeJavaRuntime="false"
734               executable="${javac7}"
735        <compiler>             fork="true">
736          <defineset>  
737            <define name="__int64" value="long long"/>        <include name="jsr166x/**/*.java"/>
738          </defineset>        <compilerarg value="-XDignore.symbol.file=true"/>
739          <includepath location="${java.home}/../include"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
740          <includepath location="${java.home}/../include/${platform}"/>        <compilerarg line="${build.args}"/>
         <compilerarg value="-mno-cygwin"/>  
       </compiler>  
   
       <linker>  
         <linkerarg value="--add-stdcall-alias"/>  
       </linker>  
   
       <includepath location="${build.testcases.dir}"/>  
   
       <fileset dir="${test.src.dir}" includes="JniDemo.cpp"/>  
   
       <libset libs="stdc++"/>  
   
     </cc>  
   
     <!-- Necessary if windows, harmless if not -->  
     <copy file="${build.dir}/libJniDemo.so" tofile="${build.dir}/JniDemo.dll"/>  
   
     <java classname="JniDemo" fork="true">  
       <!-- Watch out: path separator hardwired to semicolon here! -->  
       <sysproperty key="java.library.path" path="${java.library.path};${build.dir}"/>  
       <classpath refid="test.classpath"/>  
       <arg line="count in word frequency of word in command line count"/>  
     </java>  
741    
742        </javac>
743    </target>    </target>
744    
745    
746      <target name="jsr166xjar"
747              depends="jsr166xcompile"
748              description="Builds library jar from compiled sources">
749    
750    <!-- Backward compatibility, work in progress (some files not checked in) -->      <jar destfile="${jsr166x.jar}">
751          <fileset dir="${build.jsr166x.classes.dir}"/>
752        </jar>
753    
754      </target>
755    
   <property name="pretiger.src.dir"     location="${build.dir}/pretiger/src"/>  
   <property name="build.pretiger.dir"   location="${build.dir}/pretiger/classes"/>  
   <property name="pretiger.jar"         location="${build.lib.dir}/jsr166-pretiger.jar"/>  
   <property name="pretiger.sourcelevel" value="1.4"/>  
756    
757    <target name="defang"    <target name="jsr166xdocs"
758         depends="init"            description="Builds javadocs to dist dir">
    description="Generates pre-Tiger compatible source">  
759    
760      <delete dir="${pretiger.src.dir}"/>      <delete dir="${jsr166xdocs.dir}"/>
761      <mkdir dir="${pretiger.src.dir}"/>      <mkdir dir="${jsr166xdocs.dir}"/>
762    
763      <exec executable="perl">      <javadoc destdir="${jsr166xdocs.dir}"
764        <arg file="etc/defang.pl"/>               packagenames="jsr166x.*"
765        <!-- <arg value="-v"/> -->               link="${jdkapidocs.url}"
766        <arg value="-s"/> <arg file="${src.dir}"/>               sourcepath="${topsrc.dir}:${jdk6src.dir}"
767        <arg value="-t"/> <arg file="${pretiger.src.dir}"/>               bootclasspath="${bootclasspath6}"
768      </exec>               source="5"
769                 executable="${javadoc7}">
770          <arg value="-XDignore.symbol.file=true"/>
771    
772        </javadoc>
773    </target>    </target>
774    
   <target name="compile-pretiger"  
           depends="init, configure-compiler, defang"  
           description="Compiles pre-Tiger sources to build folder">  
775    
776      <mkdir dir="${build.pretiger.dir}"/>    <target name="jsr166xdist"
777              depends="jsr166xdist-jar, jsr166xdist-docs"
778              description="Puts all distributable products in single hierarchy"/>
779    
     <javac srcdir="${pretiger.src.dir}"  
           destdir="${build.pretiger.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${pretiger.sourcelevel}"  
              fork="true">  
780    
781        <compilerarg line="${build.args}"/>    <target name="jsr166xclean"
782        <exclude name="**/Thread.java"/>            description="Removes all jsr166x build products">
783    
784      </javac>      <delete dir="${build.jsr166x.dir}"/>
785    
786    </target>    </target>
787    
   <target name="pretiger" depends="compile-pretiger">  
788    
789      <mkdir dir="${build.lib.dir}"/>    <target name="jsr166xdist-clean"
790              description="Removes all build and distribution products">
791    
792      <jar destfile="${pretiger.jar}">    </target>
       <fileset dir="${build.pretiger.dir}">  
       </fileset>  
     </jar>  
793    
794    
795      <target name="jsr166xdist-jar"
796              depends="jsr166xclean, jsr166xjar">
797        <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
798    </target>    </target>
799    
800    <!-- jsr166x -->    <target name="jsr166xdist-docs"
801              depends="jsr166xclean, jsr166xdocs">
802        <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>
803      </target>
804    
805      <!-- jsr166y -->
806    
   <target name="jsr166xcompile"  
           depends="init, configure-compiler"  
           description="Compiles jsr166x sources">  
807    
808      <mkdir dir="${build.jsr166x.dir}"/>    <target name="jsr166ycompile"
809              depends="configure-compiler"
810              description="Compiles jsr166y sources">
811    
812      <javac srcdir="${jsr166xsrc.dir}"      <mkdir dir="${build.jsr166y.classes.dir}"/>
           destdir="${build.jsr166x.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
813    
814        <include name="**/*.java"/>      <javac srcdir="${topsrc.dir}"
815               destdir="${build.jsr166y.classes.dir}"
816               debug="${build.debug}"
817               debuglevel="${build.debuglevel}"
818               deprecation="${build.deprecation}"
819               source="6"
820               classpath=""
821               bootclasspath="${bootclasspath6}"
822               includeAntRuntime="false"
823               includeJavaRuntime="false"
824               executable="${javac7}"
825               fork="true">
826    
827          <include name="jsr166y/**/*.java"/>
828          <compilerarg value="-XDignore.symbol.file=true"/>
829          <compilerarg value="-Xlint:all"/>
830        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
831    
832      </javac>      </javac>
   
833    </target>    </target>
834    
835    
836      <target name="jsr166yjar"
837    <target name="jsr166xjar"            depends="jsr166ycompile"
           depends="jsr166xcompile"  
838            description="Builds library jar from compiled sources">            description="Builds library jar from compiled sources">
839    
840      <mkdir dir="${build.jsr166xlib.dir}"/>      <jar destfile="${jsr166y.jar}" index="true">
841          <fileset dir="${build.jsr166y.classes.dir}"/>
     <jar destfile="${jsr166xproduct.jar}">  
       <fileset dir="${build.jsr166x.dir}"/>  
842      </jar>      </jar>
843    
844    </target>    </target>
845    
846    
847      <target name="jsr166ydocs"
848              description="Builds javadocs to dist dir">
849    
850    <target name="jsr166xdocs"      <delete dir="${jsr166ydocs.dir}"/>
851            description="Builds javadocs with custom tags to build folder">      <mkdir dir="${jsr166ydocs.dir}"/>
   
     <delete dir="${build.jsr166xjavadocs.dir}"/>  
     <mkdir dir="${build.jsr166xjavadocs.dir}"/>  
   
     <javadoc destdir="${build.jsr166xjavadocs.dir}"  
              link="http://java.sun.com/javase/6/docs/api/"  
   
             sourcepath="${jsr166xsrc.dir}:/home/dl/1.5.0/j2se/martin/j2se/src/share/classes"  
   
     >  
       <packageset dir="${topsrc.dir}" defaultexcludes="yes">  
       <include name="jsr166x"/>  
       </packageset>  
852    
853        <javadoc destdir="${jsr166ydocs.dir}"
854                 packagenames="jsr166y.*"
855                 link="${jdkapidocs.url}"
856                 sourcepath="${topsrc.dir}:${jdk6src.dir}"
857                 bootclasspath="${bootclasspath6}"
858                 source="6"
859                 executable="${javadoc7}">
860          <arg value="-XDignore.symbol.file=true"/>
861    
862      </javadoc>      </javadoc>
   
863    </target>    </target>
864    
865    
866    <target name="jsr166xdist"    <target name="jsr166ydist"
867            depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs"            depends="jsr166ydist-jar, jsr166ydist-docs"
868            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
869    
870    
871      <target name="jsr166yclean"
872              description="Removes all jsr166y build products">
873    
874    <target name="jsr166xclean"      <delete dir="${build.jsr166y.dir}"/>
           description="Removes all build products">  
   
     <delete dir="${build.jsr166x.dir}"/>  
     <delete dir="${build.jsr166xlib.dir}"/>  
875    
876    </target>    </target>
877    
878    
879      <target name="jsr166ydist-clean"
   <target name="jsr166xdist-clean"  
880            description="Removes all build and distribution products">            description="Removes all build and distribution products">
881    
882    </target>    </target>
883    
884      <target name="jsr166ydist-jar"
885              depends="jsr166yclean, jsr166yjar">
886        <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
887      </target>
888    
889      <target name="jsr166ydist-docs"
890              depends="jsr166yclean, jsr166ydocs">
891        <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>
892      </target>
893    
   <target name="jsr166xdist-docs"  
           description="Builds javadocs without custom tags to dist folder">  
894    
895      <delete dir="${dist.jsr166xjavadocs.dir}"/>    <!-- extra166y -->
     <mkdir dir="${dist.jsr166xjavadocs.dir}"/>  
896    
     <javadoc destdir="${dist.jsr166xjavadocs.dir}"  
                 link="http://java.sun.com/javase/6/docs/api/"  
               source="${build.sourcelevel}">  
   
       <packageset dir="${topsrc.dir}" defaultexcludes="yes">  
       <include name="jsr166x"/>  
       </packageset>  
897    
898      </javadoc>    <target name="extra166ycompile"
899              depends="configure-compiler, jsr166yjar"
900              description="Compiles extra166y sources">
901    
902    </target>      <mkdir dir="${build.extra166y.classes.dir}"/>
903    
904    <target name="jsr166xdist-jar"      <javac srcdir="${topsrc.dir}"
905            depends="jsr166xclean, jsr166xjar">             destdir="${build.extra166y.classes.dir}"
906               debug="${build.debug}"
907               debuglevel="${build.debuglevel}"
908               deprecation="${build.deprecation}"
909               bootclasspath="@{jsr166y.jar}:${bootclasspath6}"
910               classpath=""
911               source="6"
912               includeAntRuntime="false"
913               includeJavaRuntime="false"
914               executable="${javac7}"
915               fork="true">
916    
917      <copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/>        <include name="extra166y/**/*.java"/>
918          <compilerarg value="-XDignore.symbol.file=true"/>
919          <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
920          <compilerarg line="${build.args}"/>
921    
922        </javac>
923    </target>    </target>
924    
   <!-- jsr166y -->  
925    
926      <target name="extra166yjar"
927              depends="extra166ycompile"
928              description="Builds library jar from compiled sources">
929    
930    <target name="jsr166ycompile"      <jar destfile="${extra166y.jar}" index="true">
931            depends="init, configure-compiler"        <fileset dir="${build.extra166y.classes.dir}"/>
932            description="Compiles jsr166y sources">      </jar>
933    
934      <mkdir dir="${build.jsr166y.dir}"/>    </target>
935    
     <javac srcdir="${jsr166ysrc.dir}"  
           destdir="${build.jsr166y.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
936    
937        <include name="**/*.java"/>    <target name="extra166ydocs"
938        <compilerarg line="${build.args}"/>            description="Builds javadocs to build dir">
       <compilerarg value="${bootclasspath.args}"/>  
939    
940  <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->      <delete dir="${extra166ydocs.dir}"/>
941        <mkdir dir="${extra166ydocs.dir}"/>
942    
943      </javac>      <javadoc destdir="${extra166ydocs.dir}"
944                 packagenames="extra166y.*"
945                 link="${jdkapidocs.url}"
946                 sourcepath="${topsrc.dir}:${jdk6src.dir}"
947                 bootclasspath="${bootclasspath6}"
948                 source="6"
949                 executable="${javadoc7}">
950          <arg value="-XDignore.symbol.file=true"/>
951    
952        </javadoc>
953    </target>    </target>
954    
955    
956      <target name="extra166ydist"
957              depends="extra166ydist-jar, extra166ydist-docs"
958              description="Puts all distributable products in single hierarchy"/>
959    
   <target name="jsr166yjar"  
           depends="jsr166ycompile"  
           description="Builds library jar from compiled sources">  
960    
961      <mkdir dir="${build.jsr166ylib.dir}"/>    <target name="extra166yclean"
962              description="Removes all extra166y build products">
963    
964      <jar destfile="${jsr166yproduct.jar}">      <delete dir="${build.extra166y.dir}"/>
       <fileset dir="${build.jsr166y.dir}"/>  
     </jar>  
965    
966    </target>    </target>
967    
968    
969      <target name="extra166ydist-clean"
970              description="Removes all build and distribution products">
971    
972    <target name="jsr166ydocs"    </target>
           description="Builds javadocs with custom tags to build folder">  
973    
974      <delete dir="${build.jsr166yjavadocs.dir}"/>    <target name="extra166ydist-jar"
975      <mkdir dir="${build.jsr166yjavadocs.dir}"/>            depends="extra166yclean, extra166yjar">
976        <copy file="${extra166y.jar}" todir="${dist.dir}"/>
977      </target>
978    
979      <target name="extra166ydist-docs"
980              depends="extra166yclean, extra166ydocs">
981        <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>
982      </target>
983    
984      <!-- jsr166e -->
985    
986      <target name="jsr166ecompile"
987              depends="configure-compiler"
988              description="Compiles jsr166e sources">
989    
990        <mkdir dir="${build.jsr166e.classes.dir}"/>
991    
992        <javac srcdir="${topsrc.dir}"
993               destdir="${build.jsr166e.classes.dir}"
994               debug="${build.debug}"
995               debuglevel="${build.debuglevel}"
996               deprecation="${build.deprecation}"
997               source="7"
998               classpath=""
999               includeAntRuntime="false"
1000               includeJavaRuntime="false"
1001               executable="${javac7}"
1002               fork="true">
1003    
1004          <include name="jsr166e/**/*.java"/>
1005          <compilerarg value="-XDignore.symbol.file=true"/>
1006          <compilerarg value="-Xlint:all"/>
1007          <compilerarg line="${build.args}"/>
1008    
1009      <javadoc destdir="${build.jsr166yjavadocs.dir}"      </javac>
1010                  link="http://java.sun.com/javase/6/docs/api/"    </target>
             sourcepath="${jsr166ysrc.dir}:/home/dl/1.5.0/j2se/martin/j2se/src/share/classes"  
   
     >  
       <packageset dir="${topsrc.dir}" defaultexcludes="no">  
       <include name="jsr166y"/>  
       </packageset>  
1011    
1012    
1013      </javadoc>    <target name="jsr166ejar"
1014              depends="jsr166ecompile"
1015              description="Builds library jar from compiled sources">
1016    
1017        <jar destfile="${jsr166e.jar}" index="true">
1018          <fileset dir="${build.jsr166e.classes.dir}"/>
1019        </jar>
1020    
1021    </target>    </target>
1022    
1023    
1024    <target name="jsr166ydist"    <target name="jsr166edocs"
1025            depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs"            description="Builds javadocs to build dir">
           description="Puts all distributable products in single hierarchy"/>  
1026    
1027        <delete dir="${jsr166edocs.dir}"/>
1028        <mkdir dir="${jsr166edocs.dir}"/>
1029    
1030        <javadoc destdir="${jsr166edocs.dir}"
1031                 packagenames="jsr166e.*"
1032                 link="${jdkapidocs.url}"
1033                 sourcepath="${topsrc.dir}:${jdk7src.dir}"
1034                 source="7"
1035                 executable="${javadoc7}">
1036          <arg value="-XDignore.symbol.file=true"/>
1037    
1038    <target name="jsr166yclean"      </javadoc>
1039            description="Removes all build products">    </target>
1040    
     <delete dir="${build.jsr166y.dir}"/>  
     <delete dir="${build.jsr166ylib.dir}"/>  
1041    
1042      <target name="jsr166e-test-tck"
1043              depends="jsr166ejar"
1044              description="Runs tck tests for jsr166e">
1045    
1046        <run-tck-tests
1047          tck.src.dir="${test.src.dir}/tck-jsr166e"
1048          source="7"
1049          target="8"
1050          workdir="${build.jsr166e.dir}"
1051          classes="${jsr166e.jar}"/>
1052    </target>    </target>
1053    
1054    
1055      <target name="jsr166edist"
1056              depends="jsr166edist-jar, jsr166edist-docs"
1057              description="Puts all distributable products in single hierarchy"/>
1058    
   <target name="jsr166ydist-clean"  
           description="Removes all build and distribution products">  
1059    
1060      <target name="jsr166eclean"
1061              description="Removes all jsr166e build products">
1062        <delete dir="${build.jsr166e.dir}"/>
1063    </target>    </target>
1064    
   <target name="jsr166ydist-docs"  
           description="Builds javadocs without custom tags to dist folder">  
   
     <delete dir="${dist.jsr166yjavadocs.dir}"/>  
     <mkdir dir="${dist.jsr166yjavadocs.dir}"/>  
1065    
1066      <javadoc destdir="${dist.jsr166yjavadocs.dir}"    <target name="jsr166edist-clean"
1067                  link="http://java.sun.com/javase/6/docs/api/"            description="Removes all build and distribution products">
               source="${build.sourcelevel}">  
       <fileset dir="${topsrc.dir}" defaultexcludes="yes">  
       <include name="jsr166y/*.java"/>  
       <include name="jsr166y/forkjoin/*.java"/>  
             </fileset>  
     </javadoc>  
1068    
1069    </target>    </target>
1070    
1071    <target name="jsr166ydist-jar"    <target name="jsr166edist-jar"
1072            depends="jsr166yclean, jsr166yjar">            depends="jsr166eclean, jsr166ejar">
1073        <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
1074      <copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/>    </target>
1075    
1076      <target name="jsr166edist-docs"
1077              depends="jsr166eclean, jsr166edocs">
1078        <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>
1079    </target>    </target>
1080    
1081  </project>  </project>

Legend:
Removed from v.1.74  
changed lines
  Added in v.1.129

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