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

Diff of /jsr166/build.xml

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

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

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.124

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