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

Diff of /jsr166/build.xml

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

revision 1.50 by tim, Tue Aug 5 04:03:38 2003 UTC revision 1.92 by jsr166, Mon Jan 14 07:08:06 2013 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"/>  
38    <property name="build.reports.dir"    location="${build.dir}/reports"/>    <property name="build.jdk7.dir"              location="${build.dir}/jdk7"/>
39    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>    <property name="build.jdk7.lib.dir"          location="${build.jdk7.dir}"/>
40    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>    <property name="build.jdk7.classes.dir"      location="${build.jdk7.dir}/classes"/>
41    <property name="build.filter.doccheck.dir" location="${build.dir}/filterdocchk"/>    <property name="build.jdk7.docs.dir"         location="${build.jdk7.dir}/docs"/>
42    
43      <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
44      <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>
45      <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>
46    
47      <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>
48      <property name="build.jsr166ylib.dir"        location="${build.dir}/jsr166ylib"/>
49      <property name="build.jsr166yjavadocs.dir"   location="${build.dir}/jsr166yjavadocs"/>
50    
51      <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>
52      <property name="build.jsr166elib.dir"        location="${build.dir}/jsr166elib"/>
53      <property name="build.jsr166ejavadocs.dir"   location="${build.dir}/jsr166ejavadocs"/>
54    
55      <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>
56      <property name="build.extra166ylib.dir"      location="${build.dir}/extra166ylib"/>
57      <property name="build.extra166yjavadocs.dir" location="${build.dir}/extra166yjavadocs"/>
58    
59      <!-- JDK binary locations -->
60      <property name="jdks.home"  location="${user.home}/jdk"/>
61      <property name="jdk6.home"  location="${jdks.home}/jdk1.6.0"/>
62      <property name="jdk7.home"  location="${jdks.home}/jdk1.7.0"/>
63      <property name="jdk8.home"  location="${jdks.home}/jdk1.8.0"/>
64      <property name="javac6"     location="${jdk6.home}/bin/javac"/>
65      <property name="javac7"     location="${jdk7.home}/bin/javac"/>
66      <property name="javac8"     location="${jdk8.home}/bin/javac"/>
67      <property name="javadoc6"   location="${jdk6.home}/bin/javadoc"/>
68      <property name="javadoc7"   location="${jdk7.home}/bin/javadoc"/>
69      <property name="javadoc8"   location="${jdk8.home}/bin/javadoc"/>
70      <property name="bootdir6"   location="${jdk6.home}/jre/lib"/>
71      <property name="bootdir7"   location="${jdk7.home}/jre/lib"/>
72      <property name="bootdir8"   location="${jdk8.home}/jre/lib"/>
73      <property name="bootclasspath6"   value="${bootdir6}/resources.jar:${bootdir6}/rt.jar:${bootdir6}/jsse.jar:${bootdir6}/jce.jar:${bootdir6}/:${bootdir6}/charsets.jar"/>
74      <property name="bootclasspath7"   value="${bootdir7}/resources.jar:${bootdir7}/rt.jar:${bootdir7}/jsse.jar:${bootdir7}/jce.jar:${bootdir7}/:${bootdir7}/charsets.jar"/>
75      <property name="bootclasspath8"   value="${bootdir8}/resources.jar:${bootdir8}/rt.jar:${bootdir8}/jsse.jar:${bootdir8}/jce.jar:${bootdir8}/:${bootdir8}/charsets.jar"/>
76    
77    <!-- Source locations -->    <!-- Source locations -->
78    <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"/>  
79    <property name="test.src.dir"         location="${basedir}/src/test"/>    <property name="test.src.dir"         location="${basedir}/src/test"/>
80    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>    <property name="loops.src.dir"        location="${basedir}/src/loops"/>
81    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
82      <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
83    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
84    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
85      <property name="topsrc.dir"           location="${basedir}/src"/>
86      <property name="jdk7src.dir"          location="${topsrc.dir}/jdk7"/>
87      <property name="jsr166xsrc.dir"       location="${topsrc.dir}/jsr166x"/>
88      <property name="jsr166ysrc.dir"       location="${topsrc.dir}/jsr166y"/>
89      <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>
90      <property name="extra166ysrc.dir"     location="${topsrc.dir}/extra166y"/>
91      <property name="jdksrc.dir"           location="/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"/>
92    
93    <!-- Distribution locations -->    <!-- Distribution locations -->
94    <property name="dist.javadocs.dir"    location="${dist.dir}/docs"/>    <property name="dist.javadocs.dir"           location="${dist.dir}/docs"/>
95      <property name="dist.jdk7.docs.dir"          location="${dist.dir}/jsr166-jdk7docs"/>
96      <property name="dist.jsr166xjavadocs.dir"    location="${dist.dir}/jsr166xdocs"/>
97      <property name="dist.jsr166yjavadocs.dir"    location="${dist.dir}/jsr166ydocs"/>
98      <property name="dist.jsr166ejavadocs.dir"    location="${dist.dir}/jsr166edocs"/>
99      <property name="dist.extra166yjavadocs.dir"  location="${dist.dir}/extra166ydocs"/>
100    
101    <!-- Jar locations -->    <!-- Jar locations -->
102    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
103      <property name="jdk7product.jar"      location="${build.jdk7.lib.dir}/jsr166-jdk7.jar"/>
104      <property name="jsr166xproduct.jar"   location="${build.jsr166xlib.dir}/jsr166x.jar"/>
105      <property name="jsr166yproduct.jar"   location="${build.jsr166ylib.dir}/jsr166y.jar"/>
106      <property name="jsr166eproduct.jar"   location="${build.jsr166elib.dir}/jsr166e.jar"/>
107      <property name="extra166yproduct.jar" location="${build.extra166ylib.dir}/extra166y.jar"/>
108    <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"/>  
   <property name="sinjdoc.jar"          location="${lib.dir}/sinjdoc.jar"/>  
109    
110      <!-- Bootclasspath argument -->
111      <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
112    
113    <!-- Files excluded from dist-docs and emulation jar -->    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
114    <patternset id="unsafe.exclusion">    <property name="jdkapi5docs.url"      value="http://docs.oracle.com/javase/1.5.0/docs/api/"/>
115      <exclude name="java/util/Random.*"/>    <property name="jdkapi6docs.url"      value="http://docs.oracle.com/javase/6/docs/api/"/>
116      <exclude name="sun/misc/Unsafe.*"/>    <property name="jdkapi7docs.url"      value="http://docs.oracle.com/javase/7/docs/api/"/>
117    </patternset>  
118      <property name="jdkapi8docs.url"      value="http://download.java.net/jdk8/docs/api/"/>
119    <!-- Files excludes from emulation jar -->    <!-- The below does not yet exist as of 2012-11 -->
120    <patternset id="atomic.exclusion">    <!-- <property name="jdkapi8docs.url" value="http://docs.oracle.com/javase/8/docs/api/"/> -->
121      <exclude name="java/util/concurrent/atomic/AtomicBoolean*"/>    <property name="jdkapidocs.url"       value="${jdkapi7docs.url}"/>
122      <exclude name="java/util/concurrent/atomic/AtomicInteger*"/>  
123      <exclude name="java/util/concurrent/atomic/AtomicLong*"/>    <!-- Test classpath -->
124      <exclude name="java/util/concurrent/atomic/AtomicReference*"/>    <path id="test.classpath">
125      <exclude name="java/util/concurrent/locks/LockSupport*"/>      <pathelement location="${build.testcases.dir}"/>
126      <exclude name="java/util/concurrent/locks/ReentrantLock*"/>      <pathelement location="${junit.jar}"/>
127    </patternset>    </path>
128    
129      <!-- ALoops classpath -->
130      <path id="loops.classpath">
131        <pathelement location="${build.loops.dir}"/>
132      </path>
133    
134    
135    <!-- Main targets -->    <!-- Main targets -->
136    
137      <target name="dists"
138              depends="dist, jsr166xdist, jsr166ydist,jsr166edist,  extra166ydist"
139              description="Builds all public jars and docs"/>
140    
141    <target name="compile"    <target name="compile"
142            depends="init, configure-compiler, prepare-src"            depends="init, configure-compiler"
143            description="Compiles main sources to build folder">            description="Compiles main sources to build folder">
144    
     <property name="prepare.src.dir" value="${src.dir}"/>  
   
145      <mkdir dir="${build.classes.dir}"/>      <mkdir dir="${build.classes.dir}"/>
146    
147  <!--      <javac srcdir="${src.dir}"
     <echo>javac ${gjc.args}</echo>  
     <echo>bootclasspath=${compile.bootclasspath}</echo>  
 -->  
   
     <javac srcdir="${prepare.src.dir}"  
148            destdir="${build.classes.dir}"            destdir="${build.classes.dir}"
149              debug="${build.debug}"              debug="${build.debug}"
150         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
# Line 101  Line 152 
152             source="${build.sourcelevel}"             source="${build.sourcelevel}"
153               fork="true">               fork="true">
154    
155        <compilerarg    line="${gjc.args}"/>        <include name="**/*.java"/>
156        <bootclasspath refid="compile.bootclasspath"/>        <compilerarg value="-XDignore.symbol.file=true"/>
157    
158    <!--
159          <exclude name="java/lang/**"/>
160          <compilerarg line="${build.args}"/>
161          <compilerarg line="-Xlint -Xmaxwarns 1000"/>
162    -->
163    
164      </javac>      </javac>
165    
166    </target>    </target>
167    
168    
   <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)" />  
   
169    
170    <target name="checkstyle"    <target name="jar"
171            depends="filter-src"            depends="compile"
172            description="Reports on style errors in Java source (verbose, mostly chaff)">            description="Builds library jar from compiled sources">
173    
174      <taskdef resource="checkstyletask.properties"      <mkdir dir="${build.lib.dir}"/>
             classpath="${lib.dir}/checkstyle-all-2.4.jar"/>  
175    
176      <checkstyle>      <jar destfile="${product.jar}">
177        <formatter type="plain"/>  <!-- also available: type="xml" -->        <fileset dir="${build.classes.dir}"/>
178        <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>      </jar>
     </checkstyle>  
179    
180    </target>    </target>
181    
182    
   <target name="doccheck"  
           depends="filter-doccheck"  
           description="Reports on javadoc style errors">  
   
     <delete dir="${build.doccheck.dir}"/>  
     <mkdir dir="${build.doccheck.dir}"/>  
183    
184      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"    <target name="test"
185           docletpath="${lib.dir}/doccheck.jar"            depends="init, configure-tests, report-tests"
186              destdir="${build.doccheck.dir}">            description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
       <packageset dir="${build.filter.doccheck.dir}"/>  
     </javadoc>  
   
     <echo>DocCheck output is in ${build.doccheck.dir}</echo>  
187    
   </target>  
188    
189    
190    <target name="docs"    <target name="docs"
           depends="filter-src"  
