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.52 by tim, Tue Aug 19 15:10:45 2003 UTC vs.
Revision 1.62 by tim, Wed Dec 10 01:51:11 2003 UTC

# Line 22 | Line 22
22  
23    <!-- Compilation options -->
24    <property name="build.sourcelevel"    value="1.5"/>
25  <property name="build.docsourcelevel" value="1.4"/>
25    <property name="build.debug"          value="true"/>
26    <property name="build.debuglevel"     value="source,lines,vars"/>
27    <property name="build.deprecation"    value="false"/>
# Line 30 | Line 29
29    <!-- Build locations -->
30    <property name="build.dir"            location="build"/>
31    <property name="build.classes.dir"    location="${build.dir}/classes"/>
33  <property name="build.emulation.dir"  location="${build.dir}/emulation"/>
32    <property name="build.testcases.dir"  location="${build.dir}/testcases"/>
33    <property name="build.lib.dir"        location="${build.dir}/lib"/>
34    <property name="build.ant.dir"        location="${build.dir}/ant"/>
35    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>
38  <property name="build.sinjdocs.dir"   location="${build.dir}/sinjdocs"/>
39  <property name="build.stripped.dir"   location="${build.dir}/stripped"/>
36    <property name="build.reports.dir"    location="${build.dir}/reports"/>
37 +  <property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/>
38    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>
39    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
40 <  <property name="build.filter.doccheck.dir" location="${build.dir}/filterdocchk"/>
40 >  <property name="build.dc-filter.dir"  location="${build.dir}/filterdocchk"/>
41  
42    <!-- Source locations -->
43    <property name="src.dir"              location="${basedir}/src/main"/>
47  <property name="emulation.src.dir"    location="${basedir}/src/emulation"/>
44    <property name="test.src.dir"         location="${basedir}/src/test"/>
45 +  <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
46 +  <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
47    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>
48    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>
49    <property name="lib.dir"              location="${basedir}/lib"/>
# Line 57 | Line 55
55    <!-- Jar locations -->
56    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
57    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
58 <  <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>
59 <  <property name="sinjdoc.jar"          location="${lib.dir}/sinjdoc.jar"/>
60 <
61 <
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>
69 <
70 <  <!-- Files excludes from emulation jar -->
71 <  <patternset id="atomic.exclusion">
72 <    <exclude name="java/util/concurrent/atomic/AtomicBoolean*"/>
73 <    <exclude name="java/util/concurrent/atomic/AtomicInteger*"/>
74 <    <exclude name="java/util/concurrent/atomic/AtomicLong*"/>
75 <    <exclude name="java/util/concurrent/atomic/AtomicReference*"/>
76 <    <exclude name="java/util/concurrent/locks/LockSupport*"/>
77 <    <exclude name="java/util/concurrent/locks/ReentrantLock*"/>
78 <  </patternset>
58 >  
59 >  <!-- Bootclasspath argument -->
60 >  <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
61 >
62 >  <!-- Test classpath -->
63 >  <path id="test.classpath">
64 >    <pathelement location="${build.testcases.dir}"/>
65 >    <pathelement location="${junit.jar}"/>
66 >  </path>
67  
68  
69  
70    <!-- Main targets -->
71  
72 +
73    <target name="compile"
74 <          depends="init, configure-compiler, prepare-src"
74 >          depends="init, configure-compiler"
75            description="Compiles main sources to build folder">
76  
88    <property name="prepare.src.dir" value="${src.dir}"/>
89
77      <mkdir dir="${build.classes.dir}"/>
78  
79 < <!--
93 <    <echo>javac ${gjc.args}</echo>
94 <    <echo>bootclasspath=${compile.bootclasspath}</echo>
95 < -->
96 <
97 <    <javac srcdir="${prepare.src.dir}"
79 >    <javac srcdir="${src.dir}"
80            destdir="${build.classes.dir}"
81              debug="${build.debug}"
82         debuglevel="${build.debuglevel}"
# Line 102 | Line 84
84             source="${build.sourcelevel}"
85               fork="true">
86  
87 <      <compilerarg    line="${gjc.args}"/>
106 <      <bootclasspath refid="compile.bootclasspath"/>
87 >      <compilerarg line="${build.args}"/>
88  
89      </javac>
90  
91    </target>
92  
93  
113  <target name="jar"
114          depends="configure-emulation, init-jar, native-jar, emulation-jar"
115          description="Builds library jar from compiled sources"/>
116
117
118  <target name="test"
119          depends="init, configure-tests, report-tests"
120          description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
94  
95 +  <target name="jar"
96 +          depends="compile"
97 +          description="Builds library jar from compiled sources">
98  
99 <  <target name="checkstyle"
124 <          depends="filter-src"
125 <          description="Reports on style errors in Java source (verbose, mostly chaff)">
126 <
127 <    <taskdef resource="checkstyletask.properties"
128 <            classpath="${lib.dir}/checkstyle-all-2.4.jar"/>
99 >    <mkdir dir="${build.lib.dir}"/>
100  
101 <    <checkstyle>
102 <      <formatter type="plain"/>  <!-- also available: type="xml" -->
103 <      <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
133 <    </checkstyle>
101 >    <jar destfile="${product.jar}">
102 >      <fileset dir="${build.classes.dir}"/>
103 >    </jar>
104  
105    </target>
106  
107  
138  <target name="doccheck"
139          depends="filter-doccheck"
140          description="Reports on javadoc style errors">
141
142    <delete dir="${build.doccheck.dir}"/>
143    <mkdir dir="${build.doccheck.dir}"/>
108  
109 <    <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
110 <         docletpath="${lib.dir}/doccheck.jar"
111 <            destdir="${build.doccheck.dir}">
148 <      <packageset dir="${build.filter.doccheck.dir}"/>
149 <    </javadoc>
150 <
151 <    <echo>DocCheck output is in ${build.doccheck.dir}</echo>
109 >  <target name="test"
110 >          depends="init, configure-tests, report-tests"
111 >          description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
112  
153  </target>
113  
114  
115    <target name="docs"
157          depends="filter-src"
116            description="Builds javadocs with custom tags to build folder">
117  
118      <delete dir="${build.javadocs.dir}"/>
# Line 163 | Line 121
121      <javadoc destdir="${build.javadocs.dir}"
122                  link="http://java.sun.com/j2se/1.4.1/docs/api"
123              overview="${src.dir}/intro.html"
124 <              source="${build.docsourcelevel}">
124 >              source="${build.sourcelevel}">
125  
126        <tag name="revised" description="Last revised:"/>
127        <tag name="spec"    description="Specified by:"/>
170      <tag name="editor"  description="Last edited by:"/>
171      <tag name="fixme"   description="FIX ME:"/>
128  
129 <      <packageset dir="${build.filter.src.dir}"/>
129 >      <packageset dir="${src.dir}"/>
130  
131      </javadoc>
132  
133    </target>
134  
135  
180  <target name="sinjdocs"
181          depends="configure-tests"
182          description="Builds javadocs with custom tags to build folder">
183
184    <delete dir="${build.sinjdocs.dir}"/>
185    <mkdir dir="${build.sinjdocs.dir}"/>
186
187    <java classname="net.cscott.sinjdoc.Main" fork="true">
136  
137 <      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
137 >  <target name="doccheck"
138 >          depends="filter-doccheck"
139 >          description="Reports on javadoc style errors">
140  
141 <      <classpath>
142 <        <pathelement location="${sinjdoc.jar}"/>
193 <        <pathelement location="${lib.dir}/jutil.jar"/>
194 <        <pathelement location="${lib.dir}/cup.jar"/>
195 <        <path refid="test.classpath"/>
196 <      </classpath>
197 <
198 <
199 <      <arg value="-d"/>          <arg value="${build.sinjdocs.dir}"/>
200 <      <arg value="-sourcepath"/> <arg value="${src.dir}"/>
201 <      <arg value="-overview"/>   <arg value="${src.dir}/intro.html"/>
202 <      <arg value="-source"/>     <arg value="${build.sourcelevel}"/>
203 <      <!-- <arg value="-verbose"/> -->
204 <      <!-- <arg value="-link"/>  <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> -->
205 <      <arg value="java.lang"/>
206 <      <arg value="java.util"/>
207 <      <arg value="java.util.concurrent"/>
208 <      <arg value="java.util.concurrent.atomic"/>
209 <      <arg value="java.util.concurrent.locks"/>
141 >    <delete dir="${build.doccheck.dir}"/>
142 >    <mkdir dir="${build.doccheck.dir}"/>
143  
144 <      <!--
145 <      <arg value="-help"/>
146 <      -->
144 >    <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
145 >         docletpath="${lib.dir}/doccheck.jar"
146 >            destdir="${build.doccheck.dir}">
147 >      <packageset dir="${build.dc-filter.dir}"/>
148 >    </javadoc>
149  
150 <    </java>
150 >    <echo>DocCheck output is in ${build.doccheck.dir}</echo>
151  
152    </target>
153  
154  
220  <target name="strip"
221          depends="init, configure-compiler"
222          description="Strip generics from java source (not working yet)">
223
224    <mkdir dir="${build.stripped.dir}"/>
155  
156 <    <!--
157 <     # javac -s doesn't reliably generate compilable code. It generates
158 <     # bridge methods (marked as "synthetic") that can have identical
229 <     # signatures to existing methods except for the return value.
230 <     -->
231 <    <javac srcdir="${src.dir}"
232 <          destdir="${build.stripped.dir}"
233 <            debug="${build.debug}"
234 <       debuglevel="${build.debuglevel}"
235 <      deprecation="${build.deprecation}"
236 <           source="${build.sourcelevel}"
237 <             fork="true">
156 >  <target name="checkstyle"
157 >          depends="filter-src"
158 >          description="Reports on style errors in Java source (verbose, mostly chaff)">
159  
160 <      <compilerarg    line="${gjc.args} -s"/>
161 <      <bootclasspath refid="compile.bootclasspath"/>
160 >    <taskdef resource="checkstyletask.properties"
161 >            classpath="${lib.dir}/checkstyle-all-3.1.jar"/>
162  
163 <    </javac>
163 >    <mkdir dir="${build.checkstyle.dir}"/>
164 >    
165 >    <checkstyle config="etc/checkstyle/sun_checks.xml"
166 >       failOnViolation="false">
167 >      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
168 >      <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
169 >    </checkstyle>
170 >    
171 >    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
172 >          out="${build.checkstyle.dir}/checkstyle-report.html"
173 >        style="${stylesheet.dir}/checkstyle-frames.xsl"/>
174  
175    </target>
176  
177 +  
178  
179    <target name="dist"
180            depends="init, dist-clean, dist-jar, dist-docs"
181            description="Puts all distributable products in single hierarchy"/>
182  
183 +
184 +
185    <target name="release"
186            depends="dist"
187            description="Puts entire CVS tree, plus distribution productions, in a jar">
188  
255 <!--
256    #keep build dir? - dl
257    <delete dir="${build.dir}"/>
258 -->
189      <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
190  
191      <jar basedir="${basedir}" destfile="${release.jar}">
192 +      <!-- <exclude name="build/**"/> -->
193        <exclude name="${release.jar}"/>
194        <exclude name="user.properties"/>
195        <exclude name="etc/notes/**"/>
196 <      <exclude name="lib/gjc/2.1/**"/>
196 >      <exclude name="src/emulation/**"/>
197        <exclude name="**/SyntaxTest.java"/>
198 +      <exclude name="**/SuperfluousAbstract.java"/>
199      </jar>
200  
201    </target>
202  
203 +
204 +
205    <target name="clean"
206            description="Removes all build products">
207  
# Line 278 | Line 212
212    </target>
213  
214  
215 +
216    <target name="dist-clean"
217            description="Removes all build and distribution products">
218  
# Line 286 | Line 221
221    </target>
222  
223  
224 +
225    <target name="dist-docs"
290          depends="filter-src"
226            description="Builds javadocs without custom tags to dist folder">
227  
228      <delete dir="${dist.javadocs.dir}"/>
229      <mkdir dir="${dist.javadocs.dir}"/>
230  
231      <javadoc destdir="${dist.javadocs.dir}"
232 <                link="http://java.sun.com/j2se/1.4.1/docs/api"
232 >                link="http://java.sun.com/j2se/1.4.2/docs/api"
233              overview="${src.dir}/intro.html"
234 <              source="${build.docsourcelevel}">
234 >              source="${build.sourcelevel}">
235  
236 <      <packageset dir="${build.filter.src.dir}"/>
236 >      <packageset dir="${src.dir}"/>
237  
238      </javadoc>
239  
# Line 314 | Line 249
249      <!-- Version is kept in a separate file -->
250      <loadfile property="version" srcFile="version.properties"/>
251      <echo>Building JSR-166 version ${version}</echo>
252 +    <echo>java.home is ${java.home}</echo>
253  
254    </target>
255 <
256 <
321 <  <target name="init-jar">
322 <
323 <    <mkdir dir="${build.lib.dir}"/>
324 <
325 <  </target>
326 <
327 <
328 <  <target name="native-jar"
329 <          depends="compile"
330 <          unless="build.emulation.true">
331 <
332 <    <jar destfile="${product.jar}">
333 <      <fileset dir="${build.classes.dir}"/>
334 <    </jar>
335 <
336 <  </target>
337 <
338 <
339 <  <target name="compile-emulation"
340 <          depends="init, configure-compiler"
341 <          if="build.emulation.true">
342 <
343 <    <mkdir dir="${build.emulation.dir}"/>
344 <
345 <    <javac srcdir="${emulation.src.dir}"
346 <          destdir="${build.emulation.dir}"
347 <            debug="${build.debug}"
348 <       debuglevel="${build.debuglevel}"
349 <      deprecation="${build.deprecation}"
350 <           source="${build.sourcelevel}"
351 <             fork="true">
352 <
353 <      <compilerarg    line="${gjc.args}"/>
354 <      <bootclasspath refid="compile.bootclasspath"/>
355 <
356 <    </javac>
357 <
358 <  </target>
359 <
360 <
361 <  <target name="emulation-jar"
362 <          depends="compile-emulation"
363 <          if="build.emulation.true">
364 <
365 <
366 <    <jar destfile="${product.jar}" duplicate="add">
367 <      <fileset dir="${build.classes.dir}">
368 <        <patternset refid="atomic.exclusion"/>
369 <        <patternset refid="unsafe.exclusion"/>
370 <      </fileset>
371 <      <fileset dir="${build.emulation.dir}"/>
372 <    </jar>
373 <
374 <  </target>
375 <
376 <
255 >  
256 >  
257    <target name="dist-jar"
258            depends="clean, jar">
259  
# Line 409 | Line 289
289      <copy todir="${build.filter.src.dir}">
290        <fileset dir="${src.dir}">
291          <exclude name="**/*.html"/>
292 <        <patternset refid="unsafe.exclusion"/>
292 >        <!-- Files excluded from dist-docs -->
293 >        <exclude name="java/util/Random.*"/>
294 >        <exclude name="sun/misc/Unsafe.*"/>
295        </fileset>
296 +      <!--
297        <filterchain>
298 +      -->
299  
300          <!--
301           # This filter gets rid of angle-bracketed type parameters
# Line 425 | Line 309
309           #   tweaking.)
310           -->
311  
312 +        <!--
313          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
314                        classpath="${build.ant.dir}">
315            <param name="notmatching" value="^\s+\*\s.*$"/>
316            <param name="pattern"     value="&lt;[^|>()]+?>+"/>
317            <param name="replacement" value=" "/>
318          </filterreader>
319 +        -->
320  
321 <
436 <        <!--
437 <         # This filter uncomments lines beginning with "//@" so that
438 <         # javadoc can see imports that are needed to resolve links
439 <         # but that shouldn't be in the compiled code.
440 <         -->
441 <
442 <        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
443 <                      classpath="${build.ant.dir}">
444 <          <param name="matching"    value="^//@.*$"/>
445 <          <param name="pattern"     value="^//@"/>
446 <          <param name="replacement" value=""/>
447 <        </filterreader>
321 >      <!--
322        </filterchain>
323 +      -->
324      </copy>
325  
326    </target>
327  
328  
454
455
329    <target name="filter-doccheck"
330            depends="filter-src">
331  
332 <    <mkdir dir="${build.filter.doccheck.dir}"/>
332 >    <mkdir dir="${build.dc-filter.dir}"/>
333  
334 <    <copy todir="${build.filter.doccheck.dir}">
334 >    <copy todir="${build.dc-filter.dir}">
335        <fileset dir="${build.filter.src.dir}">
336          <include name="**/*.html"/>
337        </fileset>
# Line 468 | Line 341
341               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 {}"
342      />
343  
344 <    <copy todir="${build.filter.doccheck.dir}">
344 >    <copy todir="${build.dc-filter.dir}">
345        <fileset dir="${build.filter.src.dir}">
346          <exclude name="**/*.html"/>
347        </fileset>
# Line 506 | Line 379
379  
380      <mkdir dir="${build.testcases.dir}"/>
381  
382 < <!--
383 <    <echo>javac ${gjc.args}</echo>
384 <    <echo>bootclasspath=${test.compile.bootclasspath}</echo>
385 <    <echo>classpath="${test.classpath}"</echo>
386 < -->
382 >    <javac srcdir="${tck.src.dir}"
383 >          destdir="${build.testcases.dir}"
384 >            debug="${build.debug}"
385 >       debuglevel="${build.debuglevel}"
386 >      deprecation="${build.deprecation}"
387 >           source="${build.sourcelevel}"
388 >             fork="true">
389 >
390 >      <compilerarg value="${bootclasspath.args}"/>
391 >      <compilerarg line="${build.args}"/>
392 >      
393 >      <classpath refid="test.classpath"/>
394 >
395 >    </javac>
396  
397      <javac srcdir="${test.src.dir}"
398            destdir="${build.testcases.dir}"
# Line 520 | Line 402
402             source="${build.sourcelevel}"
403               fork="true">
404  
405 <      <compilerarg    line="${gjc.args}"/>
406 <      <bootclasspath refid="test.compile.bootclasspath"/>
407 <      <classpath     refid="test.classpath"/>
405 >      <include name="jsr166/test/**"/>
406 >      
407 >      <compilerarg value="${bootclasspath.args}"/>
408 >      <compilerarg line="${build.args}"/>
409 >      
410 >      <classpath refid="test.classpath"/>
411 >
412 >    </javac>
413 >
414 > <!--
415 >    <javac srcdir="${jtreg.src.dir}"
416 >          destdir="${build.testcases.dir}"
417 >            debug="${build.debug}"
418 >       debuglevel="${build.debuglevel}"
419 >      deprecation="${build.deprecation}"
420 >           source="${build.sourcelevel}"
421 >             fork="true">
422 >
423 >      <compilerarg value="${bootclasspath.args}"/>
424 >      <compilerarg line="${build.args}"/>
425 >      
426 >      <classpath refid="test.classpath"/>
427  
428      </javac>
429 + -->
430  
431    </target>
432  
# Line 544 | Line 446
446                      dir="${build.reports.dir}"
447                     fork="true">
448  
449 <      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
449 >      <jvmarg value="${bootclasspath.args}"/>
450 >      
451 >      <classpath refid="test.classpath"/>
452  
453        <formatter type="xml"/>
454  
455 <      <batchtest todir="${build.reports.dir}">
455 >      <batchtest todir="${build.reports.dir}" unless="no.test.tck">
456 >        <fileset dir="${tck.src.dir}">
457 >          <include name="**/${testcase}Test.java"/>
458 >        </fileset>
459 >      </batchtest>
460 >      
461 >      <batchtest todir="${build.reports.dir}" if="do.test.old">
462          <fileset dir="${test.src.dir}">
463 +          <include name="jsr166/test/**/${testcase}Test.java"/>
464 +        </fileset>
465 +      </batchtest>
466 +
467 + <!--      
468 +      <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
469 +        <fileset dir="${jtreg.src.dir}">
470            <include name="**/${testcase}Test.java"/>
471          </fileset>
472        </batchtest>
473 + -->
474  
475      </junit>
476  
# Line 562 | Line 480
480    <target name="report-tests"
481            depends="run-tests">
482  
483 <    <!-- Sets junit.report.format to frames if Xalan is present,
483 >    <!-- Sets junit.report.format to frames if redirection is present,
484           otherwise sets it to noframes. -->
485      <available property="junit.report.format"
486                    value="frames"
# Line 587 | Line 505
505  
506    <target name="configure-compiler">
507  
508 <    <property name="gjc.version"
591 <             value="2.2"/>
592 <
593 <    <condition property="novariance.arg" value="-novariance">
594 <      <and>
595 <        <equals arg1="${gjc.version}" arg2="2.0"/>
596 <        <or>
597 <          <not><isset property="gjc.novariance"/></not>
598 <          <istrue value="${gjc.novariance}"/>
599 <        </or>
600 <      </and>
601 <    </condition>
602 <
603 <    <property name="novariance.arg"
604 <             value=""/>
605 <
606 <    <property name="gjc.dir"
607 <             value="${lib.dir}/gjc"/>
608 <
609 <    <property name="javac.jar"
610 <          location="${gjc.dir}/${gjc.version}/javac.jar"/>
508 >    <property name="unchecked.option" value="-Xlint:unchecked"/>
509  
510 <    <property name="collect.jar"
511 <          location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/>
614 <
615 <
616 <    <condition property="warnunchecked.arg" value="-warnunchecked">
617 <      <istrue value="${gjc.warnunchecked}"/>
510 >    <condition property="warnunchecked.arg" value="${unchecked.option}">
511 >      <istrue value="${build.warnunchecked}"/>
512      </condition>
513  
514      <property name="warnunchecked.arg" value=""/>
515  
622    <condition property="prepare.src.dir" value="${build.dir}/prepare-src">
623      <istrue value="${build.nothreads}"/>
624    </condition>
625
626
627    <!--
628     ! Bootclasspath munging for source compilation.
629     -->
630
631    <path id="pre.bootclasspath">
632      <pathelement location="${javac.jar}"/>
633    </path>
634
635    <path id="compile.bootclasspath">
636      <pathelement location="${build.classes.dir}"/>
637      <pathelement location="${collect.jar}"/>
638      <pathelement location="${rt.jar}"/>
639    </path>
640
641    <!-- Flatten paths into platform-appropriate strings -->
642    <property name="pre.bootclasspath"     refid="pre.bootclasspath"/>
643    <property name="compile.bootclasspath" refid="compile.bootclasspath"/>
644
516  
517      <!-- Common options in javac invocations -->
518 <    <property name="gjc.args"
648 <             value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}"
649 <    />
650 <
651 <  </target>
652 <
653 <
654 <  <target name="prepare-src"
655 <          depends="configure-compiler"
656 <          if="prepare.src.dir">
657 <
658 <    <mkdir dir="${prepare.src.dir}"/>
659 <    <copy todir="${prepare.src.dir}">
660 <      <fileset dir="${src.dir}">
661 <        <exclude name="java/lang/**"/>
662 <      </fileset>
663 <    </copy>
664 <
665 <  </target>
666 <
667 <
668 <  <target name="configure-emulation">
669 <
670 <    <condition property="build.emulation.true">
671 <      <or>
672 <        <and>
673 <          <os family="windows"/>
674 <          <not>
675 <            <isset property="build.emulation"/>
676 <          </not>
677 <        </and>
678 <        <istrue value="${build.emulation}"/>
679 <      </or>
680 <    </condition>
518 >    <property name="build.args" value="${warnunchecked.arg}"/>
519  
520    </target>
521  
# Line 689 | Line 527
527      <available property="junit.available"
528                 classname="junit.framework.Protectable"/>
529  
530 +    <!-- Xalan -->
531 +    <available property="xalan.available"
532 +               classname="org.apache.xalan.Version"/>
533 +
534 +              
535 +    <!-- Ant 1.6beta and later don't need or want this check -->
536 +    <!--    
537      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
538            unless="junit.available"/>
539  
540 <
541 <    <!--
542 <     ! Bootclasspath munging for testing, so JUnit can test our local
698 <     ! modifications to java.*.
699 <     -->
700 <
701 <    <path id="test.classpath">
702 <      <pathelement location="${product.jar}"/>
703 <      <pathelement location="${build.testcases.dir}"/>
704 <      <pathelement location="${junit.jar}"/>
705 <    </path>
706 <
707 <    <path id="test.compile.bootclasspath">
708 <      <pathelement location="${javac.jar}"/>
709 <      <pathelement location="${collect.jar}"/>
710 <      <pathelement location="${rt.jar}"/>
711 <    </path>
712 <
713 <    <path id="test.run.bootclasspath">
714 <      <pathelement location="${javac.jar}"/>
715 <      <path refid="test.classpath"/>
716 <    </path>
717 <
718 <    <!-- Flatten test classpaths into platform-appropriate strings -->
719 <    <property name="test.classpath"             refid="test.classpath"/>
720 <    <property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/>
721 <    <property name="test.run.bootclasspath"     refid="test.run.bootclasspath"/>
540 >    <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
541 >          unless="xalan.available"/>
542 >    -->
543  
544    </target>
545  
# Line 726 | Line 547
547  
548    <!-- Anthill targets -->
549  
550 <  <target name="anthill-build"
550 >  <target name="anthill-build">
551 >  
552 >    <!-- Override this in user.properties -->
553 >    <property name="tiger.home" location="e:/j2sdk1.5.0"/>
554 >    
555 >    <exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java">
556 >      <arg value="-Xmx256000000"/>
557 >      <!-- classpath of new JVM -->
558 >      <arg value="-classpath"/> <arg path="${java.class.path}"/>
559 >      <!-- location of Ant home directory -->
560 >      <arg value="-Dant.home=${ant.home}"/>
561 >      <!-- the Ant main class -->
562 >      <arg value="org.apache.tools.ant.Main"/>
563 >      <!-- The build file -->
564 >      <arg value="-buildfile"/>  <arg value="build.xml"/>
565 >      <!-- the target to build on the new Ant instance -->
566 >      <arg value="-DJAVA_HOME=${tiger.home}"/>
567 >      <arg value="do-anthill-build"/>
568 >    </exec>
569 >  </target>
570 >  
571 >  <target name="do-anthill-build"
572            depends="jar, test, docs, dist-docs"/>
573  
574    <target name="anthill-publish">
# Line 749 | Line 591
591    </target>
592  
593  
594 <  <target name="ng" depends="test">
595 <    <java classname="SuperfluousAbstract" fork="true">
594 >  <!-- Standalone sample program -->
595 >  
596 >  <target name="sample" depends="jar">
597 >  
598 >    <mkdir dir="${build.testcases.dir}"/>
599 >    
600 >    <javac srcdir="${test.src.dir}"
601 >          destdir="${build.testcases.dir}"
602 >            debug="${build.debug}"
603 >       debuglevel="${build.debuglevel}"
604 >      deprecation="${build.deprecation}"
605 >           source="${build.sourcelevel}"
606 >             fork="true">
607 >            
608 >      <compilerarg value="${bootclasspath.args}"/>
609 >      <compilerarg line="${build.args}"/>
610 >      
611 >      <classpath refid="test.classpath"/>
612 >      
613 >      <include name="jsr166/test/Sample.java"/>
614 >      
615 >    </javac>
616 >    
617 >            
618 >    <java classname="jsr166.test.Sample" fork="true">
619 >      <jvmarg value="${bootclasspath.args}"/>
620 >      <classpath refid="test.classpath"/>
621 >    </java>
622 >  </target>
623  
755      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
624  
625 <    </java>
625 >
626 >  <!-- Backward compatibility, work in progress (some files not checked in) -->
627 >
628 >
629 >
630 >  <property name="pretiger.src.dir"     location="${build.dir}/pretiger/src"/>
631 >  <property name="build.pretiger.dir"   location="${build.dir}/pretiger/classes"/>
632 >  <property name="pretiger.jar"         location="${build.lib.dir}/jsr166-pretiger.jar"/>
633 >  <property name="pretiger.sourcelevel" value="1.4"/>
634 >  
635 >  <target name="defang"
636 >       depends="init"
637 >   description="Generates pre-Tiger compatible source">
638 >  
639 >    <delete dir="${pretiger.src.dir}"/>
640 >    <mkdir dir="${pretiger.src.dir}"/>
641 >  
642 >    <exec executable="perl">
643 >      <arg file="etc/defang.pl"/>
644 >      <!-- <arg value="-v"/> -->
645 >      <arg value="-s"/> <arg file="${src.dir}"/>
646 >      <arg value="-t"/> <arg file="${pretiger.src.dir}"/>
647 >    </exec>
648 >    
649 >  </target>
650 >
651 >  <target name="compile-pretiger"
652 >          depends="init, configure-compiler, defang"
653 >          description="Compiles pre-Tiger sources to build folder">
654 >
655 >    <mkdir dir="${build.pretiger.dir}"/>
656 >
657 >    <javac srcdir="${pretiger.src.dir}"
658 >          destdir="${build.pretiger.dir}"
659 >            debug="${build.debug}"
660 >       debuglevel="${build.debuglevel}"
661 >      deprecation="${build.deprecation}"
662 >           source="${pretiger.sourcelevel}"
663 >             fork="true">
664 >
665 >      <compilerarg line="${build.args}"/>
666 >      <exclude name="**/Thread.java"/>
667 >
668 >    </javac>
669 >
670    </target>
671 +  
672 +  <target name="pretiger" depends="compile-pretiger">
673  
674 +    <mkdir dir="${build.lib.dir}"/>
675 +    
676 +    <jar destfile="${pretiger.jar}">
677 +      <fileset dir="${build.pretiger.dir}">
678 +      </fileset>
679 +    </jar>
680 +    
681 +  </target>
682  
683   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines