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

Diff of /jsr166/build.xml

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

revision 1.14, Thu Dec 12 20:23:16 2002 UTC revision 1.36, Thu May 29 17:29:08 2003 UTC
# Line 1  Line 1 
1  <project name="jsr166" default="jar">  <project name="jsr166" default="usage">
2    
3    <description>    <description>
4    ------------------------------------------------------------------------------
5      Build file for JSR-166      Build file for JSR-166
6    
7      Note that junit.jar must be in ${ant.home}/lib for the    Usage: ant [target]
     test target to work. [FIXME: This should be automatically  
     enforced by this build file by failing with a message if  
     junit.jar is not in the right place.]  
8    
9      User-specific settings are read from user.properties.
10      See user.properties.sample for an explanation of some useful settings.
11    ------------------------------------------------------------------------------
12    </description>    </description>
13    
14      <target name="usage" description="Advises user to run with -projecthelp">
15        <echo>Run "ant -projecthelp" for full usage information.</echo>
16      </target>
17    
18    
19      <!-- User-specific settings -->
20      <property file="user.properties"/>
21    
22    
23    <!-- Compilation options -->    <!-- Compilation options -->
24    <property name="build.sourcelevel"    value="1.5"/>    <property name="build.sourcelevel"    value="1.5"/>
25      <property name="build.docsourcelevel" value="1.4"/>
26    <property name="build.debug"          value="true"/>    <property name="build.debug"          value="true"/>
27    <property name="build.debuglevel"     value="source,lines,vars"/>    <property name="build.debuglevel"     value="source,lines,vars"/>
28    <property name="build.deprecation"    value="false"/>    <property name="build.deprecation"    value="false"/>
   <!--  
   <property name="build.warnings"       value="true"/>  
   -->  
29    
30    <!-- Build locations -->    <!-- Build locations -->
31    <property name="build.dir"            location="build"/>    <property name="build.dir"            location="build"/>
32    <property name="build.classes.dir"    location="${build.dir}/classes"/>    <property name="build.classes.dir"    location="${build.dir}/classes"/>
33      <property name="build.emulation.dir"  location="${build.dir}/emulation"/>
34    <property name="build.testcases.dir"  location="${build.dir}/testcases"/>    <property name="build.testcases.dir"  location="${build.dir}/testcases"/>
35    <property name="build.lib.dir"        location="${build.dir}/lib"/>    <property name="build.lib.dir"        location="${build.dir}/lib"/>
36    <property name="build.ant.dir"        location="${build.dir}/ant"/>    <property name="build.ant.dir"        location="${build.dir}/ant"/>
37    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>
38      <property name="build.stripped.dir"   location="${build.dir}/stripped"/>
39    <property name="build.reports.dir"    location="${build.dir}/reports"/>    <property name="build.reports.dir"    location="${build.dir}/reports"/>
40      <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>
41    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
42    
43    <!-- Source locations -->    <!-- Source locations -->
44    <property name="src.dir"              location="${basedir}"/>    <property name="src.dir"              location="${basedir}/src/main"/>
45    <property name="test.src.dir"         location="${basedir}/etc/testcases"/>    <property name="emulation.src.dir"    location="${basedir}/src/emulation"/>
46      <property name="test.src.dir"         location="${basedir}/src/test"/>
47    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>
48    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>
49    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
# Line 43  Line 54 
54    
55    <!-- Jar locations -->    <!-- Jar locations -->
56    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
   <property name="javac.jar"            location="${lib.dir}/javac.jar"/>  
   <property name="collect.jar"          location="${lib.dir}/collect.jar"/>  
57    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
58    <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>    <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>
59    
   <property name="javac.args"           value='-J-Xbootclasspath/p:${javac.jar}'/>  
60    
   <path id="javac.bootclasspath">  
     <pathelement location="${collect.jar}"/>  
     <pathelement location="${rt.jar}"/>  
   </path>  