191            description="Builds javadocs with custom tags to build folder">            description="Builds javadocs with custom tags to build folder">
192    
193      <delete dir="${build.javadocs.dir}"/>      <delete dir="${build.javadocs.dir}"/>
194      <mkdir dir="${build.javadocs.dir}"/>      <mkdir dir="${build.javadocs.dir}"/>
195    
196      <javadoc destdir="${build.javadocs.dir}"      <!-- the packagenames="none" hack below prevents scanning the -->
197                  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}"/>  
198    
199        <javadoc destdir="${build.javadocs.dir}"
200                 packagenames="none"
201                 link="${jdkapidocs.url}"
202                 overview="${src.dir}/intro.html"
203                 sourcepath="${src.dir}:${jdksrc.dir}"
204                 additionalparam="-XDignore.symbol.file=true" >
205          <fileset dir="${src.dir}" defaultexcludes="yes">
206            <include name="**/*.java"/>
207          </fileset>
208      </javadoc>      </javadoc>
209    
210    </target>    </target>
211    
212    
   <target name="sinjdocs"  
           depends="configure-tests"  
           description="Builds javadocs with custom tags to build folder">  
   
     <delete dir="${build.javadocs.dir}"/>  
     <mkdir dir="${build.javadocs.dir}"/>  
   
     <java classname="net.cscott.sinjdoc.Main" fork="true">  
   
       <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>  
   
       <classpath>  
         <pathelement location="${sinjdoc.jar}"/>  
         <path refid="test.classpath"/>  
       </classpath>  
   
       <!-- <arg value="-link"/>       <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> -->  
   
       <arg value="-d"/>          <arg value="${build.javadocs.dir}"/>  
       <arg value="-sourcepath"/> <arg value="${src.dir}"/>  
       <arg value="-overview"/>   <arg value="${src.dir}/intro.html"/>  
       <arg value="-source"/>     <arg value="1.5"/>  
       <arg value="-verbose"/>  
       <arg value="java.util"/>  
   
       <!--  
       <arg value="-help"/>  
       -->  
   
     </java>  
   
   </target>  
   
   
   <target name="strip"  
           depends="init, configure-compiler"  
           description="Strip generics from java source (not working yet)">  
   
     <mkdir dir="${build.stripped.dir}"/>  
   
     <!--  
      # javac -s doesn't reliably generate compilable code. It generates  
      # bridge methods (marked as "synthetic") that can have identical  
      # 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">  
   
       <compilerarg    line="${gjc.args} -s"/>  
       <bootclasspath refid="compile.bootclasspath"/>  
   
     </javac>  
   
   </target>  
   
213    
214    <target name="dist"    <target name="dist"
215            depends="init, dist-clean, dist-jar, dist-docs"            depends="init, dist-clean, dist-jar, dist-docs"
216            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
217    
218    
219    <target name="release"    <target name="release"
220            depends="dist"            depends="dist"
221            description="Puts entire CVS tree, plus distribution productions, in a jar">            description="Puts entire CVS tree, plus distribution productions, in a jar">
222    
 <!--  
     #keep build dir? - dl  
     <delete dir="${build.dir}"/>  
 -->  
223      <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>      <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
224    
225      <jar basedir="${basedir}" destfile="${release.jar}">      <jar basedir="${basedir}" destfile="${release.jar}">
226          <!-- <exclude name="build/**"/> -->
227        <exclude name="${release.jar}"/>        <exclude name="${release.jar}"/>
228        <exclude name="user.properties"/>        <exclude name="user.properties"/>
229        <exclude name="etc/notes/**"/>        <exclude name="etc/notes/**"/>
230        <exclude name="lib/gjc/2.1/**"/>        <exclude name="src/emulation/**"/>
231        <exclude name="**/SyntaxTest.java"/>        <exclude name="**/SyntaxTest.java"/>
232          <exclude name="**/SuperfluousAbstract.java"/>
233      </jar>      </jar>
234    
235    </target>    </target>
236    
237    
238    
239    <target name="clean"    <target name="clean"
240            description="Removes all build products">            description="Removes all build products">
241    
# Line 271  Line 246 
246    </target>    </target>
247    
248    
249    
250    <target name="dist-clean"    <target name="dist-clean"
251            description="Removes all build and distribution products">            description="Removes all build and distribution products">
252    
# Line 279  Line 255 
255    </target>    </target>
256    
257    
258    
259    <target name="dist-docs"    <target name="dist-docs"
           depends="filter-src"  
260            description="Builds javadocs without custom tags to dist folder">            description="Builds javadocs without custom tags to dist folder">
261    
262      <delete dir="${dist.javadocs.dir}"/>      <delete dir="${dist.javadocs.dir}"/>
263      <mkdir dir="${dist.javadocs.dir}"/>      <mkdir dir="${dist.javadocs.dir}"/>
264    
265      <javadoc destdir="${dist.javadocs.dir}"      <!-- the packagenames="none" hack below prevents scanning the -->
266                  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}"/>  
267    
268        <javadoc destdir="${dist.javadocs.dir}"
269                 packagenames="none"
270                 link="${jdkapidocs.url}"
271                 overview="${src.dir}/intro.html"
272                 sourcepath="${src.dir}:${jdksrc.dir}"
273                 additionalparam="-XDignore.symbol.file=true" >
274          <fileset dir="${src.dir}" defaultexcludes="yes">
275            <include name="**/*.java"/>
276          </fileset>
277      </javadoc>      </javadoc>
278    
279    </target>    </target>
# Line 307  Line 288 
288      <!-- Version is kept in a separate file -->      <!-- Version is kept in a separate file -->
289      <loadfile property="version" srcFile="version.properties"/>      <loadfile property="version" srcFile="version.properties"/>
290      <echo>Building JSR-166 version ${version}</echo>      <echo>Building JSR-166 version ${version}</echo>
291        <echo>java.home is ${java.home}</echo>
292    
293    </target>    </target>
294    
295    
296    <target name="init-jar">    <target name="dist-jar"
297              depends="clean, jar">
298    
299      <mkdir dir="${build.lib.dir}"/>      <copy file="${product.jar}" todir="${dist.dir}"/>
300    
301    </target>    </target>
302    
303    
304    <target name="native-jar"    <target name="compile-tests"
305            depends="compile"            depends="jar">
           unless="build.emulation.true">  
306    
307      <jar destfile="${product.jar}">      <mkdir dir="${build.testcases.dir}"/>
       <fileset dir="${build.classes.dir}"/>  
     </jar>  
308    
309    </target>      <javac srcdir="${tck.src.dir}"
310              destdir="${build.testcases.dir}"
311                debug="${build.debug}"
312           debuglevel="${build.debuglevel}"
313          deprecation="${build.deprecation}"
314               source="${build.sourcelevel}"
315                 fork="true">
316    
317          <compilerarg value="${bootclasspath.args}"/>
318          <compilerarg line="${build.args}"/>
319          <compilerarg value="-XDignore.symbol.file=true"/>
320    
321    <target name="compile-emulation"        <classpath refid="test.classpath"/>
322            depends="init, configure-compiler"  
323            if="build.emulation.true">      </javac>
324    
325        <javac srcdir="${test.src.dir}"
326              destdir="${build.testcases.dir}"
327                debug="${build.debug}"
328           debuglevel="${build.debuglevel}"
329          deprecation="${build.deprecation}"
330               source="${build.sourcelevel}"
331                 fork="true">
332    
333      <mkdir dir="${build.emulation.dir}"/>        <include name="jsr166/test/**"/>
334    
335      <javac srcdir="${emulation.src.dir}"        <compilerarg value="${bootclasspath.args}"/>
336            destdir="${build.emulation.dir}"        <compilerarg line="${build.args}"/>
337          <compilerarg value="-XDignore.symbol.file=true"/>
338    
339          <classpath refid="test.classpath"/>
340    
341        </javac>
342    
343    <!--
344        <javac srcdir="${jtreg.src.dir}"
345              destdir="${build.testcases.dir}"
346              debug="${build.debug}"              debug="${build.debug}"
347         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
348        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
349             source="${build.sourcelevel}"             source="${build.sourcelevel}"
350               fork="true">               fork="true">
351    
352        <compilerarg    line="${gjc.args}"/>        <compilerarg value="${bootclasspath.args}"/>
353        <bootclasspath refid="compile.bootclasspath"/>        <compilerarg line="${build.args}"/>
354          <compilerarg value="-XDignore.symbol.file=true"/>
355    
356          <classpath refid="test.classpath"/>
357    
358      </javac>      </javac>
359    -->
360    
361      </target>
362    
363    
364      <target name="run-tests"
365              depends="compile-tests">
366    
367        <!-- May be overridden by user.properties -->
368        <property name="testcase" value="*"/>
369    
370        <mkdir dir="${build.reports.dir}"/>
371    
372        <junit printsummary="true"
373                 showoutput="true"
374              errorProperty="junit.failed"
375            failureProperty="junit.failed"
376                        dir="${build.reports.dir}"
377                       fork="true">
378    
379          <jvmarg value="${bootclasspath.args}"/>
380          <jvmarg value="-server"/>
381          <jvmarg value="-showversion"/>
382    
383          <classpath refid="test.classpath"/>
384    
385          <formatter type="xml"/>
386    
387          <batchtest todir="${build.reports.dir}" unless="no.test.tck">
388            <fileset dir="${tck.src.dir}">
389              <include name="**/${testcase}Test.java"/>
390            </fileset>
391          </batchtest>
392    
393          <batchtest todir="${build.reports.dir}" if="do.test.old">
394            <fileset dir="${test.src.dir}">
395              <include name="jsr166/test/**/${testcase}Test.java"/>
396            </fileset>
397          </batchtest>
398    
399    <!--
400          <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
401            <fileset dir="${jtreg.src.dir}">
402              <include name="**/${testcase}Test.java"/>
403            </fileset>
404          </batchtest>
405    -->
406    
407        </junit>
408    
409    </target>    </target>
410    
411    
412    <target name="emulation-jar"    <target name="report-tests"
413            depends="compile-emulation"            depends="run-tests">
           if="build.emulation.true">  
414    
415        <!-- Sets junit.report.format to frames if redirection is present,
416             otherwise sets it to noframes. -->
417        <available property="junit.report.format"
418                      value="frames"
419                  classname="org.apache.xalan.lib.Redirect"
420        />
421        <property name="junit.report.format" value="noframes"/>
422    
423      <jar destfile="${product.jar}" duplicate="add">      <junitreport todir="${build.reports.dir}">
424        <fileset dir="${build.classes.dir}">        <fileset dir="${build.reports.dir}">
425          <patternset refid="atomic.exclusion"/>          <include name="TEST-*.xml"/>
         <patternset refid="unsafe.exclusion"/>  
426        </fileset>        </fileset>
427        <fileset dir="${build.emulation.dir}"/>        <report format="${junit.report.format}" todir="${build.reports.dir}"
428      </jar>        />
429        </junitreport>
430    
431        <fail message="Test Cases Failed" if="junit.failed"/>
432    
433    </target>    </target>
434    
435    
436    <target name="dist-jar"    <target name="configure-compiler">
           depends="clean, jar">  
437    
438      <copy file="${product.jar}" todir="${dist.dir}"/>      <property name="unchecked.option" value="-Xlint:unchecked"/>
439    
440        <condition property="warnunchecked.arg" value="${unchecked.option}">
441          <istrue value="${build.warnunchecked}"/>
442        </condition>
443    
444        <property name="warnunchecked.arg" value=""/>
445    
446    
447        <!-- Common options in javac invocations -->
448        <property name="build.args" value="${warnunchecked.arg}"/>
449    
450    </target>    </target>
451    
452    
453    <target name="compile-ant-filter"    <target name="configure-tests"
454            depends="init">         depends="configure-compiler">
455    
456        <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
457        <available property="junit.available"
458                   classname="junit.framework.Protectable"/>
459    
460        <!-- Xalan -->
461        <available property="xalan.available"
462                   classname="org.apache.xalan.Version"/>
463    
     <mkdir dir="${build.ant.dir}"/>  
464    
465      <javac srcdir="${ant.src.dir}"      <!-- Ant 1.6beta and later don't need or want this check -->
466            destdir="${build.ant.dir}"      <!--
467             source="1.4"      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
468      />            unless="junit.available"/>
469    
470        <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
471              unless="xalan.available"/>
472        -->
473    
474    </target>    </target>
475    
476    
477    <target name="filter-src"    <!-- Various demos and test programs -->
           depends="compile-ant-filter">  
478    
     <mkdir dir="${build.filter.src.dir}"/>  
479    
480      <copy todir="${build.filter.src.dir}">    <target name="loops" depends="init, configure-compiler"
481        <fileset dir="${src.dir}">            description="Benchmark from Doug Lea's AQS paper">
         <include name="**/*.html"/>  
       </fileset>  
     </copy>  
482    
483      <copy todir="${build.filter.src.dir}">      <mkdir dir="${build.loops.dir}"/>
484        <fileset dir="${src.dir}">  
485          <exclude name="**/*.html"/>      <javac srcdir="${loops.src.dir}"
486          <patternset refid="unsafe.exclusion"/>            destdir="${build.loops.dir}"
487        </fileset>              debug="${build.debug}"
488        <filterchain>         debuglevel="${build.debuglevel}"
489          deprecation="${build.deprecation}"
490               source="${build.sourcelevel}"
491                 fork="true">
492    
493          <compilerarg line="${build.args}"/>
494          <classpath refid="loops.classpath"/>
495          <compilerarg value="-XDignore.symbol.file=true"/>
496    
497        </javac>
498    
499        <java classname="ALoops" fork="true">
500          <classpath refid="loops.classpath"/>
501        </java>
502    
503      </target>
504    
         <!--  
          # 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.)  
          -->  
505    
506          <filterreader classname="jsr166.ant.filters.ReplaceFilter"    <!-- jdk7 -->
                       classpath="${build.ant.dir}">  
           <param name="notmatching" value="^\s+\*\s.*$"/>  
           <param name="pattern"     value="&lt;[^|>()]+?>+"/>  
           <param name="replacement" value=" "/>  
         </filterreader>  
507    
508    
509          <!--    <target name="jdk7compile"
510           # This filter uncomments lines beginning with "//@" so that            depends="configure-compiler"
511           # javadoc can see imports that are needed to resolve links            description="Compiles src/jdk7 sources">
512           # but that shouldn't be in the compiled code.  
513           -->      <mkdir dir="${build.jdk7.classes.dir}"/>
514    
515          <filterreader classname="jsr166.ant.filters.ReplaceFilter"      <javac srcdir="${jdk7src.dir}"
516                        classpath="${build.ant.dir}">             destdir="${build.jdk7.classes.dir}"
517            <param name="matching"    value="^//@.*$"/>             debug="${build.debug}"
518            <param name="pattern"     value="^//@"/>             debuglevel="${build.debuglevel}"
519            <param name="replacement" value=""/>             deprecation="${build.deprecation}"
520          </filterreader>             source="1.6"
521        </filterchain>             classpath=""
522      </copy>             bootclasspath="${bootclasspath6}"
523               includeAntRuntime="false"
524               includeJavaRuntime="false"
525               executable="${javac6}"
526               fork="true">
527    
528          <include name="**/*.java"/>
529          <compilerarg line="${build.args}"/>
530          <compilerarg value="-XDignore.symbol.file=true"/>
531          <compilerarg value="-Xlint:all"/>
532    
533        </javac>
534    
535    </target>    </target>
536    
537    
538    
539      <target name="jdk7jar"
540              depends="jdk7compile"
541              description="Builds library jar from compiled sources">
542    
543        <mkdir dir="${build.jdk7.lib.dir}"/>
544    
545    <target name="filter-doccheck"      <jar destfile="${jdk7product.jar}" index="true">
546            depends="filter-src">        <fileset dir="${build.jdk7.classes.dir}"/>
547        </jar>
548    
549      </target>
550    
551    
552    
553      <target name="jdk7docs"
554              description="Builds javadocs with custom tags to build folder">
555    
556      <mkdir dir="${build.filter.doccheck.dir}"/>      <delete dir="${build.jdk7.docs.dir}"/>
557        <mkdir dir="${build.jdk7.docs.dir}"/>
558    
559      <copy todir="${build.filter.doccheck.dir}">      <javadoc destdir="${build.jdk7.docs.dir}"
560        <fileset dir="${build.filter.src.dir}">               packagenames="none"
561          <include name="**/*.html"/>               link="${jdkapi7docs.url}"
562                 overview="${jdk7src.dir}/intro.html"
563                 sourcepath="${jdk7src.dir}"
564                 bootclasspath="${bootclasspath6}"
565                 classpath=""
566                 source="1.6"
567                 executable="${javadoc7}"
568                 additionalparam="-XDignore.symbol.file=true" >
569          <fileset dir="${jdk7src.dir}" defaultexcludes="yes">
570            <include name="**/*.java"/>
571        </fileset>        </fileset>
572      </copy>      </javadoc>
573    
574      </target>
575    
576    
577      <target name="jdk7dist"
578              depends="jdk7dist-clean, jdk7dist-jar, jdk7dist-docs"
579              description="Puts all distributable products in single hierarchy"/>
580    
     <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 {}"  
     />  
581    
582      <copy todir="${build.filter.doccheck.dir}">  
583        <fileset dir="${build.filter.src.dir}">    <target name="jdk7clean"
584          <exclude name="**/*.html"/>            description="Removes all build products">
585    
586        <delete dir="${build.jdk7.dir}"/>
587    
588      </target>
589    
590    
591    
592      <target name="jdk7dist-clean"
593              description="Removes all build and distribution products">
594    
595      </target>
596    
597      <target name="jdk7dist-docs"
598              description="Builds javadocs without custom tags to dist folder">
599    
600        <delete dir="${dist.jdk7.docs.dir}"/>
601        <mkdir dir="${dist.jdk7.docs.dir}"/>
602    
603        <javadoc destdir="${dist.jdk7.docs.dir}"
604                 packagenames="none"
605                 link="${jdkapi7docs.url}"
606                 overview="${jdk7src.dir}/intro.html"
607                 sourcepath="${jdk7src.dir}"
608                 classpath=""
609                 executable="${javadoc7}"
610                 bootclasspath="${bootclasspath6}"
611                 source="1.6">
612          <arg value="-XDignore.symbol.file=true"/>
613          <fileset dir="${jdk7src.dir}" defaultexcludes="yes">
614            <include name="**/*.java"/>
615        </fileset>        </fileset>
616        <filterchain>      </javadoc>
617          <!--  
618           # These two filters try to make the source look like    </target>
          # 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>  
619    
620        </filterchain>    <target name="jdk7dist-jar"
621      </copy>            depends="jdk7clean, jdk7jar">
622    
623        <copy file="${jdk7product.jar}" todir="${dist.dir}"/>
624    
625    </target>    </target>
626    
627      <!-- jsr166x -->
628    
   <target name="compile-tests"  
           depends="jar">  
629    
630      <mkdir dir="${build.testcases.dir}"/>    <target name="jsr166xcompile"
631              depends="init, configure-compiler"
632              description="Compiles jsr166x sources">
633    
634  <!--      <mkdir dir="${build.jsr166x.dir}"/>
     <echo>javac ${gjc.args}</echo>  
     <echo>bootclasspath=${test.compile.bootclasspath}</echo>  
     <echo>classpath="${test.classpath}"</echo>  
 -->  
635    
636      <javac srcdir="${test.src.dir}"      <javac srcdir="${jsr166xsrc.dir}"
637            destdir="${build.testcases.dir}"            destdir="${build.jsr166x.dir}"
638              debug="${build.debug}"              debug="${build.debug}"
639         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
640        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
641             source="${build.sourcelevel}"             source="${build.sourcelevel}"
642               fork="true">               fork="true">
643    
644        <compilerarg    line="${gjc.args}"/>        <include name="**/*.java"/>
645        <bootclasspath refid="test.compile.bootclasspath"/>        <compilerarg line="${build.args}"/>
646        <classpath     refid="test.classpath"/>        <compilerarg value="-XDignore.symbol.file=true"/>
647    
648      </javac>      </javac>
649    
650    </target>    </target>
651    
652    
   <target name="run-tests"  
           depends="compile-tests">  
653    
654      <!-- May be overridden by user.properties -->    <target name="jsr166xjar"
655      <property name="testcase" value="*"/>            depends="jsr166xcompile"
656              description="Builds library jar from compiled sources">
657    
658      <mkdir dir="${build.reports.dir}"/>      <mkdir dir="${build.jsr166xlib.dir}"/>
659    
660      <junit printsummary="true"      <jar destfile="${jsr166xproduct.jar}">
661               showoutput="true"        <fileset dir="${build.jsr166x.dir}"/>
662            errorProperty="junit.failed"      </jar>
         failureProperty="junit.failed"  
                     dir="${build.reports.dir}"  
                    fork="true">  
663    
664        <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>    </target>
665    
       <formatter type="xml"/>  
666    
       <batchtest todir="${build.reports.dir}">  
         <fileset dir="${test.src.dir}">  
           <include name="**/${testcase}Test.java"/>  
         </fileset>  
       </batchtest>  
667    
668      </junit>    <target name="jsr166xdocs"
669              description="Builds javadocs with custom tags to build folder">
670    
671        <delete dir="${build.jsr166xjavadocs.dir}"/>
672        <mkdir dir="${build.jsr166xjavadocs.dir}"/>
673    
674        <javadoc destdir="${build.jsr166xjavadocs.dir}"
675                 packagenames="jsr166x"
676                 link="${jdkapidocs.url}"
677                 source="${build.sourcelevel}"
678                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
679                 additionalparam="-XDignore.symbol.file=true" />
680    
681    </target>    </target>
682    
683    
684    <target name="report-tests"    <target name="jsr166xdist"
685            depends="run-tests">            depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs"
686              description="Puts all distributable products in single hierarchy"/>
687    
     <!-- Sets junit.report.format to frames if Xalan is present,  
          otherwise sets it to noframes. -->  
     <available property="junit.report.format"  
                   value="frames"  
               classname="org.apache.xalan.lib.Redirect"  
     />  
     <property name="junit.report.format" value="noframes"/>  
688    
     <junitreport todir="${build.reports.dir}">  
       <fileset dir="${build.reports.dir}">  
         <include name="TEST-*.xml"/>  
       </fileset>  
       <report styledir="${stylesheet.dir}"  
                 format="${junit.report.format}"  
                  todir="${build.reports.dir}"  
       />  
     </junitreport>  
689    
690      <fail message="Test Cases Failed" if="junit.failed"/>    <target name="jsr166xclean"
691              description="Removes all build products">
692    
693        <delete dir="${build.jsr166x.dir}"/>
694        <delete dir="${build.jsr166xlib.dir}"/>
695    
696    </target>    </target>
697    
698    
   <target name="configure-compiler">  
699    
700      <property name="gjc.version"    <target name="jsr166xdist-clean"
701               value="2.2"/>            description="Removes all build and distribution products">
702    
703      <condition property="novariance.arg" value="-novariance">    </target>
       <and>  
         <equals arg1="${gjc.version}" arg2="2.0"/>  
         <or>  
           <not><isset property="gjc.novariance"/></not>  
           <istrue value="${gjc.novariance}"/>  
         </or>  
       </and>  
     </condition>  
704    
     <property name="novariance.arg"  
              value=""/>  
705    
     <property name="gjc.dir"  
              value="${lib.dir}/gjc"/>  
706    
707      <property name="javac.jar"    <target name="jsr166xdist-docs"
708            location="${gjc.dir}/${gjc.version}/javac.jar"/>            description="Builds javadocs without custom tags to dist folder">
709    
710      <property name="collect.jar"      <delete dir="${dist.jsr166xjavadocs.dir}"/>
711            location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/>      <mkdir dir="${dist.jsr166xjavadocs.dir}"/>
712    
713        <javadoc destdir="${dist.jsr166xjavadocs.dir}"
714                 packagenames="jsr166x"
715                 link="${jdkapidocs.url}"
716                 source="${build.sourcelevel}"
717                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
718                 additionalparam="-XDignore.symbol.file=true" />
719    
720      <condition property="warnunchecked.arg" value="-warnunchecked">    </target>
       <istrue value="${gjc.warnunchecked}"/>  
     </condition>  
721    
722      <property name="warnunchecked.arg" value=""/>    <target name="jsr166xdist-jar"
723              depends="jsr166xclean, jsr166xjar">
724    
725      <condition property="prepare.src.dir" value="${build.dir}/prepare-src">      <copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/>
726        <istrue value="${build.nothreads}"/>  
727      </condition>    </target>
728    
729      <!-- jsr166y -->
730    
     <!--  
      ! Bootclasspath munging for source compilation.  
      -->  
731    
732      <path id="pre.bootclasspath">    <target name="jsr166ycompile"
733        <pathelement location="${javac.jar}"/>            depends="init, configure-compiler"
734      </path>            description="Compiles jsr166y sources">
   
     <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"/>  
735    
736        <mkdir dir="${build.jsr166y.dir}"/>
737    
738      <!-- Common options in javac invocations -->      <javac srcdir="${jsr166ysrc.dir}"
739      <property name="gjc.args"            destdir="${build.jsr166y.dir}"
740               value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}"              debug="${build.debug}"
741      />         debuglevel="${build.debuglevel}"
742          deprecation="${build.deprecation}"
743               source="${build.sourcelevel}"
744                 fork="true">
745    
746          <include name="**/*.java"/>
747          <compilerarg line="${build.args}"/>
748          <compilerarg value="-XDignore.symbol.file=true"/>
749          <compilerarg value="${bootclasspath.args}"/>
750    
751    <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
752    
753        </javac>
754    
755    </target>    </target>
756    
757    
   <target name="prepare-src"  
           depends="configure-compiler"  
           if="prepare.src.dir">  
758    
759      <mkdir dir="${prepare.src.dir}"/>    <target name="jsr166yjar"
760      <copy todir="${prepare.src.dir}">            depends="jsr166ycompile"
761        <fileset dir="${src.dir}">            description="Builds library jar from compiled sources">
762          <exclude name="java/lang/**"/>  
763        </fileset>      <mkdir dir="${build.jsr166ylib.dir}"/>
764      </copy>  
765        <jar destfile="${jsr166yproduct.jar}" index="true">
766          <fileset dir="${build.jsr166y.dir}"/>
767        </jar>
768    
769    </target>    </target>
770    
771    
   <target name="configure-emulation">  
772    
773      <condition property="build.emulation.true">    <target name="jsr166ydocs"
774        <or>            description="Builds javadocs with custom tags to build folder">
775          <and>  
776            <os family="windows"/>      <delete dir="${build.jsr166yjavadocs.dir}"/>
777            <not>      <mkdir dir="${build.jsr166yjavadocs.dir}"/>
778              <isset property="build.emulation"/>  
779            </not>      <javadoc destdir="${build.jsr166yjavadocs.dir}"
780          </and>               packagenames="jsr166y"
781          <istrue value="${build.emulation}"/>               link="${jdkapidocs.url}"
782        </or>               source="${build.sourcelevel}"
783      </condition>               sourcepath="${topsrc.dir}:${jdksrc.dir}"
784                 additionalparam="-XDignore.symbol.file=true" />
785    
786    </target>    </target>
787    
788    
789    <target name="configure-tests"    <target name="jsr166ydist"
790         depends="configure-compiler">            depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs"
791              description="Puts all distributable products in single hierarchy"/>
792    
     <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->  
     <available property="junit.available"  
                classname="junit.framework.Protectable"/>  
793    
     <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"  
           unless="junit.available"/>  
794    
795      <target name="jsr166yclean"
796              description="Removes all build products">
797    
798      <!--      <delete dir="${build.jsr166y.dir}"/>
799       ! Bootclasspath munging for testing, so JUnit can test our local      <delete dir="${build.jsr166ylib.dir}"/>
      ! modifications to java.*.  
      -->  
800    
801      <path id="test.classpath">    </target>
       <pathelement location="${product.jar}"/>  
       <pathelement location="${build.testcases.dir}"/>  
       <pathelement location="${junit.jar}"/>  
     </path>  
802    
     <path id="test.compile.bootclasspath">  
       <pathelement location="${javac.jar}"/>  
       <pathelement location="${collect.jar}"/>  
       <pathelement location="${rt.jar}"/>  
     </path>  
803    
     <path id="test.run.bootclasspath">  
       <pathelement location="${javac.jar}"/>  
       <path refid="test.classpath"/>  
     </path>  
804    
805      <!-- Flatten test classpaths into platform-appropriate strings -->    <target name="jsr166ydist-clean"
806      <property name="test.classpath"             refid="test.classpath"/>            description="Removes all build and distribution products">
     <property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/>  
     <property name="test.run.bootclasspath"     refid="test.run.bootclasspath"/>  
807    
808    </target>    </target>
809    
810      <target name="jsr166ydist-docs"
811              description="Builds javadocs without custom tags to dist folder">
812    
813        <delete dir="${dist.jsr166yjavadocs.dir}"/>
814        <mkdir dir="${dist.jsr166yjavadocs.dir}"/>
815    
816        <javadoc destdir="${dist.jsr166yjavadocs.dir}"
817                 packagenames="jsr166y"
818                 link="${jdkapidocs.url}"
819                 source="${build.sourcelevel}"
820                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
821                 additionalparam="-XDignore.symbol.file=true" />
822    
823      </target>
824    
825      <target name="jsr166ydist-jar"
826              depends="jsr166yclean, jsr166yjar">
827    
828        <copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/>
829    
830      </target>
831    
832    
833      <!-- extra166y -->
834    
835    
836      <target name="extra166ycompile"
837              depends="init, configure-compiler, jsr166ycompile"
838              description="Compiles extra166y sources">
839    
840        <mkdir dir="${build.extra166y.dir}"/>
841    
842        <javac srcdir="${extra166ysrc.dir}"
843              destdir="${build.extra166y.dir}"
844                debug="${build.debug}"
845                classpath="${jsr166yproduct.jar}"
846           debuglevel="${build.debuglevel}"
847          deprecation="${build.deprecation}"
848               source="${build.sourcelevel}"
849                 fork="true">
850    
851          <include name="**/*.java"/>
852          <compilerarg line="${build.args}"/>
853          <compilerarg value="-XDignore.symbol.file=true"/>
854          <compilerarg value="${bootclasspath.args}"/>
855    
856    <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
857    
858    <!-- Anthill targets -->      </javac>
859    
860    <target name="anthill-build"    </target>
           depends="jar, test, docs, dist-docs"/>  
861    
   <target name="anthill-publish">  
862    
     <copy todir="${deployDir}/docs/private">  
       <fileset dir="${build.javadocs.dir}"/>  
     </copy>  
