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

Diff of /jsr166/build.xml

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

revision 1.41 by tim, Fri Jun 6 20:48:55 2003 UTC revision 1.90 by dl, Fri Jul 15 13:21:07 2011 UTC
# Line 21  Line 21 
21    
22    
23    <!-- Compilation options -->    <!-- Compilation options -->
24    <property name="build.sourcelevel"    value="1.5"/>    <property name="build.sourcelevel"    value="1.6"/>
   <property name="build.docsourcelevel" value="1.4"/>  
25    <property name="build.debug"          value="true"/>    <property name="build.debug"          value="true"/>
26    <property name="build.debuglevel"     value="source,lines,vars"/>    <property name="build.debuglevel"     value="source,lines,vars"/>
27    <property name="build.deprecation"    value="false"/>    <property name="build.deprecation"    value="false"/>
28    
29    <!-- Build locations -->    <!-- Build locations -->
30    <property name="build.dir"            location="build"/>    <property name="build.dir"                   location="build"/>
31    <property name="build.classes.dir"    location="${build.dir}/classes"/>    <property name="build.classes.dir"           location="${build.dir}/classes"/>
32    <property name="build.emulation.dir"  location="${build.dir}/emulation"/>    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
33    <property name="build.testcases.dir"  location="${build.dir}/testcases"/>    <property name="build.loops.dir"             location="${build.dir}/loops"/>
34    <property name="build.lib.dir"        location="${build.dir}/lib"/>    <property name="build.lib.dir"               location="${build.dir}/lib"/>
35    <property name="build.ant.dir"        location="${build.dir}/ant"/>    <property name="build.javadocs.dir"          location="${build.dir}/javadocs"/>
36    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>    <property name="build.reports.dir"           location="${build.dir}/reports"/>
37    <property name="build.stripped.dir"   location="${build.dir}/stripped"/>    <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
38    <property name="build.reports.dir"    location="${build.dir}/reports"/>    <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>
39    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>    <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>
40    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>  
41      <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>
42      <property name="build.jsr166ylib.dir"        location="${build.dir}/jsr166ylib"/>
43      <property name="build.jsr166yjavadocs.dir"   location="${build.dir}/jsr166yjavadocs"/>
44    
45      <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>
46      <property name="build.jsr166elib.dir"        location="${build.dir}/jsr166elib"/>
47      <property name="build.jsr166ejavadocs.dir"   location="${build.dir}/jsr166ejavadocs"/>
48    
49      <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>
50      <property name="build.extra166ylib.dir"      location="${build.dir}/extra166ylib"/>
51      <property name="build.extra166yjavadocs.dir" location="${build.dir}/extra166yjavadocs"/>
52    
53    <!-- Source locations -->    <!-- Source locations -->
54    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
   <property name="emulation.src.dir"    location="${basedir}/src/emulation"/>  
55    <property name="test.src.dir"         location="${basedir}/src/test"/>    <property name="test.src.dir"         location="${basedir}/src/test"/>
56    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>    <property name="loops.src.dir"        location="${basedir}/src/loops"/>
57    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
58      <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
59    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
60    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
61      <property name="topsrc.dir"           location="${basedir}/src"/>
62      <property name="jsr166xsrc.dir"       location="${basedir}/src/jsr166x"/>
63      <property name="jsr166ysrc.dir"       location="${basedir}/src/jsr166y"/>
64      <property name="jsr166esrc.dir"       location="${basedir}/src/jsr166e"/>
65      <property name="extra166ysrc.dir"     location="${basedir}/src/extra166y"/>
66      <property name="jdksrc.dir"           location="/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"/>
67    <!-- Distribution locations -->    <!-- Distribution locations -->
68    <property name="dist.javadocs.dir"    location="${dist.dir}/docs"/>    <property name="dist.javadocs.dir"           location="${dist.dir}/docs"/>
69      <property name="dist.jsr166xjavadocs.dir"    location="${dist.dir}/jsr166xdocs"/>
70      <property name="dist.jsr166yjavadocs.dir"    location="${dist.dir}/jsr166ydocs"/>
71      <property name="dist.jsr166ejavadocs.dir"    location="${dist.dir}/jsr166edocs"/>
72      <property name="dist.extra166yjavadocs.dir"  location="${dist.dir}/extra166ydocs"/>
73    
74    <!-- Jar locations -->    <!-- Jar locations -->
75    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
76      <property name="jsr166xproduct.jar"   location="${build.jsr166xlib.dir}/jsr166x.jar"/>
77      <property name="jsr166yproduct.jar"   location="${build.jsr166ylib.dir}/jsr166y.jar"/>
78      <property name="jsr166eproduct.jar"   location="${build.jsr166elib.dir}/jsr166e.jar"/>
79      <property name="extra166yproduct.jar" location="${build.extra166ylib.dir}/extra166y.jar"/>
80    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
   <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>  
   
81    
82      <!-- Bootclasspath argument -->
83      <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
84    
85    <!-- Files excluded from dist-docs and emulation jar -->    <!-- Test classpath -->
86    <patternset id="unsafe.exclusion">    <path id="test.classpath">
87      <exclude name="java/util/Random.*"/>      <pathelement location="${build.testcases.dir}"/>
88      <exclude name="sun/misc/Unsafe.*"/>      <pathelement location="${junit.jar}"/>
89    </patternset>    </path>
90    
91    <!-- Files excludes from emulation jar -->    <!-- ALoops classpath -->
92    <patternset id="atomic.exclusion">    <path id="loops.classpath">
93      <exclude name="java/util/concurrent/atomic/AtomicBoolean*"/>      <pathelement location="${build.loops.dir}"/>
94      <exclude name="java/util/concurrent/atomic/AtomicInteger*"/>    </path>
     <exclude name="java/util/concurrent/atomic/AtomicLong*"/>  
     <exclude name="java/util/concurrent/atomic/AtomicReference*"/>  
   </patternset>  
   
95    
96    
97    <!-- Main targets -->    <!-- Main targets -->
98    
99      <target name="dists"
100              depends="dist, jsr166xdist, jsr166ydist,jsr166edist,  extra166ydist"
101              description="Builds all public jars and docs"/>
102    
103    <target name="compile"    <target name="compile"
104            depends="init, configure-compiler, prepare-src"            depends="init, configure-compiler"
105            description="Compiles main sources to build folder">            description="Compiles main sources to build folder">
106    
     <property name="prepare.src.dir" value="${src.dir}"/>  
   
107      <mkdir dir="${build.classes.dir}"/>      <mkdir dir="${build.classes.dir}"/>
108    
109  <!--      <javac srcdir="${src.dir}"
     <echo>javac ${gjc.args}</echo>  
     <echo>bootclasspath=${compile.bootclasspath}</echo>  
 -->  
   
     <javac srcdir="${prepare.src.dir}"  
110            destdir="${build.classes.dir}"            destdir="${build.classes.dir}"
111              debug="${build.debug}"              debug="${build.debug}"
112         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
# Line 98  Line 114 
114             source="${build.sourcelevel}"             source="${build.sourcelevel}"
115               fork="true">               fork="true">
116    
117        <compilerarg    line="${gjc.args}"/>        <include name="**/*.java"/>
118        <bootclasspath refid="compile.bootclasspath"/>        <compilerarg value="-XDignore.symbol.file=true"/>
119    
120    <!--
121          <exclude name="java/lang/**"/>
122          <compilerarg line="${build.args}"/>
123          <compilerarg line="-Xlint -Xmaxwarns 1000"/>
124    -->
125    
126      </javac>      </javac>
127    
128    </target>    </target>
129    
130    
   <target name="jar"  
           depends="configure-emulation, init-jar, native-jar, emulation-jar"  
           description="Builds library jar from compiled sources"/>  
   
   
   <target name="test"  
           depends="init, configure-tests, report-tests"  
           description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />  
131    
132      <target name="jar"
133              depends="compile"
134              description="Builds library jar from compiled sources">
135    
136    <target name="checkstyle"      <mkdir dir="${build.lib.dir}"/>
           depends="filter-src"  
           description="Reports on style errors in Java source (verbose, mostly chaff)">  
   
     <taskdef resource="checkstyletask.properties"  
             classpath="${lib.dir}/checkstyle-all-2.4.jar"/>  
137    
138      <checkstyle>      <jar destfile="${product.jar}">
139        <formatter type="plain"/>  <!-- also available: type="xml" -->        <fileset dir="${build.classes.dir}"/>
140        <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>      </jar>
     </checkstyle>  
141    
142    </target>    </target>
143    
144    
   <target name="doccheck"  
           depends="filter-src"  
           description="Reports on javadoc style errors (not working yet)">  
   
     <delete dir="${build.doccheck.dir}"/>  
     <mkdir dir="${build.doccheck.dir}"/>  
145    
146      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"    <target name="test"
147           docletpath="${lib.dir}/doccheck.jar"            depends="init, configure-tests, report-tests"
148              destdir="${build.doccheck.dir}">            description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
       <packageset dir="${build.filter.src.dir}"/>  
     </javadoc>  
149    
   </target>  
150    
151    
152    <target name="docs"    <target name="docs"
           depends="filter-src"  
153            description="Builds javadocs with custom tags to build folder">            description="Builds javadocs with custom tags to build folder">
154    
155      <delete dir="${build.javadocs.dir}"/>      <delete dir="${build.javadocs.dir}"/>
156      <mkdir dir="${build.javadocs.dir}"/>      <mkdir dir="${build.javadocs.dir}"/>
157    
158      <javadoc destdir="${build.javadocs.dir}"      <!-- the packagenames="none" hack below prevents scanning the -->
159                  link="http://java.sun.com/j2se/1.4.1/docs/api"      <!-- sourcepath for packages -->
             overview="${src.dir}/intro.html"  
               source="${build.docsourcelevel}">  
   
       <tag name="revised" description="Last revised:"/>  
       <tag name="spec"    description="Specified by:"/>  
       <tag name="editor"  description="Last edited by:"/>  
       <tag name="fixme"   description="FIX ME:"/>  
   
       <packageset dir="${build.filter.src.dir}"/>  