61    
62    <path id="test.classpath">    <!-- Files excluded from emulation and dist-docs -->
63      <pathelement location="${product.jar}"/>    <patternset id="emulation.excludes">
64    </path>      <exclude name="java/util/Random.*"/>
65        <exclude name="sun/misc/Unsafe.*"/>
66      </patternset>
67    
68    
69    
70    <!-- Main targets -->    <!-- Main targets -->
71    
72    <target name="compile" depends="init"    <target name="compile"
73            description="Compiles all sources to build folder">            depends="init, configure-compiler, prepare-src"
74              description="Compiles main sources to build folder">
75    
76        <property name="prepare.src.dir" value="${src.dir}"/>
77    
78      <mkdir dir="${build.classes.dir}"/>      <mkdir dir="${build.classes.dir}"/>
79      <javac srcdir="${src.dir}"  
80        <javac srcdir="${prepare.src.dir}"
81            destdir="${build.classes.dir}"            destdir="${build.classes.dir}"
82              debug="${build.debug}"              debug="${build.debug}"
83         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
# Line 74  Line 86 
86               fork="true">               fork="true">
87    
88        <bootclasspath refid="javac.bootclasspath"/>        <bootclasspath refid="javac.bootclasspath"/>
89        <compilerarg line="${javac.args} ${build.warnings.option}"/>        <compilerarg line="${build.javac.args}"/>
   
       <!-- need this because srcdir is basedir! -->  
       <include name="java/**/*.java"/>  
90    
91      </javac>      </javac>
92    
93    </target>    </target>
94    
95    
96    <target name="jar" depends="compile"    <target name="jar"
97            description="Builds library jar from compiled sources">            depends="configure-emulation, init-jar, native-jar, emulation-jar"
98      <mkdir dir="${build.lib.dir}"/>            description="Builds library jar from compiled sources"/>
99      <jar basedir="${build.classes.dir}"  
100          destfile="${product.jar}"  
101      />    <target name="test"
102              depends="init, configure-tests, report-tests"
103              description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
104    
105    
106      <target name="checkstyle"
107              depends="filter-src"
108              description="Reports on style errors in Java source (verbose, mostly chaff)">
109    
110        <taskdef resource="checkstyletask.properties"
111                classpath="${lib.dir}/checkstyle-all-2.4.jar"/>
112    
113        <checkstyle>
114          <formatter type="plain"/>  <!-- also available: type="xml" -->
115          <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
116        </checkstyle>
117    
118    </target>    </target>
119    
120    
121    <target name="test" depends="init, report-tests"    <target name="doccheck"
122            description="Runs all tests"/>            depends="filter-src"
123              description="Reports on javadoc style errors (not working yet)">
124    
125        <delete dir="${build.doccheck.dir}"/>
126        <mkdir dir="${build.doccheck.dir}"/>
127    
128        <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
129             docletpath="${lib.dir}/doccheck.jar"
130                destdir="${build.doccheck.dir}">
131          <packageset dir="${build.filter.src.dir}"/>
132        </javadoc>
133    
134      </target>
135    
136    
137    <target name="docs" depends="init, clean-filtered-src, filter-src"    <target name="docs"
138              depends="filter-src"
139            description="Builds javadocs with custom tags to build folder">            description="Builds javadocs with custom tags to build folder">
140    
141      <delete dir="${build.javadocs.dir}"/>      <delete dir="${build.javadocs.dir}"/>
142      <mkdir dir="${build.javadocs.dir}"/>      <mkdir dir="${build.javadocs.dir}"/>
143    
144      <javadoc destdir="${build.javadocs.dir}"      <javadoc destdir="${build.javadocs.dir}"
145                  link="http://java.sun.com/j2se/1.4.1/docs/api"                  link="http://java.sun.com/j2se/1.4.1/docs/api"
146              overview="${src.dir}/intro.html"              overview="${src.dir}/intro.html"
147                source="${build.sourcelevel}">                source="${build.docsourcelevel}">
148    
149        <tag name="revised" description="Last revised:"/>        <tag name="revised" description="Last revised:"/>
150        <tag name="spec" description="Specified by:"/>        <tag name="spec" description="Specified by:"/>
151        <tag name="editor" description="Last edited by:"/>        <tag name="editor" description="Last edited by:"/>
152        <tag name="fixme" description="FIX ME:"/>        <tag name="fixme" description="FIX ME:"/>
153        <packageset dir="${build.filter.src.dir}">  
154          <include name="java/**"/>        <packageset dir="${build.filter.src.dir}"/>
       </packageset>  
