ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/build.xml
(Generate patch)

Comparing jsr166/build.xml (file contents):
Revision 1.27 by tim, Wed May 28 00:33:17 2003 UTC vs.
Revision 1.45 by dl, Mon Jul 14 19:53:55 2003 UTC

# Line 1 | Line 1
1   <project name="jsr166" default="usage">
2  
3    <description>
4 <    Build file for JSR-166
4 > ------------------------------------------------------------------------------
5 >  Build file for JSR-166
6  
7 <    JUnit 3.8 or better must be in ${ant.home}/lib for the test target to work.
7 <  </description>
7 >  Usage: ant [target]
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>
13  
14 <  <target name="usage" description="Prints this message">
15 <    <echo>
12 < ant [target], where target is one of:
13 <
14 < usage       (default) Prints this message
15 < compile     Compiles all sources to build folder
16 < jar         Builds library jar from compiled sources
17 < test        Runs all tests (requires JUnit 1.8 in ${ant.home}/lib)
18 < docs        Builds javadocs with custom tags to build folder
19 < dist-docs   Builds javadocs without custom tags to dist folder
20 < dist        Puts all distributable products in single hierarchy
21 <
22 < clean       Removes all build products
23 < dist-clean  Removes all build and distribution products
24 <
25 < checkstyle  Reports on style errors in Java source (verbose, mostly chaff)
26 < doccheck    Reports on javadoc style errors (not working yet)
27 <    </echo>
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  
33  <!-- Set build.warnings in user.properties to turn on -warnunchecked -->
34  <!-- <property name="build.warnings" value=""/> -->
35
22  
23    <!-- Compilation options -->
24    <property name="build.sourcelevel"    value="1.5"/>
# Line 68 | Line 54 | ant [target], where target is one of:
54  
55    <!-- Jar locations -->
56    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
71  <property name="javac.jar"            location="${lib.dir}/javac.jar"/>
72  <property name="collect.jar"          location="${lib.dir}/collect.jar"/>
57    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
58    <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>
59  
60  
77  <!--
78   ! Bootclasspath munging for source compilation.
79   -->
80
81  <path id="javac.bootclasspath.prepend">
82    <!-- <pathelement location="${src.dir}"/> -->
83    <pathelement location="${javac.jar}"/>
84  </path>
85
86  <path id="javac.bootclasspath">
87    <!-- <pathelement location="${src.dir}"/> -->
88    <pathelement location="${collect.jar}"/>
89    <pathelement location="${rt.jar}"/>
90  </path>
91
92  <!-- Flatten bootclasspath prefix into a platform-appropriate string -->
93  <property name="javac.bootclasspath.prepend" refid="javac.bootclasspath.prepend"/>
94
95  <!-- Turn the flattened bootclasspath prefix into a javac argument -->
96  <property name="javac.args" value='-J-Xbootclasspath/p:${javac.bootclasspath.prepend}'/>
97
98
99  <!--
100   ! Bootclasspath munging for testing, so JUnit can test our local
101   ! modifications to java.*.
102   -->
103
104  <path id="test.classpath">
105    <pathelement location="${product.jar}"/>
106    <pathelement location="${build.testcases.dir}"/>
107    <pathelement location="${junit.jar}"/>
108  </path>
109
110  <!-- Flatten test classpath into a platform-appropriate string -->
111  <property name="test.classpath" refid="test.classpath"/>
61  
62 <  <!-- Turn the flattened test classpath into a javac argument -->
63 <  <property name="test.javac.args" value='-Xbootclasspath/p:${test.classpath}'/>
62 >  <!-- Files excluded from dist-docs and emulation jar -->
63 >  <patternset id="unsafe.exclusion">
64 >    <exclude name="java/util/Random.*"/>
65 >    <exclude name="sun/misc/Unsafe.*"/>
66 >  </patternset>
67 >
68 >  <!-- Files excludes from emulation jar -->
69 >  <patternset id="atomic.exclusion">
70 >    <exclude name="java/util/concurrent/atomic/AtomicBoolean*"/>
71 >    <exclude name="java/util/concurrent/atomic/AtomicInteger*"/>
72 >    <exclude name="java/util/concurrent/atomic/AtomicLong*"/>
73 >    <exclude name="java/util/concurrent/atomic/AtomicReference*"/>
74 >  </patternset>
75  
76  
77  
78    <!-- Main targets -->
79  
80 <  <target name="compile" depends="init"
80 >  <target name="compile"
81 >          depends="init, configure-compiler, prepare-src"
82            description="Compiles main sources to build folder">
83  
84 +    <property name="prepare.src.dir" value="${src.dir}"/>
85 +
86      <mkdir dir="${build.classes.dir}"/>
87  
88 <    <javac srcdir="${src.dir}"
88 > <!--
89 >    <echo>javac ${gjc.args}</echo>
90 >    <echo>bootclasspath=${compile.bootclasspath}</echo>
91 > -->
92 >
93 >    <javac srcdir="${prepare.src.dir}"
94            destdir="${build.classes.dir}"
95              debug="${build.debug}"
96         debuglevel="${build.debuglevel}"
# Line 130 | Line 98 | ant [target], where target is one of:
98             source="${build.sourcelevel}"
99               fork="true">
100  
101 <      <bootclasspath refid="javac.bootclasspath"/>
102 <      <compilerarg line="${javac.args} ${build.warnings.option}"/>
101 >      <compilerarg    line="${gjc.args}"/>
102 >      <bootclasspath refid="compile.bootclasspath"/>
103  
104      </javac>
105  
106    </target>
107  
108  
109 <  <target name="jar" depends="native-jar, emulation-jar"/>
109 >  <target name="jar"
110 >          depends="configure-emulation, init-jar, native-jar, emulation-jar"
111 >          description="Builds library jar from compiled sources"/>
112  
113  
114 <  <target name="test" depends="init, check-junit, report-tests"
115 <          description="Runs all tests (requires JUnit 3.8+ in ${ant.home}/lib)"
116 <  />
114 >  <target name="test"
115 >          depends="init, configure-tests, report-tests"
116 >          description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
117  
118  
119 <  <target name="checkstyle" depends="filter-src"
119 >  <target name="checkstyle"
120 >          depends="filter-src"
121            description="Reports on style errors in Java source (verbose, mostly chaff)">
122  
123      <taskdef resource="checkstyletask.properties"
# Line 160 | Line 131 | ant [target], where target is one of:
131    </target>
132  
133  
134 <  <target name="doccheck" depends="filter-src"
134 >  <target name="doccheck"
135 >          depends="filter-src"
136            description="Reports on javadoc style errors (not working yet)">
137  
138      <delete dir="${build.doccheck.dir}"/>
# Line 175 | Line 147 | ant [target], where target is one of:
147    </target>
148  
149  
150 <  <target name="docs" depends="filter-src"
150 >  <target name="docs"
151 >          depends="filter-src"
152            description="Builds javadocs with custom tags to build folder">
153  
154      <delete dir="${build.javadocs.dir}"/>
# Line 187 | Line 160 | ant [target], where target is one of:
160                source="${build.docsourcelevel}">
161  
162        <tag name="revised" description="Last revised:"/>
163 <      <tag name="spec" description="Specified by:"/>
164 <      <tag name="editor" description="Last edited by:"/>
165 <      <tag name="fixme" description="FIX ME:"/>
163 >      <tag name="spec"    description="Specified by:"/>
164 >      <tag name="editor"  description="Last edited by:"/>
165 >      <tag name="fixme"   description="FIX ME:"/>
166 >
167        <packageset dir="${build.filter.src.dir}"/>
168  
169      </javadoc>
# Line 197 | Line 171 | ant [target], where target is one of:
171    </target>
172  
173  
174 <  <!--
175 <   # javac -s doesn't reliably generate compilable code. It generates
176 <   # bridge methods (marked as "synthetic") that can have identical
203 <   # signatures to existing methods except for the return value.
204 <   -->
205 <  <target name="strip" depends="init">
174 >  <target name="strip"
175 >          depends="init, configure-compiler"
176 >          description="Strip generics from java source (not working yet)">
177  
178      <mkdir dir="${build.stripped.dir}"/>
179  
180 +    <!--
181 +     # javac -s doesn't reliably generate compilable code. It generates
182 +     # bridge methods (marked as "synthetic") that can have identical
183 +     # signatures to existing methods except for the return value.
184 +     -->
185      <javac srcdir="${src.dir}"
186            destdir="${build.stripped.dir}"
187              debug="${build.debug}"
# Line 214 | Line 190 | ant [target], where target is one of:
190             source="${build.sourcelevel}"
191               fork="true">
192  
193 <      <bootclasspath refid="javac.bootclasspath"/>
194 <      <compilerarg line="${javac.args} ${build.warnings.option} -s"/>
193 >      <compilerarg    line="${gjc.args} -s"/>
194 >      <bootclasspath refid="compile.bootclasspath"/>
195  
196      </javac>
197  
198    </target>
199  
200  
201 <  <target name="dist" depends="init, dist-clean, dist-jar, dist-docs"
201 >  <target name="dist"
202 >          depends="init, dist-clean, dist-jar, dist-docs"
203            description="Puts all distributable products in single hierarchy"/>
204  
205 +  <target name="release"
206 +          depends="dist"
207 +          description="Puts entire CVS tree, plus distribution productions, in a jar">
208 +
209 + <!--  
210 +    #keep build dir? - dl
211 +    <delete dir="${build.dir}"/>
212 + -->
213 +    <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
214 +
215 +    <jar basedir="${basedir}" destfile="${release.jar}">
216 +      <exclude name="${release.jar}"/>
217 +      <exclude name="user.properties"/>
218 +      <exclude name="etc/notes/**"/>
219 +      <exclude name="lib/gjc/2.1/**"/>
220 +      <exclude name="**/SyntaxTest.java"/>
221 +    </jar>
222 +
223 +  </target>
224  
225    <target name="clean"
226            description="Removes all build products">
# Line 244 | Line 240 | ant [target], where target is one of:
240    </target>
241  
242  
243 <  <!-- Anthill targets -->
244 <
245 <  <!-- Should really run the tests instead of just the jar target -->
250 <  <target name="anthill-build" depends="jar, test, docs, dist-docs"/>
251 <
252 <  <target name="anthill-publish">
253 <    <copy todir="${deployDir}/docs/private">
254 <      <fileset dir="${build.javadocs.dir}"/>
255 <    </copy>
256 <    <copy todir="${deployDir}/docs/public">
257 <      <fileset dir="${dist.javadocs.dir}"/>
258 <    </copy>
259 <    <copy tofile="${deployDir}/index.html"
260 <          file="${basedir}/etc/anthill-index.html"/>
261 <    <copy todir="${deployDir}/notes">
262 <      <fileset dir="${basedir}/etc/notes"/>
263 <    </copy>
264 <  </target>
243 >  <target name="dist-docs"
244 >          depends="filter-src"
245 >          description="Builds javadocs without custom tags to dist folder">
246  
247 +    <delete dir="${dist.javadocs.dir}"/>
248 +    <mkdir dir="${dist.javadocs.dir}"/>
249  
250 <  <!-- Internal targets -->
250 >    <javadoc destdir="${dist.javadocs.dir}"
251 >                link="http://java.sun.com/j2se/1.4.1/docs/api"
252 >            overview="${src.dir}/intro.html"
253 >              source="${build.docsourcelevel}">
254  
255 <  <target name="set-warnings-if" if="build.warnings">
255 >      <packageset dir="${build.filter.src.dir}"/>
256  
257 <    <property name="build.warnings.option" value="-warnunchecked"/>
257 >    </javadoc>
258  
259    </target>
260  
261  
276  <target name="set-warnings-unless" unless="build.warnings">
262  
263 <    <property name="build.warnings.option" value=""/>
279 <
280 <  </target>
263 >  <!-- Internal targets -->
264  
265  
266 <  <target name="init" depends="set-warnings-if, set-warnings-unless">
266 >  <target name="init">
267  
268      <!-- Version is kept in a separate file -->
269      <loadfile property="version" srcFile="version.properties"/>
# Line 289 | Line 272 | ant [target], where target is one of:
272    </target>
273  
274  
275 <  <target name="native-jar" depends="compile"
293 <          description="Builds library jar from compiled sources">
275 >  <target name="init-jar">
276  
277      <mkdir dir="${build.lib.dir}"/>
278  
279 +  </target>
280 +
281 +
282 +  <target name="native-jar"
283 +          depends="compile"
284 +          unless="build.emulation.true">
285 +
286      <jar destfile="${product.jar}">
287        <fileset dir="${build.classes.dir}"/>
288      </jar>
# Line 301 | Line 290 | ant [target], where target is one of:
290    </target>
291  
292  
293 <  <target name="compile-emulation" depends="init"
294 <          if="build.emulation"
295 <          description="Compiles emulation sources to build folder">
293 >  <target name="compile-emulation"
294 >          depends="init, configure-compiler"
295 >          if="build.emulation.true">
296  
297      <mkdir dir="${build.emulation.dir}"/>
298  
# Line 315 | Line 304 | ant [target], where target is one of:
304             source="${build.sourcelevel}"
305               fork="true">
306  
307 <      <bootclasspath refid="javac.bootclasspath"/>
308 <      <compilerarg line="${javac.args} ${build.warnings.option}"/>
307 >      <compilerarg    line="${gjc.args}"/>
308 >      <bootclasspath refid="compile.bootclasspath"/>
309  
310      </javac>
311  
312    </target>
313  
314  
315 <  <target name="emulation-jar" depends="native-jar, compile-emulation"
316 <          if="build.emulation">
315 >  <target name="emulation-jar"
316 >          depends="compile-emulation"
317 >          if="build.emulation.true">
318 >
319  
320 <    <jar destfile="${product.jar}" update="true" duplicate="add">
320 >    <jar destfile="${product.jar}" duplicate="add">
321 >      <fileset dir="${build.classes.dir}">
322 >        <patternset refid="atomic.exclusion"/>
323 >        <patternset refid="unsafe.exclusion"/>
324 >      </fileset>
325        <fileset dir="${build.emulation.dir}"/>
326      </jar>
327  
328    </target>
329  
330  
331 <  <target name="dist-jar" depends="clean, jar">
331 >  <target name="dist-jar"
332 >          depends="clean, jar">
333  
334      <copy file="${product.jar}" todir="${dist.dir}"/>
335  
336    </target>
337  
338  
339 <  <target name="dist-docs" depends="filter-src"
340 <          description="Builds javadocs without custom tags to dist folder">
345 <
346 <    <delete dir="${dist.javadocs.dir}"/>
347 <    <mkdir dir="${dist.javadocs.dir}"/>
348 <
349 <    <javadoc destdir="${dist.javadocs.dir}"
350 <                link="http://java.sun.com/j2se/1.4.1/docs/api"
351 <            overview="${src.dir}/intro.html"
352 <              source="${build.docsourcelevel}">
353 <
354 <      <packageset dir="${build.filter.src.dir}"/>
355 <
356 <    </javadoc>
357 <
358 <  </target>
359 <
360 <
361 <  <target name="compile-ant-filter" depends="init">
339 >  <target name="compile-ant-filter"
340 >          depends="init">
341  
342      <mkdir dir="${build.ant.dir}"/>
343  
# Line 370 | Line 349 | ant [target], where target is one of:
349    </target>
350  
351  
352 <  <target name="filter-src" depends="compile-ant-filter">
352 >  <target name="filter-src"
353 >          depends="compile-ant-filter">
354  
355      <mkdir dir="${build.filter.src.dir}"/>
356  
357      <copy todir="${build.filter.src.dir}">
358        <fileset dir="${src.dir}">
359 <        <include name="**/*.java"/>
360 <        <exclude name="**/Random.java"/>
361 <        <exclude name="**/Unsafe.java"/>
359 >        <include name="**/*.html"/>
360 >      </fileset>
361 >    </copy>
362 >
363 >    <!-- Not needed now, used for doccheck filtering:
364 >    <property name="generic.declarations"
365 >             value="public interface E {} public interface T {} public interface K {} public interface V {}"
366 >    />
367 >    -->
368 >
369 >    <copy todir="${build.filter.src.dir}">
370 >      <fileset dir="${src.dir}">
371 >        <exclude name="**/*.html"/>
372 >        <patternset refid="unsafe.exclusion"/>
373        </fileset>
374        <filterchain>
375 +
376 +        <!--
377 +         # This filter gets rid of angle-bracketed type parameters
378 +         # so that javadoc can run on the result. The following
379 +         # heuristic seems to work:
380 +         #
381 +         # For all lines not starting with space(s)-asterisk-space(s),
382 +         #   replace <something> with a space, where there may be more
383 +         #   than one right angle bracket at the end, and "something"
384 +         #   must not contain parens or pipes. (This may need some
385 +         #   tweaking.)
386 +         -->
387 +
388          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
389                        classpath="${build.ant.dir}">
386          <!--
387           # These arguments are to get rid of angle-bracketed type
388           # parameters so that javadoc can run on the result. The
389           # following heuristic that seems to work:
390           #
391           # For all lines not starting with space(s)-asterisk-space(s),
392           #   replace <something> with a space, where there may be more
393           #   than one right angle bracket at the end, and "something"
394           #   must not contain parens or pipes. (This may need some
395           #   tweaking.)
396           -->
390            <param name="notmatching" value="^\s+\*\s.*$"/>
391 <          <param name="pattern" value="&lt;[^|>()]+?>+"/>
391 >          <param name="pattern"     value="&lt;[^|>()]+?>+"/>
392            <param name="replacement" value=" "/>
393          </filterreader>
394 +
395 +
396 +        <!--
397 +         # This filter uncomments lines beginning with "//@" so that
398 +         # javadoc can see imports that are needed to resolve links
399 +         # but that shouldn't be in the compiled code.
400 +         -->
401 +
402          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
403                        classpath="${build.ant.dir}">
404 <          <!--
405 <           # These arguments are to uncomment lines beginning with
405 <           # "//@" so that javadoc can see imports that are needed
406 <           # to resolve links but that shouldn't be in the compiled
407 <           # code.
408 <           -->
409 <          <param name="matching" value="^//@.*$"/>
410 <          <param name="pattern" value="^//@"/>
404 >          <param name="matching"    value="^//@.*$"/>
405 >          <param name="pattern"     value="^//@"/>
406            <param name="replacement" value=""/>
407          </filterreader>
408 +
409 +
410 +        <!--
411 +         # The next two filters try to make the source look like
412 +         # something that doccheck can process. The first removes
413 +         # -source 1.4 assertions and the second adds in a bunch
414 +         # of single letter public nested marker interfaces so that
415 +         # the generic type parameters are recognized.
416 +         #
417 +         # Currently commented out because doccheck doesn't work. :-(
418 +         -->
419 +
420 +        <!--
421 +        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
422 +                      classpath="${build.ant.dir}">
423 +          <param name="matching"    value="^\s*assert[\s ].*$"/>
424 +          <param name="pattern"     value="assert"/>
425 +          <param name="replacement" value="//assert"/>
426 +        </filterreader>
427 +
428 +        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
429 +                      classpath="${build.ant.dir}">
430 +          <param name="matching"    value="^(.*(class|interface|implements) .*|)\{.*$"/>
431 +          <param name="pattern"     value="$"/>
432 +          <param name="replacement" value=" ${generic.declarations}"/>
433 +        </filterreader>
434 +        -->
435 +
436        </filterchain>
437      </copy>
438  
439    </target>
440  
441  
442 <  <target name="compile-tests" depends="jar">
442 >  <target name="compile-tests"
443 >          depends="jar">
444  
445      <mkdir dir="${build.testcases.dir}"/>
446  
447 + <!--
448 +    <echo>javac ${gjc.args}</echo>
449 +    <echo>bootclasspath=${test.compile.bootclasspath}</echo>
450 +    <echo>classpath="${test.classpath}"</echo>
451 + -->
452 +
453      <javac srcdir="${test.src.dir}"
454            destdir="${build.testcases.dir}"
455              debug="${build.debug}"
# Line 428 | Line 458 | ant [target], where target is one of:
458             source="${build.sourcelevel}"
459               fork="true">
460  
461 <      <bootclasspath refid="javac.bootclasspath"/>
462 <      <compilerarg line="${javac.args} ${build.warnings.option}"/>
463 <      <classpath refid="test.classpath"/>
461 >      <compilerarg    line="${gjc.args}"/>
462 >      <bootclasspath refid="test.compile.bootclasspath"/>
463 >      <classpath     refid="test.classpath"/>
464  
465      </javac>
466  
467    </target>
468  
469  
470 <  <target name="run-tests" depends="compile-tests">
470 >  <target name="run-tests"
471 >          depends="compile-tests">
472  
473      <!-- May be overridden by user.properties -->
474      <property name="testcase" value="*"/>
# Line 451 | Line 482 | ant [target], where target is one of:
482                      dir="${build.reports.dir}"
483                     fork="true">
484  
485 <      <jvmarg value="${test.javac.args}"/>
485 >      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
486  
487        <formatter type="xml"/>
488  
# Line 466 | Line 497 | ant [target], where target is one of:
497    </target>
498  
499  
500 <  <target name="report-tests" depends="run-tests">
500 >  <target name="report-tests"
501 >          depends="run-tests">
502 >
503      <!-- Sets junit.report.format to frames if Xalan is present,
504           otherwise sets it to noframes. -->
505      <available property="junit.report.format"
# Line 486 | Line 519 | ant [target], where target is one of:
519      </junitreport>
520  
521      <fail message="Test Cases Failed" if="junit.failed"/>
522 +
523    </target>
524  
525  
526 <  <target name="check-junit">
527 <    <!-- FIXME: this test isn't specific enough -->
526 >  <target name="configure-compiler">
527 >
528 >    <property name="gjc.version"
529 >             value="2.0"/>
530 >
531 >    <condition property="novariance.arg" value="-novariance">
532 >      <and>
533 >        <equals arg1="${gjc.version}" arg2="2.0"/>
534 >        <or>
535 >          <not><isset property="gjc.novariance"/></not>
536 >          <istrue value="${gjc.novariance}"/>
537 >        </or>
538 >      </and>
539 >    </condition>
540 >
541 >    <property name="novariance.arg"
542 >             value=""/>
543 >
544 >    <property name="gjc.dir"
545 >             value="${lib.dir}/gjc"/>
546 >
547 >    <property name="javac.jar"
548 >          location="${gjc.dir}/${gjc.version}/javac.jar"/>
549 >
550 >    <property name="collect.jar"
551 >          location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/>
552 >
553 >
554 >    <condition property="warnunchecked.arg" value="-warnunchecked">
555 >      <istrue value="${gjc.warnunchecked}"/>
556 >    </condition>
557 >
558 >    <property name="warnunchecked.arg" value=""/>
559 >
560 >    <condition property="prepare.src.dir" value="${build.dir}/prepare-src">
561 >      <istrue value="${build.nothreads}"/>
562 >    </condition>
563 >
564 >
565 >    <!--
566 >     ! Bootclasspath munging for source compilation.
567 >     -->
568 >
569 >    <path id="pre.bootclasspath">
570 >      <pathelement location="${javac.jar}"/>
571 >    </path>
572 >
573 >    <path id="compile.bootclasspath">
574 >      <pathelement location="${build.classes.dir}"/>
575 >      <pathelement location="${collect.jar}"/>
576 >      <pathelement location="${rt.jar}"/>
577 >    </path>
578 >
579 >    <!-- Flatten paths into platform-appropriate strings -->
580 >    <property name="pre.bootclasspath"     refid="pre.bootclasspath"/>
581 >    <property name="compile.bootclasspath" refid="compile.bootclasspath"/>
582 >
583 >
584 >    <!-- Common options in javac invocations -->
585 >    <property name="gjc.args"
586 >             value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}"
587 >    />
588 >
589 >  </target>
590 >
591 >
592 >  <target name="prepare-src"
593 >          depends="configure-compiler"
594 >          if="prepare.src.dir">
595 >
596 >    <mkdir dir="${prepare.src.dir}"/>
597 >    <copy todir="${prepare.src.dir}">
598 >      <fileset dir="${src.dir}">
599 >        <exclude name="java/lang/**"/>
600 >      </fileset>
601 >    </copy>
602 >
603 >  </target>
604 >
605 >
606 >  <target name="configure-emulation">
607 >
608 >    <condition property="build.emulation.true">
609 >      <or>
610 >        <and>
611 >          <os family="windows"/>
612 >          <not>
613 >            <isset property="build.emulation"/>
614 >          </not>
615 >        </and>
616 >        <istrue value="${build.emulation}"/>
617 >      </or>
618 >    </condition>
619 >
620 >  </target>
621 >
622 >
623 >  <target name="configure-tests"
624 >       depends="configure-compiler">
625 >
626 >    <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
627      <available property="junit.available"
628 <               classname="junit.framework.TestCase"/>
629 <    <fail message="Need JUnit 3.8 to run tests" unless="junit.available"/>
628 >               classname="junit.framework.Protectable"/>
629 >
630 >    <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
631 >          unless="junit.available"/>
632 >
633 >
634 >    <!--
635 >     ! Bootclasspath munging for testing, so JUnit can test our local
636 >     ! modifications to java.*.
637 >     -->
638 >
639 >    <path id="test.classpath">
640 >      <pathelement location="${product.jar}"/>
641 >      <pathelement location="${build.testcases.dir}"/>
642 >      <pathelement location="${junit.jar}"/>
643 >    </path>
644 >
645 >    <path id="test.compile.bootclasspath">
646 >      <pathelement location="${javac.jar}"/>
647 >      <pathelement location="${collect.jar}"/>
648 >      <pathelement location="${rt.jar}"/>
649 >    </path>
650 >
651 >    <path id="test.run.bootclasspath">
652 >      <pathelement location="${javac.jar}"/>
653 >      <path refid="test.classpath"/>
654 >    </path>
655 >
656 >    <!-- Flatten test classpaths into platform-appropriate strings -->
657 >    <property name="test.classpath"             refid="test.classpath"/>
658 >    <property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/>
659 >    <property name="test.run.bootclasspath"     refid="test.run.bootclasspath"/>
660 >
661 >  </target>
662 >
663 >
664 >
665 >  <!-- Anthill targets -->
666 >
667 >  <target name="anthill-build"
668 >          depends="jar, test, docs, dist-docs"/>
669 >
670 >  <target name="anthill-publish">
671 >
672 >    <copy todir="${deployDir}/docs/private">
673 >      <fileset dir="${build.javadocs.dir}"/>
674 >    </copy>
675 >
676 >    <copy todir="${deployDir}/docs/public">
677 >      <fileset dir="${dist.javadocs.dir}"/>
678 >    </copy>
679 >
680 >    <copy tofile="${deployDir}/index.html"
681 >          file="${basedir}/etc/anthill-index.html"/>
682 >
683 >    <copy todir="${deployDir}/notes">
684 >      <fileset dir="${basedir}/etc/notes"/>
685 >    </copy>
686 >
687 >  </target>
688 >
689 >
690 >  <target name="ng" depends="test">
691 >    <java classname="SuperfluousAbstract" fork="true">
692 >
693 >      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
694 >
695 >    </java>
696    </target>
697  
698  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines