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

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

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