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

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

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