155    
156      </javadoc>      </javadoc>
157    
158      </target>
159    
160    
161      <target name="strip"
162              depends="init, configure-compiler"
163              description="Strip generics from java source (not working yet)">
164    
165        <mkdir dir="${build.stripped.dir}"/>
166    
167        <!--
168         # javac -s doesn't reliably generate compilable code. It generates
169         # bridge methods (marked as "synthetic") that can have identical
170         # signatures to existing methods except for the return value.
171         -->
172        <javac srcdir="${src.dir}"
173              destdir="${build.stripped.dir}"
174                debug="${build.debug}"
175           debuglevel="${build.debuglevel}"
176          deprecation="${build.deprecation}"
177               source="${build.sourcelevel}"
178                 fork="true">
179    
180          <bootclasspath refid="javac.bootclasspath"/>
181          <compilerarg line="${build.javac.args} -s"/>
182    
183        </javac>
184    
185    </target>    </target>
186    
187    
188    <target name="dist" depends="init, dist-clean, dist-jar, dist-docs"/>    <target name="dist"
189              depends="init, dist-clean, dist-jar, dist-docs"
190              description="Puts all distributable products in single hierarchy"/>
191    
192    
193    <target name="clean"    <target name="clean"
194            description="Removes all build products">            description="Removes all build products">
195    
196      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
197      <delete dir="${build.classes.dir}"/>      <delete dir="${build.classes.dir}"/>
198      <delete dir="${build.lib.dir}"/>      <delete dir="${build.lib.dir}"/>
199    
200    </target>    </target>
201    
202    
203    <target name="dist-clean"    <target name="dist-clean"
204            description="Removes all build and distribution products">            description="Removes all build and distribution products">
205    
206      <delete dir="${dist.dir}"/>      <delete dir="${dist.dir}"/>
207    
208    </target>    </target>
209    
210    
211    <!-- Anthill targets -->    <target name="dist-docs"
212              depends="filter-src"
213              description="Builds javadocs without custom tags to dist folder">
214    
215    <!-- Should really run the tests instead of just the jar target -->      <delete dir="${dist.javadocs.dir}"/>
216    <target name="anthill-build" depends="jar, docs, dist-docs"      <mkdir dir="${dist.javadocs.dir}"/>
217            description="Build the jar and both the external and internal docs"/>  
218        <javadoc destdir="${dist.javadocs.dir}"
219                    link="http://java.sun.com/j2se/1.4.1/docs/api"
220                overview="${src.dir}/intro.html"
221                  source="${build.docsourcelevel}">
222    
223          <packageset dir="${build.filter.src.dir}"/>
224    
225        </javadoc>
226    
   <target name="anthill-publish">  
     <copy todir="${deployDir}/docs/private">  
       <fileset dir="${build.javadocs.dir}"/>  
     </copy>  
     <copy todir="${deployDir}/docs/public">  
       <fileset dir="${dist.javadocs.dir}"/>  
     </copy>  
227    </target>    </target>
228    
229    
230    
231    <!-- Internal targets -->    <!-- Internal targets -->
232    
   <target name="set-warnings-if" if="build.warnings">  
     <property name="build.warnings.option" value="-warnunchecked"/>  
   </target>  
233    
234    <target name="set-warnings-unless" unless="build.warnings">    <target name="init">
     <property name="build.warnings.option" value=""/>  
   </target>  
235    
   <target name="init" depends="set-warnings-if, set-warnings-unless">  
236      <!-- Version is kept in a separate file -->      <!-- Version is kept in a separate file -->
237      <loadfile property="version" srcFile="version.properties"/>      <loadfile property="version" srcFile="version.properties"/>
238      <echo>Building JSR-166 version ${version}</echo>      <echo>Building JSR-166 version ${version}</echo>
239    
240    </target>    </target>
241    
242    
243    <target name="clean-filtered-src">    <target name="init-jar">
244      <delete dir="${build.filter.src.dir}"/>  
245        <mkdir dir="${build.lib.dir}"/>
246    
247    </target>    </target>
248    
249    
250    <target name="dist-jar" depends="clean, jar">    <target name="native-jar"
251      <copy file="${product.jar}" todir="${dist.dir}"/>            depends="compile"
252              unless="build.emulation.true">
253    
254        <jar destfile="${product.jar}">
255          <fileset dir="${build.classes.dir}"/>
256        </jar>
257    
258    </target>    </target>
259    
260    
261    <target name="dist-docs" depends="clean-filtered-src, filter-src"    <target name="compile-emulation"
262            description="Builds javadocs without custom tags to dist folder">            depends="init, configure-compiler"
263      <delete dir="${dist.javadocs.dir}"/>            if="build.emulation.true">
     <mkdir dir="${dist.javadocs.dir}"/>  
     <javadoc destdir="${dist.javadocs.dir}"  
                 link="http://java.sun.com/j2se/1.4.1/docs/api"  
             overview="${src.dir}/intro.html"  
               source="${build.sourcelevel}">  
264    
265        <packageset dir="${build.filter.src.dir}">      <mkdir dir="${build.emulation.dir}"/>
266          <include name="java/**"/>  
267        </packageset>      <javac srcdir="${emulation.src.dir}"
268              destdir="${build.emulation.dir}"
269                debug="${build.debug}"
270           debuglevel="${build.debuglevel}"
271          deprecation="${build.deprecation}"
272               source="${build.sourcelevel}"
273                 fork="true">
274    
275          <bootclasspath refid="javac.bootclasspath"/>
276          <compilerarg line="${build.javac.args}"/>
277    
278        </javac>
279    
280      </target>
281    
282    
283      <target name="emulation-jar"
284              depends="compile-emulation"
285              if="build.emulation.true">
286    
287    
288        <jar destfile="${product.jar}" duplicate="add">
289          <fileset dir="${build.classes.dir}">
290            <patternset refid="emulation.excludes"/>
291          </fileset>
292          <fileset dir="${build.emulation.dir}"/>
293        </jar>
294    
295      </target>
296    
297    
298      <target name="dist-jar"
299              depends="clean, jar">
300    
301        <copy file="${product.jar}" todir="${dist.dir}"/>
302    
     </javadoc>  
303    </target>    </target>
304    
305    
306    <target name="compile-ant-filter">    <target name="compile-ant-filter"
307              depends="init">
308    
309      <mkdir dir="${build.ant.dir}"/>      <mkdir dir="${build.ant.dir}"/>
310    
311      <javac srcdir="${ant.src.dir}"      <javac srcdir="${ant.src.dir}"
312            destdir="${build.ant.dir}"            destdir="${build.ant.dir}"
313             source="1.4"             source="1.4"
314      />      />
315    
316    </target>    </target>
317    
318    
319    <target name="filter-src" depends="compile-ant-filter">    <target name="filter-src"
320              depends="compile-ant-filter">
321    
322      <mkdir dir="${build.filter.src.dir}"/>      <mkdir dir="${build.filter.src.dir}"/>
323    
324        <copy todir="${build.filter.src.dir}">
325          <fileset dir="${src.dir}">
326            <include name="**/*.html"/>
327          </fileset>
328        </copy>
329    
330        <!-- Not needed now, used for doccheck filtering:
331        <property name="generic.declarations"
332                 value="public interface E {} public interface T {} public interface K {} public interface V {}"
333        />
334        -->
335    
336      <copy todir="${build.filter.src.dir}">      <copy todir="${build.filter.src.dir}">
337        <fileset dir="${src.dir}">        <fileset dir="${src.dir}">
338          <include name="**/*.java"/>          <exclude name="**/*.html"/>
339            <patternset refid="emulation.excludes"/>
340        </fileset>        </fileset>
341        <filterchain>        <filterchain>
342          <filterreader classname="jsr166.ant.filters.ReplaceFilter"  
                       classpath="${build.ant.dir}">  
343            <!--            <!--
344             # These arguments are to get rid of angle-bracketed type           # This filter gets rid of angle-bracketed type parameters
345             # parameters so that javadoc can run on the result. The           # so that javadoc can run on the result. The following
346             # following heuristic that seems to work:           # heuristic seems to work:
347             #             #
348             # For all lines not starting with space(s)-asterisk-space(s),             # For all lines not starting with space(s)-asterisk-space(s),
349             #   replace <something> with a space, where there may be more             #   replace <something> with a space, where there may be more
# Line 223  Line 351 
351             #   must not contain parens or pipes. (This may need some             #   must not contain parens or pipes. (This may need some
352             #   tweaking.)             #   tweaking.)
353             -->             -->
354    
355            <filterreader classname="jsr166.ant.filters.ReplaceFilter"
356                          classpath="${build.ant.dir}">
357            <param name="notmatching" value="^\s+\*\s.*$"/>            <param name="notmatching" value="^\s+\*\s.*$"/>
358            <param name="pattern" value="&lt;[^|>()]+?>+"/>            <param name="pattern" value="&lt;[^|>()]+?>+"/>
359            <param name="replacement" value=" "/>            <param name="replacement" value=" "/>
360          </filterreader>          </filterreader>
361          <filterreader classname="jsr166.ant.filters.ReplaceFilter"  
362                        classpath="${build.ant.dir}">  
363            <!--            <!--
364             # These arguments are to uncomment lines beginning with           # This filter uncomments lines beginning with "//@" so that
365             # "//@" so that javadoc can see imports that are needed           # javadoc can see imports that are needed to resolve links
366             # to resolve links but that shouldn't be in the compiled           # but that shouldn't be in the compiled code.
            # code.  
367             -->             -->
368    
369            <filterreader classname="jsr166.ant.filters.ReplaceFilter"
370                          classpath="${build.ant.dir}">
371            <param name="matching" value="^//@.*$"/>            <param name="matching" value="^//@.*$"/>
372            <param name="pattern" value="^//@"/>            <param name="pattern" value="^//@"/>
373            <param name="replacement" value=""/>            <param name="replacement" value=""/>
374          </filterreader>          </filterreader>
375    
376    
377            <!--
378             # The next two filters try to make the source look like
379             # something that doccheck can process. The first removes
380             # -source 1.4 assertions and the second adds in a bunch
381             # of single letter public nested marker interfaces so that
382             # the generic type parameters are recognized.
383             #
384             # Currently commented out because doccheck doesn't work. :-(
385             -->
386    
387            <!--
388            <filterreader classname="jsr166.ant.filters.ReplaceFilter"
389                          classpath="${build.ant.dir}">
390              <param name="matching"    value="^\s*assert[\s ].*$"/>
391              <param name="pattern"     value="assert"/>
392              <param name="replacement" value="//assert"/>
393            </filterreader>
394    
395            <filterreader classname="jsr166.ant.filters.ReplaceFilter"
396                          classpath="${build.ant.dir}">
397              <param name="matching"    value="^(.*(class|interface|implements) .*|)\{.*$"/>
398              <param name="pattern"     value="$"/>
399              <param name="replacement" value=" ${generic.declarations}"/>
400            </filterreader>
401            -->
402    
403        </filterchain>        </filterchain>
404      </copy>      </copy>
405    
406    </target>    </target>
407    
408    
409    <target name="compile-tests" depends="jar">    <target name="compile-tests"
410              depends="jar">
411    
412      <mkdir dir="${build.testcases.dir}"/>      <mkdir dir="${build.testcases.dir}"/>
413    
414      <javac srcdir="${test.src.dir}"      <javac srcdir="${test.src.dir}"
415            destdir="${build.testcases.dir}"            destdir="${build.testcases.dir}"
416              debug="${build.debug}"              debug="${build.debug}"
# Line 254  Line 419 
419             source="${build.sourcelevel}"             source="${build.sourcelevel}"
420               fork="true">               fork="true">
421    
       <bootclasspath refid="javac.bootclasspath"/>  
       <compilerarg line="${javac.args} ${build.warnings.option}"/>  