160    
161        <javadoc destdir="${build.javadocs.dir}"
162                 packagenames="none"
163                 link="http://download.oracle.com/javase/7/docs/api/"
164                 overview="${src.dir}/intro.html"
165                 sourcepath="${src.dir}:${jdksrc.dir}"
166                 additionalparam="-XDignore.symbol.file=true" >
167          <fileset dir="${src.dir}" defaultexcludes="yes">
168          <include name="**/*.java"/>
169          </fileset>
170      </javadoc>      </javadoc>
171    
172    </target>    </target>
173    
174    
   <target name="strip"  
           depends="init, configure-compiler"  
           description="Strip generics from java source (not working yet)">  
   
     <mkdir dir="${build.stripped.dir}"/>  
175    
176      <!--    <target name="dist"
177       # javac -s doesn't reliably generate compilable code. It generates            depends="init, dist-clean, dist-jar, dist-docs"
178       # bridge methods (marked as "synthetic") that can have identical            description="Puts all distributable products in single hierarchy"/>
      # signatures to existing methods except for the return value.  
      -->  
     <javac srcdir="${src.dir}"  
           destdir="${build.stripped.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
179    
       <compilerarg    line="${gjc.args} -s"/>  
       <bootclasspath refid="compile.bootclasspath"/>  
180    
181      </javac>    <target name="release"
182              depends="dist"
183              description="Puts entire CVS tree, plus distribution productions, in a jar">
184    
185        <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
186    
187        <jar basedir="${basedir}" destfile="${release.jar}">
188          <!-- <exclude name="build/**"/> -->
189          <exclude name="${release.jar}"/>
190          <exclude name="user.properties"/>
191          <exclude name="etc/notes/**"/>
192          <exclude name="src/emulation/**"/>
193          <exclude name="**/SyntaxTest.java"/>
194          <exclude name="**/SuperfluousAbstract.java"/>
195        </jar>
196    
197    </target>    </target>
198    
199    
   <target name="dist"  
           depends="init, dist-clean, dist-jar, dist-docs"  
           description="Puts all distributable products in single hierarchy"/>  
   
200    
201    <target name="clean"    <target name="clean"
202            description="Removes all build products">            description="Removes all build products">
# Line 213  Line 208 
208    </target>    </target>
209    
210    
211    
212    <target name="dist-clean"    <target name="dist-clean"
213            description="Removes all build and distribution products">            description="Removes all build and distribution products">
214    
# Line 221  Line 217 
217    </target>    </target>
218    
219    
220    
221    <target name="dist-docs"    <target name="dist-docs"
           depends="filter-src"  
222            description="Builds javadocs without custom tags to dist folder">            description="Builds javadocs without custom tags to dist folder">
223    
224      <delete dir="${dist.javadocs.dir}"/>      <delete dir="${dist.javadocs.dir}"/>
225      <mkdir dir="${dist.javadocs.dir}"/>      <mkdir dir="${dist.javadocs.dir}"/>
226    
227      <javadoc destdir="${dist.javadocs.dir}"      <!-- the packagenames="none" hack below prevents scanning the -->
228                  link="http://java.sun.com/j2se/1.4.1/docs/api"      <!-- sourcepath for packages -->
             overview="${src.dir}/intro.html"  
               source="${build.docsourcelevel}">  
   
       <packageset dir="${build.filter.src.dir}"/>  
229    
230        <javadoc destdir="${dist.javadocs.dir}"
231                 packagenames="none"
232                 link="http://download.oracle.com/javase/7/docs/api/"
233                 overview="${src.dir}/intro.html"
234                 sourcepath="${src.dir}:${jdksrc.dir}"
235                 additionalparam="-XDignore.symbol.file=true" >
236          <fileset dir="${src.dir}" defaultexcludes="yes">
237          <include name="**/*.java"/>
238          </fileset>
239      </javadoc>      </javadoc>
240    
241    </target>    </target>
# Line 249  Line 250 
250      <!-- Version is kept in a separate file -->      <!-- Version is kept in a separate file -->
251      <loadfile property="version" srcFile="version.properties"/>      <loadfile property="version" srcFile="version.properties"/>
252      <echo>Building JSR-166 version ${version}</echo>      <echo>Building JSR-166 version ${version}</echo>
253        <echo>java.home is ${java.home}</echo>
254    
255    </target>    </target>
256    
257    
258    <target name="init-jar">    <target name="dist-jar"
259              depends="clean, jar">
     <mkdir dir="${build.lib.dir}"/>  
   
   </target>  
   
   
   <target name="native-jar"  
           depends="compile"  
           unless="build.emulation.true">  
260    
261      <jar destfile="${product.jar}">      <copy file="${product.jar}" todir="${dist.dir}"/>
       <fileset dir="${build.classes.dir}"/>  
     </jar>  
262    
263    </target>    </target>
264    
265    
266    <target name="compile-emulation"    <target name="compile-tests"
267            depends="init, configure-compiler"            depends="jar">
           if="build.emulation.true">  
268    
269      <mkdir dir="${build.emulation.dir}"/>      <mkdir dir="${build.testcases.dir}"/>
270    
271      <javac srcdir="${emulation.src.dir}"      <javac srcdir="${tck.src.dir}"
272            destdir="${build.emulation.dir}"            destdir="${build.testcases.dir}"
273              debug="${build.debug}"              debug="${build.debug}"
274         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
275        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
276             source="${build.sourcelevel}"             source="${build.sourcelevel}"
277               fork="true">               fork="true">
278    
279        <compilerarg    line="${gjc.args}"/>        <compilerarg value="${bootclasspath.args}"/>
280        <bootclasspath refid="compile.bootclasspath"/>        <compilerarg line="${build.args}"/>
281          <compilerarg value="-XDignore.symbol.file=true"/>
     </javac>  
   
   </target>  
   
   
   <target name="emulation-jar"  
           depends="compile-emulation"  
           if="build.emulation.true">  
   
   
     <jar destfile="${product.jar}" duplicate="add">  
       <fileset dir="${build.classes.dir}">  
         <patternset refid="atomic.exclusion"/>  
         <patternset refid="unsafe.exclusion"/>  
       </fileset>  
       <fileset dir="${build.emulation.dir}"/>  
     </jar>  
   
   </target>  
   
   
   <target name="dist-jar"  
           depends="clean, jar">  
   
     <copy file="${product.jar}" todir="${dist.dir}"/>  
   
   </target>  
   
   
   <target name="compile-ant-filter"  
           depends="init">  
   
     <mkdir dir="${build.ant.dir}"/>  
282    
283      <javac srcdir="${ant.src.dir}"        <classpath refid="test.classpath"/>
           destdir="${build.ant.dir}"  
            source="1.4"  
     />  
   
   </target>  
284    
285        </javac>
286    
287    <target name="filter-src"      <javac srcdir="${test.src.dir}"
288            depends="compile-ant-filter">            destdir="${build.testcases.dir}"
289                debug="${build.debug}"
290      <mkdir dir="${build.filter.src.dir}"/>         debuglevel="${build.debuglevel}"
291          deprecation="${build.deprecation}"
292      <copy todir="${build.filter.src.dir}">             source="${build.sourcelevel}"
293        <fileset dir="${src.dir}">               fork="true">
         <include name="**/*.html"/>  
       </fileset>  
     </copy>  
   
     <!-- Not needed now, used for doccheck filtering:  
     <property name="generic.declarations"  
              value="public interface E {} public interface T {} public interface K {} public interface V {}"  
     />  
     -->  
   
     <copy todir="${build.filter.src.dir}">  
       <fileset dir="${src.dir}">  
         <exclude name="**/*.html"/>  
         <patternset refid="unsafe.exclusion"/>  
       </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>  
   
   
         <!--  
          # This filter uncomments lines beginning with "//@" so that  
          # javadoc can see imports that are needed to resolve links  
          # but that shouldn't be in the compiled code.  
          -->  
   
         <filterreader classname="jsr166.ant.filters.ReplaceFilter"  
                       classpath="${build.ant.dir}">  
           <param name="matching"    value="^//@.*$"/>  
           <param name="pattern"     value="^//@"/>  
           <param name="replacement" value=""/>  
         </filterreader>  
   
   
         <!--  
          # The next 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.  
          #  
          # Currently commented out because doccheck doesn't work. :-(  
          -->  
   
         <!--  
         <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>  
         -->  
294    
295        </filterchain>        <include name="jsr166/test/**"/>
     </copy>  
296    
297    </target>        <compilerarg value="${bootclasspath.args}"/>
298          <compilerarg line="${build.args}"/>
299          <compilerarg value="-XDignore.symbol.file=true"/>
300    
301          <classpath refid="test.classpath"/>
302    
303    <target name="compile-tests"      </javac>
           depends="jar">  
   
     <mkdir dir="${build.testcases.dir}"/>  
304    
305  <!--  <!--
306      <echo>javac ${gjc.args}</echo>      <javac srcdir="${jtreg.src.dir}"
     <echo>bootclasspath=${test.compile.bootclasspath}</echo>  
     <echo>classpath="${test.classpath}"</echo>  
 -->  
   
     <javac srcdir="${test.src.dir}"  
307            destdir="${build.testcases.dir}"            destdir="${build.testcases.dir}"
308              debug="${build.debug}"              debug="${build.debug}"
309         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
# Line 439  Line 311 
311             source="${build.sourcelevel}"             source="${build.sourcelevel}"
312               fork="true">               fork="true">
313    
314        <compilerarg    line="${gjc.args}"/>        <compilerarg value="${bootclasspath.args}"/>
315        <bootclasspath refid="test.compile.bootclasspath"/>        <compilerarg line="${build.args}"/>
316        <classpath     refid="test.classpath"/>        <compilerarg value="-XDignore.symbol.file=true"/>
317    
318          <classpath refid="test.classpath"/>
319    
320      </javac>      </javac>
321    -->
322    
323    </target>    </target>
324    
# Line 463  Line 338 
338                      dir="${build.reports.dir}"                      dir="${build.reports.dir}"
339                     fork="true">                     fork="true">
340    
341        <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>        <jvmarg value="${bootclasspath.args}"/>
342          <jvmarg value="-server"/>
343          <jvmarg value="-showversion"/>
344    
345          <classpath refid="test.classpath"/>
346    
347        <formatter type="xml"/>        <formatter type="xml"/>
348    
349        <batchtest todir="${build.reports.dir}">        <batchtest todir="${build.reports.dir}" unless="no.test.tck">
350            <fileset dir="${tck.src.dir}">
351              <include name="**/${testcase}Test.java"/>
352            </fileset>
353          </batchtest>
354    
355          <batchtest todir="${build.reports.dir}" if="do.test.old">
356          <fileset dir="${test.src.dir}">          <fileset dir="${test.src.dir}">
357              <include name="jsr166/test/**/${testcase}Test.java"/>
358            </fileset>
359          </batchtest>
360    
361    <!--
362          <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
363            <fileset dir="${jtreg.src.dir}">
364            <include name="**/${testcase}Test.java"/>            <include name="**/${testcase}Test.java"/>
365          </fileset>          </fileset>
366        </batchtest>        </batchtest>
367    -->
368    
369      </junit>      </junit>
370    
# Line 481  Line 374 
374    <target name="report-tests"    <target name="report-tests"
375            depends="run-tests">            depends="run-tests">
376    
377      <!-- Sets junit.report.format to frames if Xalan is present,      <!-- Sets junit.report.format to frames if redirection is present,
378           otherwise sets it to noframes. -->           otherwise sets it to noframes. -->
379      <available property="junit.report.format"      <available property="junit.report.format"
380                    value="frames"                    value="frames"
# Line 493  Line 386 
386        <fileset dir="${build.reports.dir}">        <fileset dir="${build.reports.dir}">
387          <include name="TEST-*.xml"/>          <include name="TEST-*.xml"/>
388        </fileset>        </fileset>
389        <report styledir="${stylesheet.dir}"        <report format="${junit.report.format}" todir="${build.reports.dir}"
                 format="${junit.report.format}"  
                  todir="${build.reports.dir}"  
390        />        />
391      </junitreport>      </junitreport>
392    
# Line 506  Line 397 
397    
398    <target name="configure-compiler">    <target name="configure-compiler">
399    
400      <property name="gjc.version"      <property name="unchecked.option" value="-Xlint:unchecked"/>
              value="2.0"/>  
401    
402      <condition property="novariance.arg" value="-novariance">      <condition property="warnunchecked.arg" value="${unchecked.option}">
403        <and>        <istrue value="${build.warnunchecked}"/>
         <equals arg1="${gjc.version}" arg2="2.0"/>  
         <or>  
           <not><isset property="gjc.novariance"/></not>  
           <istrue value="${gjc.novariance}"/>  
         </or>  
       </and>  
404      </condition>      </condition>
405    
406      <property name="novariance.arg"      <property name="warnunchecked.arg" value=""/>
              value=""/>  
407    
     <property name="gjc.dir"  
              value="${lib.dir}/gjc"/>  
408    
409      <property name="javac.jar"      <!-- Common options in javac invocations -->
410            location="${gjc.dir}/${gjc.version}/javac.jar"/>      <property name="build.args" value="${warnunchecked.arg}"/>
411    
412      <property name="collect.jar"    </target>
           location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/>  
413    
414    
415      <condition property="warnunchecked.arg" value="-warnunchecked">    <target name="configure-tests"
416        <istrue value="${gjc.warnunchecked}"/>         depends="configure-compiler">
     </condition>  
417    
418      <property name="warnunchecked.arg" value=""/>      <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
419        <available property="junit.available"
420                   classname="junit.framework.Protectable"/>
421    
422      <condition property="prepare.src.dir" value="${build.dir}/prepare-src">      <!-- Xalan -->
423        <istrue value="${build.nothreads}"/>      <available property="xalan.available"
424      </condition>                 classname="org.apache.xalan.Version"/>
425    
426    
427        <!-- Ant 1.6beta and later don't need or want this check -->
428      <!--      <!--
429       ! Bootclasspath munging for source compilation.      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
430       -->            unless="junit.available"/>
431    
432      <path id="pre.bootclasspath">      <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
433        <pathelement location="${javac.jar}"/>            unless="xalan.available"/>
434      </path>      -->
   
     <path id="compile.bootclasspath">  
       <pathelement location="${build.classes.dir}"/>  
       <pathelement location="${collect.jar}"/>  
       <pathelement location="${rt.jar}"/>  
     </path>  
   
     <!-- Flatten paths into platform-appropriate strings -->  
     <property name="pre.bootclasspath"     refid="pre.bootclasspath"/>  
     <property name="compile.bootclasspath" refid="compile.bootclasspath"/>  
435    
436      </target>
437    
438      <!-- Common options in javac invocations -->  
439      <property name="gjc.args"    <!-- Various demos and test programs -->
440               value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}"  
441      />  
442      <target name="loops" depends="init, configure-compiler"
443              description="Benchmark from Doug Lea's AQS paper">
444    
445        <mkdir dir="${build.loops.dir}"/>
446    
447        <javac srcdir="${loops.src.dir}"
448              destdir="${build.loops.dir}"
449                debug="${build.debug}"
450           debuglevel="${build.debuglevel}"
451          deprecation="${build.deprecation}"
452               source="${build.sourcelevel}"
453                 fork="true">
454    
455          <compilerarg line="${build.args}"/>
456          <classpath refid="loops.classpath"/>
457          <compilerarg value="-XDignore.symbol.file=true"/>
458    
459        </javac>
460    
461        <java classname="ALoops" fork="true">
462          <classpath refid="loops.classpath"/>
463        </java>
464    
465    </target>    </target>
466    
467    
468    <target name="prepare-src"    <!-- jsr166x -->
469            depends="configure-compiler"  
470            if="prepare.src.dir">  
471      <target name="jsr166xcompile"
472      <mkdir dir="${prepare.src.dir}"/>            depends="init, configure-compiler"
473      <copy todir="${prepare.src.dir}">            description="Compiles jsr166x sources">
474        <fileset dir="${src.dir}">  
475          <exclude name="java/lang/**"/>      <mkdir dir="${build.jsr166x.dir}"/>
476        </fileset>  
477      </copy>      <javac srcdir="${jsr166xsrc.dir}"
478              destdir="${build.jsr166x.dir}"
479                debug="${build.debug}"
480           debuglevel="${build.debuglevel}"
481          deprecation="${build.deprecation}"
482               source="${build.sourcelevel}"
483                 fork="true">
484    
485          <include name="**/*.java"/>
486          <compilerarg line="${build.args}"/>
487          <compilerarg value="-XDignore.symbol.file=true"/>
488    
489        </javac>
490    
491    </target>    </target>
492    
493    
   <target name="configure-emulation">  
494    
495      <condition property="build.emulation.true">    <target name="jsr166xjar"
496        <or>            depends="jsr166xcompile"
497          <and>            description="Builds library jar from compiled sources">
498            <os family="windows"/>  
499            <not>      <mkdir dir="${build.jsr166xlib.dir}"/>
500              <isset property="build.emulation"/>  
501            </not>      <jar destfile="${jsr166xproduct.jar}">
502          </and>        <fileset dir="${build.jsr166x.dir}"/>
503          <istrue value="${build.emulation}"/>      </jar>
       </or>  
     </condition>  
504    
505    </target>    </target>
506    
507    
   <target name="configure-tests"  
        depends="configure-compiler">  
508    
509      <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->    <target name="jsr166xdocs"
510      <available property="junit.available"            description="Builds javadocs with custom tags to build folder">
                classname="junit.framework.Protectable"/>  
511    
512      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"      <delete dir="${build.jsr166xjavadocs.dir}"/>
513            unless="junit.available"/>      <mkdir dir="${build.jsr166xjavadocs.dir}"/>
514    
515        <javadoc destdir="${build.jsr166xjavadocs.dir}"
516                 packagenames="jsr166x"
517                 link="http://download.oracle.com/javase/7/docs/api/"
518                 source="${build.sourcelevel}"
519                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
520                 additionalparam="-XDignore.symbol.file=true" />
521    
522      <!--    </target>
523       ! Bootclasspath munging for testing, so JUnit can test our local  
524       ! modifications to java.*.  
525       -->    <target name="jsr166xdist"
526              depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs"
527              description="Puts all distributable products in single hierarchy"/>
528    
     <path id="test.classpath">  
       <pathelement location="${product.jar}"/>  
       <pathelement location="${build.testcases.dir}"/>  
       <pathelement location="${junit.jar}"/>  
     </path>  
529    
     <path id="test.compile.bootclasspath">  
       <pathelement location="${javac.jar}"/>  
       <pathelement location="${collect.jar}"/>  
       <pathelement location="${rt.jar}"/>  
     </path>  
530    
531      <path id="test.run.bootclasspath">    <target name="jsr166xclean"
532        <pathelement location="${javac.jar}"/>            description="Removes all build products">
       <path refid="test.classpath"/>  
     </path>  
533    
534      <!-- Flatten test classpaths into platform-appropriate strings -->      <delete dir="${build.jsr166x.dir}"/>
535      <property name="test.classpath"             refid="test.classpath"/>      <delete dir="${build.jsr166xlib.dir}"/>
     <property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/>  
     <property name="test.run.bootclasspath"     refid="test.run.bootclasspath"/>  
536    
537    </target>    </target>
538    
539    
540    
541    <!-- Anthill targets -->    <target name="jsr166xdist-clean"
542              description="Removes all build and distribution products">
543    
544    <target name="anthill-build"    </target>
           depends="jar, test, docs, dist-docs"/>  
545    
   <target name="anthill-publish">  
546    
     <copy todir="${deployDir}/docs/private">  
       <fileset dir="${build.javadocs.dir}"/>  
     </copy>  
547    
548      <copy todir="${deployDir}/docs/public">    <target name="jsr166xdist-docs"
549        <fileset dir="${dist.javadocs.dir}"/>            description="Builds javadocs without custom tags to dist folder">
550      </copy>  
551        <delete dir="${dist.jsr166xjavadocs.dir}"/>
552        <mkdir dir="${dist.jsr166xjavadocs.dir}"/>
553    
554        <javadoc destdir="${dist.jsr166xjavadocs.dir}"
555                 packagenames="jsr166x"
556                 link="http://download.oracle.com/javase/7/docs/api/"
557                 source="${build.sourcelevel}"
558                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
559                 additionalparam="-XDignore.symbol.file=true" />
560    
561      <copy tofile="${deployDir}/index.html"    </target>
562            file="${basedir}/etc/anthill-index.html"/>  
563      <target name="jsr166xdist-jar"
564              depends="jsr166xclean, jsr166xjar">
565    
566      <copy todir="${deployDir}/notes">      <copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/>
       <fileset dir="${basedir}/etc/notes"/>  
     </copy>  
567    
568    </target>    </target>
569    
570      <!-- jsr166y -->
571    
572    
573      <target name="jsr166ycompile"
574              depends="init, configure-compiler"
575              description="Compiles jsr166y sources">
576    
577        <mkdir dir="${build.jsr166y.dir}"/>
578    
579        <javac srcdir="${jsr166ysrc.dir}"
580              destdir="${build.jsr166y.dir}"
581                debug="${build.debug}"
582           debuglevel="${build.debuglevel}"
583          deprecation="${build.deprecation}"
584               source="${build.sourcelevel}"
585                 fork="true">
586    
587          <include name="**/*.java"/>
588          <compilerarg line="${build.args}"/>
589          <compilerarg value="-XDignore.symbol.file=true"/>
590          <compilerarg value="${bootclasspath.args}"/>
591    
592    <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
593    
594        </javac>
595    
596      </target>
597    
598    
599    
600      <target name="jsr166yjar"
601              depends="jsr166ycompile"
602              description="Builds library jar from compiled sources">
603    
604        <mkdir dir="${build.jsr166ylib.dir}"/>
605    
606        <jar destfile="${jsr166yproduct.jar}" index="true">
607          <fileset dir="${build.jsr166y.dir}"/>
608        </jar>
609    
610      </target>
611    
612    
613    
614      <target name="jsr166ydocs"
615              description="Builds javadocs with custom tags to build folder">
616    
617        <delete dir="${build.jsr166yjavadocs.dir}"/>
618        <mkdir dir="${build.jsr166yjavadocs.dir}"/>
619    
620        <javadoc destdir="${build.jsr166yjavadocs.dir}"
621                 packagenames="jsr166y"
622                 link="http://download.oracle.com/javase/7/docs/api/"
623                 source="${build.sourcelevel}"
624                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
625                 additionalparam="-XDignore.symbol.file=true" />
626    
627      </target>
628    
629    
630      <target name="jsr166ydist"
631              depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs"
632              description="Puts all distributable products in single hierarchy"/>
633    
634    
635    
636      <target name="jsr166yclean"
637              description="Removes all build products">
638    
639        <delete dir="${build.jsr166y.dir}"/>
640        <delete dir="${build.jsr166ylib.dir}"/>
641    
642      </target>
643    
644    
645    
646      <target name="jsr166ydist-clean"
647              description="Removes all build and distribution products">
648    
649      </target>
650    
651      <target name="jsr166ydist-docs"
652              description="Builds javadocs without custom tags to dist folder">
653    
654        <delete dir="${dist.jsr166yjavadocs.dir}"/>
655        <mkdir dir="${dist.jsr166yjavadocs.dir}"/>
656    
657        <javadoc destdir="${dist.jsr166yjavadocs.dir}"
658                 packagenames="jsr166y"
659                 link="http://download.oracle.com/javase/7/docs/api/"
660                 source="${build.sourcelevel}"
661                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
662                 additionalparam="-XDignore.symbol.file=true" />
663    
664      </target>
665    
666      <target name="jsr166ydist-jar"
667              depends="jsr166yclean, jsr166yjar">
668    
669        <copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/>
670    
671      </target>
672    
673    
674      <!-- extra166y -->
675    
676    
677      <target name="extra166ycompile"
678              depends="init, configure-compiler, jsr166ycompile"
679              description="Compiles extra166y sources">
680    
681        <mkdir dir="${build.extra166y.dir}"/>
682    
683        <javac srcdir="${extra166ysrc.dir}"
684              destdir="${build.extra166y.dir}"
685                debug="${build.debug}"
686                classpath="${jsr166yproduct.jar}"
687           debuglevel="${build.debuglevel}"
688          deprecation="${build.deprecation}"
689               source="${build.sourcelevel}"
690                 fork="true">
691    
692          <include name="**/*.java"/>
693          <compilerarg line="${build.args}"/>
694          <compilerarg value="-XDignore.symbol.file=true"/>
695          <compilerarg value="${bootclasspath.args}"/>
696    
697    <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
698    
699        </javac>
700    
701      </target>
702    
703    
704    
705      <target name="extra166yjar"
706              depends="extra166ycompile"
707              description="Builds library jar from compiled sources">
708    
709        <mkdir dir="${build.extra166ylib.dir}"/>
710    
711        <jar destfile="${extra166yproduct.jar}" index="true">
712          <fileset dir="${build.extra166y.dir}"/>
713        </jar>
714    
715      </target>
716    
717    
718    
719      <target name="extra166ydocs"
720              description="Builds javadocs with custom tags to build folder">
721    
722        <delete dir="${build.extra166yjavadocs.dir}"/>
723        <mkdir dir="${build.extra166yjavadocs.dir}"/>
724    
725        <javadoc destdir="${build.extra166yjavadocs.dir}"
726                 packagenames="extra166y"
727                 link="http://download.oracle.com/javase/7/docs/api/"
728                 source="${build.sourcelevel}"
729                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
730                 additionalparam="-XDignore.symbol.file=true" />
731    
732      </target>
733    
734    
735      <target name="extra166ydist"
736              depends="extra166ydist-clean, extra166ydist-jar, extra166ydist-docs"
737              description="Puts all distributable products in single hierarchy"/>
738    
739    
740    
741      <target name="extra166yclean"
742              description="Removes all build products">
743    
744        <delete dir="${build.extra166y.dir}"/>
745        <delete dir="${build.extra166ylib.dir}"/>
746    
747      </target>
748    
749    
750    
751      <target name="extra166ydist-clean"
752              description="Removes all build and distribution products">
753    
754      </target>
755    
756      <target name="extra166ydist-docs"
757              description="Builds javadocs without custom tags to dist folder">
758    
759        <delete dir="${dist.extra166yjavadocs.dir}"/>
760        <mkdir dir="${dist.extra166yjavadocs.dir}"/>
761    
762        <javadoc destdir="${dist.extra166yjavadocs.dir}"
763                 packagenames="extra166y"
764                 link="http://download.oracle.com/javase/7/docs/api/"
765                 source="${build.sourcelevel}"
766                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
767                 additionalparam="-XDignore.symbol.file=true" />
768    
769      </target>
770    
771      <target name="extra166ydist-jar"
772              depends="extra166yclean, extra166yjar">
773    
774        <copy file="${extra166yproduct.jar}" todir="${dist.dir}"/>
775    
776      </target>
777    
778      <!-- jsr166e -->
779    
780    
781      <target name="jsr166ecompile"
782              depends="init, configure-compiler"
783              description="Compiles jsr166e sources">
784    
785        <mkdir dir="${build.jsr166e.dir}"/>
786    
787        <javac srcdir="${jsr166esrc.dir}"
788              destdir="${build.jsr166e.dir}"
789                debug="${build.debug}"
790           debuglevel="${build.debuglevel}"
791          deprecation="${build.deprecation}"
792               source="1.7"
793                 fork="true">
794    
795          <include name="**/*.java"/>
796          <compilerarg line="${build.args}"/>
797          <compilerarg value="-XDignore.symbol.file=true"/>
798          <compilerarg value="${bootclasspath.args}"/>
799    
800    <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
801    
802        </javac>
803    
804      </target>
805    
806    
807    
808      <target name="jsr166ejar"
809              depends="jsr166ecompile"
810              description="Builds library jar from compiled sources">
811    
812        <mkdir dir="${build.jsr166elib.dir}"/>
813    
814        <jar destfile="${jsr166eproduct.jar}" index="true">
815          <fileset dir="${build.jsr166e.dir}"/>
816        </jar>
817    
818      </target>
819    
820    
821    
822      <target name="jsr166edocs"
823              description="Builds javadocs with custom tags to build folder">
824    
825        <delete dir="${build.jsr166ejavadocs.dir}"/>
826        <mkdir dir="${build.jsr166ejavadocs.dir}"/>
827    
828        <javadoc destdir="${build.jsr166ejavadocs.dir}"
829                 packagenames="jsr166e,jsr166e.extra"
830                 link="http://download.oracle.com/javase/7/docs/api/"
831                 source="1.7"
832                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
833                 additionalparam="-XDignore.symbol.file=true" />
834    
835      </target>
836    
837    
838      <target name="jsr166edist"
839              depends="jsr166edist-clean, jsr166edist-jar, jsr166edist-docs"
840              description="Puts all distributable products in single hierarchy"/>
841    
842    
843    
844      <target name="jsr166eclean"
845              description="Removes all build products">
846    
847        <delete dir="${build.jsr166e.dir}"/>
848        <delete dir="${build.jsr166elib.dir}"/>
849    
850      </target>
851    
852    
853    
854      <target name="jsr166edist-clean"
855              description="Removes all build and distribution products">
856    
857      </target>
858    
859      <target name="jsr166edist-docs"
860              description="Builds javadocs without custom tags to dist folder">
861    
862        <delete dir="${dist.jsr166ejavadocs.dir}"/>
863        <mkdir dir="${dist.jsr166ejavadocs.dir}"/>
864    
865        <javadoc destdir="${dist.jsr166ejavadocs.dir}"
866                 packagenames="jsr166e,jsr166e.extra"
867                 link="http://download.oracle.com/javase/7/docs/api/"
868                 source="1.7"
869                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
870                 additionalparam="-XDignore.symbol.file=true" />
871    
872      </target>
873    
874      <target name="jsr166edist-jar"
875              depends="jsr166eclean, jsr166ejar">
876    
877        <copy file="${jsr166eproduct.jar}" todir="${dist.dir}"/>
878    
879      </target>
880    
881  </project>  </project>

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.90

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