863    
864      <copy todir="${deployDir}/docs/public">    <target name="extra166yjar"
865        <fileset dir="${dist.javadocs.dir}"/>            depends="extra166ycompile"
866      </copy>            description="Builds library jar from compiled sources">
867    
868      <copy tofile="${deployDir}/index.html"      <mkdir dir="${build.extra166ylib.dir}"/>
           file="${basedir}/etc/anthill-index.html"/>  
869    
870      <copy todir="${deployDir}/notes">      <jar destfile="${extra166yproduct.jar}" index="true">
871        <fileset dir="${basedir}/etc/notes"/>        <fileset dir="${build.extra166y.dir}"/>
872      </copy>      </jar>
873    
874    </target>    </target>
875    
876    
   <target name="ng" depends="test">  
     <java classname="SuperfluousAbstract" fork="true">  
877    
878        <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>    <target name="extra166ydocs"
879              description="Builds javadocs with custom tags to build folder">
880    
881        <delete dir="${build.extra166yjavadocs.dir}"/>
882        <mkdir dir="${build.extra166yjavadocs.dir}"/>
883    
884        <javadoc destdir="${build.extra166yjavadocs.dir}"
885                 packagenames="extra166y"
886                 link="${jdkapidocs.url}"
887                 source="${build.sourcelevel}"
888                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
889                 additionalparam="-XDignore.symbol.file=true" />
890    
     </java>  
891    </target>    </target>
892    
893    
894      <target name="extra166ydist"
895              depends="extra166ydist-clean, extra166ydist-jar, extra166ydist-docs"
896              description="Puts all distributable products in single hierarchy"/>
897    
898    
899    
900      <target name="extra166yclean"
901              description="Removes all build products">
902    
903        <delete dir="${build.extra166y.dir}"/>
904        <delete dir="${build.extra166ylib.dir}"/>
905    
906      </target>
907    
908    
909    
910      <target name="extra166ydist-clean"
911              description="Removes all build and distribution products">
912    
913      </target>
914    
915      <target name="extra166ydist-docs"
916              description="Builds javadocs without custom tags to dist folder">
917    
918        <delete dir="${dist.extra166yjavadocs.dir}"/>
919        <mkdir dir="${dist.extra166yjavadocs.dir}"/>
920    
921        <javadoc destdir="${dist.extra166yjavadocs.dir}"
922                 packagenames="extra166y"
923                 link="${jdkapidocs.url}"
924                 source="${build.sourcelevel}"
925                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
926                 additionalparam="-XDignore.symbol.file=true" />
927    
928      </target>
929    
930      <target name="extra166ydist-jar"
931              depends="extra166yclean, extra166yjar">
932    
933        <copy file="${extra166yproduct.jar}" todir="${dist.dir}"/>
934    
935      </target>
936    
937      <!-- jsr166e -->
938    
939    
940      <target name="jsr166ecompile"
941              depends="init, configure-compiler"
942              description="Compiles jsr166e sources">
943    
944        <mkdir dir="${build.jsr166e.dir}"/>
945    
946        <javac srcdir="${jsr166esrc.dir}"
947              destdir="${build.jsr166e.dir}"
948                debug="${build.debug}"
949           debuglevel="${build.debuglevel}"
950          deprecation="${build.deprecation}"
951               source="1.7"
952                 fork="true">
953    
954          <include name="**/*.java"/>
955          <compilerarg line="${build.args}"/>
956          <compilerarg value="-XDignore.symbol.file=true"/>
957          <compilerarg value="${bootclasspath.args}"/>
958    
959    <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
960    
961        </javac>
962    
963      </target>
964    
965    
966    
967      <target name="jsr166ejar"
968              depends="jsr166ecompile"
969              description="Builds library jar from compiled sources">
970    
971        <mkdir dir="${build.jsr166elib.dir}"/>
972    
973        <jar destfile="${jsr166eproduct.jar}" index="true">
974          <fileset dir="${build.jsr166e.dir}"/>
975        </jar>
976    
977      </target>
978    
979    
980    
981      <target name="jsr166edocs"
982              description="Builds javadocs with custom tags to build folder">
983    
984        <delete dir="${build.jsr166ejavadocs.dir}"/>
985        <mkdir dir="${build.jsr166ejavadocs.dir}"/>
986    
987        <javadoc destdir="${build.jsr166ejavadocs.dir}"
988                 packagenames="jsr166e,jsr166e.extra"
989                 link="${jdkapidocs.url}"
990                 source="1.7"
991                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
992                 additionalparam="-XDignore.symbol.file=true" />
993    
994      </target>
995    
996    
997      <target name="jsr166edist"
998              depends="jsr166edist-clean, jsr166edist-jar, jsr166edist-docs"
999              description="Puts all distributable products in single hierarchy"/>
1000    
1001    
1002    
1003      <target name="jsr166eclean"
1004              description="Removes all build products">
1005    
1006        <delete dir="${build.jsr166e.dir}"/>
1007        <delete dir="${build.jsr166elib.dir}"/>
1008    
1009      </target>
1010    
1011    
1012    
1013      <target name="jsr166edist-clean"
1014              description="Removes all build and distribution products">
1015    
1016      </target>
1017    
1018      <target name="jsr166edist-docs"
1019              description="Builds javadocs without custom tags to dist folder">
1020    
1021        <delete dir="${dist.jsr166ejavadocs.dir}"/>
1022        <mkdir dir="${dist.jsr166ejavadocs.dir}"/>
1023    
1024        <javadoc destdir="${dist.jsr166ejavadocs.dir}"
1025                 packagenames="jsr166e,jsr166e.extra"
1026                 link="${jdkapidocs.url}"
1027                 source="1.7"
1028                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
1029                 additionalparam="-XDignore.symbol.file=true" />
1030    
1031      </target>
1032    
1033      <target name="jsr166edist-jar"
1034              depends="jsr166eclean, jsr166ejar">
1035    
1036        <copy file="${jsr166eproduct.jar}" todir="${dist.dir}"/>
1037    
1038      </target>
1039    
1040  </project>  </project>

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.92

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