422        <classpath refid="test.classpath"/>        <classpath refid="test.classpath"/>
423        <include name="**/*Test.java"/>        <bootclasspath refid="javac.bootclasspath"/>
424          <compilerarg line="${build.javac.args}"/>
425    
426      </javac>      </javac>
427    
428    </target>    </target>
429    
430    
431    <target name="run-tests" depends="compile-tests">    <target name="run-tests"
432              depends="compile-tests">
433    
434        <!-- May be overridden by user.properties -->
435        <property name="testcase" value="*"/>
436    
437      <mkdir dir="${build.reports.dir}"/>      <mkdir dir="${build.reports.dir}"/>
438    
439      <junit printsummary="true"      <junit printsummary="true"
440               showoutput="true"               showoutput="true"
441            errorProperty="junit.failed"            errorProperty="junit.failed"
# Line 272  Line 443 
443                      dir="${build.reports.dir}"                      dir="${build.reports.dir}"
444                     fork="true">                     fork="true">
445    
446        <jvmarg value="-Xbootclasspath/p:${product.jar}"/>        <jvmarg value="${test.bootclasspath.arg}"/>
   
       <classpath>  
         <!-- <path refid="test.classpath"/> -->  
         <pathelement location="${build.testcases.dir}"/>  
       </classpath>  
447    
448        <formatter type="xml"/>        <formatter type="xml"/>
449    
450        <batchtest todir="${build.reports.dir}">        <batchtest todir="${build.reports.dir}">
451          <fileset dir="${test.src.dir}">          <fileset dir="${test.src.dir}">
452            <include name="**/*Test.java"/>            <include name="**/${testcase}Test.java"/>
453          </fileset>          </fileset>
454        </batchtest>        </batchtest>
455    
456      </junit>      </junit>
457    
458    </target>    </target>
459    
460    
461    <target name="report-tests" depends="run-tests">    <target name="report-tests"
462              depends="run-tests">
463    
464      <!-- Sets junit.report.format to frames if Xalan is present,      <!-- Sets junit.report.format to frames if Xalan is present,
465           otherwise sets it to noframes. -->           otherwise sets it to noframes. -->
466      <available property="junit.report.format"      <available property="junit.report.format"
# Line 311  Line 480 
480      </junitreport>      </junitreport>
481    
482      <fail message="Test Cases Failed" if="junit.failed"/>      <fail message="Test Cases Failed" if="junit.failed"/>
483    
484      </target>
485    
486    
487      <target name="configure-compiler">
488    
489        <property name="gjc.version"
490                 value="2.0"/>
491    
492        <condition property="build.novariance" value="-novariance">
493          <and>
494            <equals arg1="${gjc.version}" arg2="2.0"/>
495            <or>
496              <not><isset property="gjc.novariance"/></not>
497              <istrue value="${gjc.novariance}"/>
498            </or>
499          </and>
500        </condition>
501    
502        <property name="build.novariance"
503                 value=""/>
504    
505        <property name="gjc.dir"
506                 value="${lib.dir}/gjc"/>
507    
508        <property name="javac.jar"
509              location="${gjc.dir}/${gjc.version}/javac.jar"/>
510    
511        <property name="collect.jar"
512              location="${gjc.dir}/${gjc.version}/collect${build.novariance}.jar"/>
513    
514    
515        <condition property="build.warnunchecked" value="-warnunchecked">
516          <istrue value="${gjc.warnunchecked}"/>
517        </condition>
518    
519        <property name="build.warnunchecked" value=""/>
520    
521        <condition property="prepare.src.dir" value="${build.dir}/prepare-src">
522          <istrue value="${build.nothreads}"/>
523        </condition>
524    
525    
526        <!--
527         ! Bootclasspath munging for source compilation.
528         -->
529    
530        <path id="javac.bootclasspath.prefix">
531          <!-- <pathelement location="${src.dir}"/> -->
532          <pathelement location="${javac.jar}"/>
533        </path>
534    
535        <path id="javac.bootclasspath">
536          <!-- <pathelement location="${src.dir}"/> -->
537          <pathelement location="${collect.jar}"/>
538          <pathelement location="${rt.jar}"/>
539        </path>
540    
541        <!-- Flatten bootclasspath prefix into a platform-appropriate string -->
542        <property name="javac.bootclasspath.prefix"
543                 refid="javac.bootclasspath.prefix"/>
544    
545        <!-- Turn the flattened bootclasspath prefix into a javac argument -->
546        <property name="build.bootclasspath.arg"
547                 value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/>
548    
549        <!-- Flatten bootclasspath for trace message -->
550        <property name="javac.bootclasspath"
551                 refid="javac.bootclasspath"/>
552    
553        <!-- Common options in javac invocations -->
554        <property name="build.javac.args"
555                 value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/>
556    
557        <echo>javac ${build.javac.args}</echo>
558        <echo>bootclasspath=${javac.bootclasspath}</echo>
559    
560      </target>
561    
562    
563      <target name="prepare-src"
564              depends="configure-compiler"
565              if="prepare.src.dir">
566    
567        <mkdir dir="${prepare.src.dir}"/>
568        <copy todir="${prepare.src.dir}">
569          <fileset dir="${src.dir}">
570            <exclude name="java/lang/**"/>
571          </fileset>
572        </copy>
573    
574      </target>
575    
576    
577      <target name="configure-emulation">
578    
579        <condition property="build.emulation.true">
580          <or>
581            <and>
582              <os family="windows"/>
583              <not>
584                <isset property="build.emulation"/>
585              </not>
586            </and>
587            <istrue value="${build.emulation}"/>
588          </or>
589        </condition>
590    
591      </target>
592    
593    
594      <target name="configure-tests">
595    
596        <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
597        <available property="junit.available"
598                   classname="junit.framework.Protectable"/>
599    
600        <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
601              unless="junit.available"/>
602    
603    
604        <!--
605         ! Bootclasspath munging for testing, so JUnit can test our local
606         ! modifications to java.*.
607         -->
608    
609        <path id="test.classpath">
610          <pathelement location="${product.jar}"/>
611          <pathelement location="${build.testcases.dir}"/>
612          <pathelement location="${junit.jar}"/>
613        </path>
614    
615        <!-- Flatten test classpath into a platform-appropriate string -->
616        <property name="test.classpath" refid="test.classpath"/>
617    
618        <!-- Turn the flattened test classpath into a javac argument -->
619        <property name="test.bootclasspath.arg"
620                 value='-Xbootclasspath/p:${test.classpath}'/>
621    
622      </target>
623    
624    
625    
626      <!-- Anthill targets -->
627    
628      <target name="anthill-build"
629              depends="jar, test, docs, dist-docs"/>
630    
631      <target name="anthill-publish">
632    
633        <copy todir="${deployDir}/docs/private">
634          <fileset dir="${build.javadocs.dir}"/>
635        </copy>
636    
637        <copy todir="${deployDir}/docs/public">
638          <fileset dir="${dist.javadocs.dir}"/>
639        </copy>
640    
641        <copy tofile="${deployDir}/index.html"
642              file="${basedir}/etc/anthill-index.html"/>
643    
644        <copy todir="${deployDir}/notes">
645          <fileset dir="${basedir}/etc/notes"/>
646        </copy>
647    
648    </target>    </target>
649    
650    

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.36

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8