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.46 by tim, Sat Jul 26 13:17:51 2003 UTC vs.
Revision 1.60 by tim, Mon Dec 8 03:10:54 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.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.dc-filter.dir"  location="${build.dir}/filterdocchk"/>
41  
42    <!-- Source locations -->
43    <property name="src.dir"              location="${basedir}/src/main"/>
45  <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="ant.src.dir"          location="${basedir}/etc/ant"/>
47    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>
48    <property name="lib.dir"              location="${basedir}/lib"/>
# Line 55 | Line 54
54    <!-- Jar locations -->
55    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
56    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
57 <  <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>
58 <
59 <
60 <
61 <  <!-- Files excluded from dist-docs and emulation jar -->
62 <  <patternset id="unsafe.exclusion">
63 <    <exclude name="java/util/Random.*"/>
64 <    <exclude name="sun/misc/Unsafe.*"/>
65 <  </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>
57 >  
58 >  <!-- Bootclasspath argument -->
59 >  <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
60 >
61 >  <!-- Test classpath -->
62 >  <path id="test.classpath">
63 >    <pathelement location="${build.testcases.dir}"/>
64 >    <pathelement location="${junit.jar}"/>
65 >  </path>
66  
67  
68  
69    <!-- Main targets -->
70  
71 +
72    <target name="compile"
73 <          depends="init, configure-compiler, prepare-src"
73 >          depends="init, configure-compiler"
74            description="Compiles main sources to build folder">
75  
84    <property name="prepare.src.dir" value="${src.dir}"/>
85
76      <mkdir dir="${build.classes.dir}"/>
77  
78 < <!--
89 <    <echo>javac ${gjc.args}</echo>
90 <    <echo>bootclasspath=${compile.bootclasspath}</echo>
91 < -->
92 <
93 <    <javac srcdir="${prepare.src.dir}"
78 >    <javac srcdir="${src.dir}"
79            destdir="${build.classes.dir}"
80              debug="${build.debug}"
81         debuglevel="${build.debuglevel}"
# Line 98 | Line 83
83             source="${build.sourcelevel}"
84               fork="true">
85  
86 <      <compilerarg    line="${gjc.args}"/>
102 <      <bootclasspath refid="compile.bootclasspath"/>
86 >      <compilerarg line="${build.args}"/>
87  
88      </javac>
89  
90    </target>
91  
92  
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"
115          depends="init, configure-tests, report-tests"
116          description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
93  
94 +  <target name="jar"
95 +          depends="compile"
96 +          description="Builds library jar from compiled sources">
97  
98 <  <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"
124 <            classpath="${lib.dir}/checkstyle-all-2.4.jar"/>
98 >    <mkdir dir="${build.lib.dir}"/>
99  
100 <    <checkstyle>
101 <      <formatter type="plain"/>  <!-- also available: type="xml" -->
102 <      <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
129 <    </checkstyle>
100 >    <jar destfile="${product.jar}">
101 >      <fileset dir="${build.classes.dir}"/>
102 >    </jar>
103  
104    </target>
105  
106  
134  <target name="doccheck"
135          depends="filter-src"
136          description="Reports on javadoc style errors (not working yet)">
107  
108 <    <delete dir="${build.doccheck.dir}"/>
109 <    <mkdir dir="${build.doccheck.dir}"/>
110 <
141 <    <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
142 <         docletpath="${lib.dir}/doccheck.jar"
143 <            destdir="${build.doccheck.dir}">
144 <      <packageset dir="${build.filter.src.dir}"/>
145 <    </javadoc>
108 >  <target name="test"
109 >          depends="init, configure-tests, report-tests"
110 >          description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
111  
147  </target>
112  
113  
114    <target name="docs"
151          depends="filter-src"
115            description="Builds javadocs with custom tags to build folder">
116  
117      <delete dir="${build.javadocs.dir}"/>
# Line 157 | Line 120
120      <javadoc destdir="${build.javadocs.dir}"
121                  link="http://java.sun.com/j2se/1.4.1/docs/api"
122              overview="${src.dir}/intro.html"
123 <              source="${build.docsourcelevel}">
123 >              source="${build.sourcelevel}">
124  
125        <tag name="revised" description="Last revised:"/>
126        <tag name="spec"    description="Specified by:"/>
164      <tag name="editor"  description="Last edited by:"/>
165      <tag name="fixme"   description="FIX ME:"/>
127  
128 <      <packageset dir="${build.filter.src.dir}"/>
128 >      <packageset dir="${src.dir}"/>
129  
130      </javadoc>
131  
132    </target>
133  
134  
174  <target name="strip"
175          depends="init, configure-compiler"
176          description="Strip generics from java source (not working yet)">
135  
136 <    <mkdir dir="${build.stripped.dir}"/>
136 >  <target name="doccheck"
137 >          depends="filter-doccheck"
138 >          description="Reports on javadoc style errors">
139  
140 <    <!--
141 <     # 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}"
188 <       debuglevel="${build.debuglevel}"
189 <      deprecation="${build.deprecation}"
190 <           source="${build.sourcelevel}"
191 <             fork="true">
140 >    <delete dir="${build.doccheck.dir}"/>
141 >    <mkdir dir="${build.doccheck.dir}"/>
142  
143 <      <compilerarg    line="${gjc.args} -s"/>
144 <      <bootclasspath refid="compile.bootclasspath"/>
143 >    <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
144 >         docletpath="${lib.dir}/doccheck.jar"
145 >            destdir="${build.doccheck.dir}">
146 >      <packageset dir="${build.dc-filter.dir}"/>
147 >    </javadoc>
148  
149 <    </javac>
149 >    <echo>DocCheck output is in ${build.doccheck.dir}</echo>
150  
151    </target>
152  
153  
154 +
155 +  <target name="checkstyle"
156 +          depends="filter-src"
157 +          description="Reports on style errors in Java source (verbose, mostly chaff)">
158 +
159 +    <taskdef resource="checkstyletask.properties"
160 +            classpath="${lib.dir}/checkstyle-all-3.1.jar"/>
161 +
162 +    <mkdir dir="${build.checkstyle.dir}"/>
163 +    
164 +    <checkstyle config="etc/checkstyle/sun_checks.xml"
165 +       failOnViolation="false">
166 +      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
167 +      <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
168 +    </checkstyle>
169 +    
170 +    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
171 +          out="${build.checkstyle.dir}/checkstyle-report.html"
172 +        style="${stylesheet.dir}/checkstyle-frames.xsl"/>
173 +
174 +  </target>
175 +
176 +  
177 +
178    <target name="dist"
179            depends="init, dist-clean, dist-jar, dist-docs"
180            description="Puts all distributable products in single hierarchy"/>
181  
182 +
183 +
184    <target name="release"
185            depends="dist"
186            description="Puts entire CVS tree, plus distribution productions, in a jar">
187  
209 <!--
210    #keep build dir? - dl
211    <delete dir="${build.dir}"/>
212 -->
188      <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
189  
190      <jar basedir="${basedir}" destfile="${release.jar}">
191 +      <!-- <exclude name="build/**"/> -->
192        <exclude name="${release.jar}"/>
193        <exclude name="user.properties"/>
194        <exclude name="etc/notes/**"/>
195 <      <exclude name="lib/gjc/2.1/**"/>
195 >      <exclude name="src/emulation/**"/>
196        <exclude name="**/SyntaxTest.java"/>
197 +      <exclude name="**/SuperfluousAbstract.java"/>
198      </jar>
199  
200    </target>
201  
202 +
203 +
204    <target name="clean"
205            description="Removes all build products">
206  
# Line 232 | Line 211
211    </target>
212  
213  
214 +
215    <target name="dist-clean"
216            description="Removes all build and distribution products">
217  
# Line 240 | Line 220
220    </target>
221  
222  
223 +
224    <target name="dist-docs"
244          depends="filter-src"
225            description="Builds javadocs without custom tags to dist folder">
226  
227      <delete dir="${dist.javadocs.dir}"/>
228      <mkdir dir="${dist.javadocs.dir}"/>
229  
230      <javadoc destdir="${dist.javadocs.dir}"
231 <                link="http://java.sun.com/j2se/1.4.1/docs/api"
231 >                link="http://java.sun.com/j2se/1.4.2/docs/api"
232              overview="${src.dir}/intro.html"
233 <              source="${build.docsourcelevel}">
233 >              source="${build.sourcelevel}">
234  
235 <      <packageset dir="${build.filter.src.dir}"/>
235 >      <packageset dir="${src.dir}"/>
236  
237      </javadoc>
238  
# Line 268 | Line 248
248      <!-- Version is kept in a separate file -->
249      <loadfile property="version" srcFile="version.properties"/>
250      <echo>Building JSR-166 version ${version}</echo>
251 <
272 <  </target>
273 <
274 <
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>
289 <
290 <  </target>
291 <
292 <
293 <  <target name="compile-emulation"
294 <          depends="init, configure-compiler"
295 <          if="build.emulation.true">
296 <
297 <    <mkdir dir="${build.emulation.dir}"/>
298 <
299 <    <javac srcdir="${emulation.src.dir}"
300 <          destdir="${build.emulation.dir}"
301 <            debug="${build.debug}"
302 <       debuglevel="${build.debuglevel}"
303 <      deprecation="${build.deprecation}"
304 <           source="${build.sourcelevel}"
305 <             fork="true">
306 <
307 <      <compilerarg    line="${gjc.args}"/>
308 <      <bootclasspath refid="compile.bootclasspath"/>
309 <
310 <    </javac>
311 <
312 <  </target>
313 <
314 <
315 <  <target name="emulation-jar"
316 <          depends="compile-emulation"
317 <          if="build.emulation.true">
318 <
319 <
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>
251 >    <echo>java.home is ${java.home}</echo>
252  
253    </target>
254  
# Line 360 | Line 285
285        </fileset>
286      </copy>
287  
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
288      <copy todir="${build.filter.src.dir}">
289        <fileset dir="${src.dir}">
290          <exclude name="**/*.html"/>
291 <        <patternset refid="unsafe.exclusion"/>
291 >        <!-- Files excluded from dist-docs -->
292 >        <exclude name="java/util/Random.*"/>
293 >        <exclude name="sun/misc/Unsafe.*"/>
294        </fileset>
295 +      <!--
296        <filterchain>
297 +      -->
298  
299          <!--
300           # This filter gets rid of angle-bracketed type parameters
# Line 385 | Line 308
308           #   tweaking.)
309           -->
310  
311 +        <!--
312          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
313                        classpath="${build.ant.dir}">
314            <param name="notmatching" value="^\s+\*\s.*$"/>
315            <param name="pattern"     value="&lt;[^|>()]+?>+"/>
316            <param name="replacement" value=" "/>
317          </filterreader>
318 +        -->
319  
320 +      <!--
321 +      </filterchain>
322 +      -->
323 +    </copy>
324  
325 <        <!--
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 <         -->
325 >  </target>
326  
402        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
403                      classpath="${build.ant.dir}">
404          <param name="matching"    value="^//@.*$"/>
405          <param name="pattern"     value="^//@"/>
406          <param name="replacement" value=""/>
407        </filterreader>
327  
328 +  <target name="filter-doccheck"
329 +          depends="filter-src">
330 +
331 +    <mkdir dir="${build.dc-filter.dir}"/>
332  
333 +    <copy todir="${build.dc-filter.dir}">
334 +      <fileset dir="${build.filter.src.dir}">
335 +        <include name="**/*.html"/>
336 +      </fileset>
337 +    </copy>
338 +
339 +    <property name="generic.declarations"
340 +             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 {}"
341 +    />
342 +
343 +    <copy todir="${build.dc-filter.dir}">
344 +      <fileset dir="${build.filter.src.dir}">
345 +        <exclude name="**/*.html"/>
346 +      </fileset>
347 +      <filterchain>
348          <!--
349 <         # The next two filters try to make the source look like
349 >         # These two filters try to make the source look like
350           # something that doccheck can process. The first removes
351           # -source 1.4 assertions and the second adds in a bunch
352           # of single letter public nested marker interfaces so that
353           # the generic type parameters are recognized.
416         #
417         # Currently commented out because doccheck doesn't work. :-(
354           -->
355  
420        <!--
356          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
357                        classpath="${build.ant.dir}">
358            <param name="matching"    value="^\s*assert[\s ].*$"/>
# Line 427 | Line 362
362  
363          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
364                        classpath="${build.ant.dir}">
365 <          <param name="matching"    value="^(.*(class|interface|implements) .*|)\{.*$"/>
365 >          <param name="matching"    value="^([^*]*(class|interface|implements) .*|)\{.*$"/>
366            <param name="pattern"     value="$"/>
367            <param name="replacement" value=" ${generic.declarations}"/>
368          </filterreader>
434        -->
369  
370        </filterchain>
371      </copy>
# Line 444 | Line 378
378  
379      <mkdir dir="${build.testcases.dir}"/>
380  
381 < <!--
382 <    <echo>javac ${gjc.args}</echo>
383 <    <echo>bootclasspath=${test.compile.bootclasspath}</echo>
384 <    <echo>classpath="${test.classpath}"</echo>
385 < -->
381 >    <javac srcdir="${tck.src.dir}"
382 >          destdir="${build.testcases.dir}"
383 >            debug="${build.debug}"
384 >       debuglevel="${build.debuglevel}"
385 >      deprecation="${build.deprecation}"
386 >           source="${build.sourcelevel}"
387 >             fork="true">
388 >
389 >      <compilerarg value="${bootclasspath.args}"/>
390 >      <compilerarg line="${build.args}"/>
391 >      
392 >      <classpath refid="test.classpath"/>
393 >
394 >    </javac>
395  
396      <javac srcdir="${test.src.dir}"
397            destdir="${build.testcases.dir}"
# Line 458 | Line 401
401             source="${build.sourcelevel}"
402               fork="true">
403  
404 <      <compilerarg    line="${gjc.args}"/>
405 <      <bootclasspath refid="test.compile.bootclasspath"/>
406 <      <classpath     refid="test.classpath"/>
404 >      <include name="jsr166/test/**"/>
405 >      
406 >      <compilerarg value="${bootclasspath.args}"/>
407 >      <compilerarg line="${build.args}"/>
408 >      
409 >      <classpath refid="test.classpath"/>
410  
411      </javac>
412  
# Line 482 | Line 428
428                      dir="${build.reports.dir}"
429                     fork="true">
430  
431 <      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
431 >      <jvmarg value="${bootclasspath.args}"/>
432 >      
433 >      <classpath refid="test.classpath"/>
434  
435        <formatter type="xml"/>
436  
437        <batchtest todir="${build.reports.dir}">
438 <        <fileset dir="${test.src.dir}">
438 >        <fileset dir="${tck.src.dir}">
439            <include name="**/${testcase}Test.java"/>
440          </fileset>
441 +        <fileset dir="${test.src.dir}">
442 +          <include name="jsr166/test/**/${testcase}Test.java"/>
443 +        </fileset>
444        </batchtest>
445  
446      </junit>
# Line 500 | Line 451
451    <target name="report-tests"
452            depends="run-tests">
453  
454 <    <!-- Sets junit.report.format to frames if Xalan is present,
454 >    <!-- Sets junit.report.format to frames if redirection is present,
455           otherwise sets it to noframes. -->
456      <available property="junit.report.format"
457                    value="frames"
# Line 525 | Line 476
476  
477    <target name="configure-compiler">
478  
479 <    <property name="gjc.version"
529 <             value="2.2"/>
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"/>
479 >    <property name="unchecked.option" value="-Xlint:unchecked"/>
480  
481 <    <property name="javac.jar"
482 <          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}"/>
481 >    <condition property="warnunchecked.arg" value="${unchecked.option}">
482 >      <istrue value="${build.warnunchecked}"/>
483      </condition>
484  
485      <property name="warnunchecked.arg" value=""/>
486  
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
487  
488      <!-- Common options in javac invocations -->
489 <    <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>
489 >    <property name="build.args" value="${warnunchecked.arg}"/>
490  
491    </target>
492  
# Line 627 | Line 498
498      <available property="junit.available"
499                 classname="junit.framework.Protectable"/>
500  
501 +    <!-- Xalan -->
502 +    <available property="xalan.available"
503 +               classname="org.apache.xalan.Version"/>
504 +
505 +              
506 +    <!-- Ant 1.6beta and later don't need or want this check -->
507 +    <!--    
508      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
509            unless="junit.available"/>
510  
511 <
512 <    <!--
513 <     ! 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"/>
511 >    <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
512 >          unless="xalan.available"/>
513 >    -->
514  
515    </target>
516  
# Line 664 | Line 518
518  
519    <!-- Anthill targets -->
520  
521 <  <target name="anthill-build"
521 >  <target name="anthill-build">
522 >  
523 >    <!-- Override this in user.properties -->
524 >    <property name="tiger.home" location="e:/j2sdk1.5.0"/>
525 >    
526 >    <exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java">
527 >      <arg value="-Xmx256000000"/>
528 >      <!-- classpath of new JVM -->
529 >      <arg value="-classpath"/> <arg path="${java.class.path}"/>
530 >      <!-- location of Ant home directory -->
531 >      <arg value="-Dant.home=${ant.home}"/>
532 >      <!-- the Ant main class -->
533 >      <arg value="org.apache.tools.ant.Main"/>
534 >      <!-- The build file -->
535 >      <arg value="-buildfile"/>  <arg value="build.xml"/>
536 >      <!-- the target to build on the new Ant instance -->
537 >      <arg value="-DJAVA_HOME=${tiger.home}"/>
538 >      <arg value="do-anthill-build"/>
539 >    </exec>
540 >  </target>
541 >  
542 >  <target name="do-anthill-build"
543            depends="jar, test, docs, dist-docs"/>
544  
545    <target name="anthill-publish">
# Line 687 | Line 562
562    </target>
563  
564  
690  <target name="ng" depends="test">
691    <java classname="SuperfluousAbstract" fork="true">
565  
566 <      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
566 >  <!-- Backward compatibility, work in progress (some files not checked in) -->
567 >
568  
569 +  <target name="compat" depends="jar">
570 +  
571 +    <mkdir dir="${build.testcases.dir}"/>
572 +    
573 +    <javac srcdir="${test.src.dir}"
574 +          destdir="${build.testcases.dir}"
575 +            debug="${build.debug}"
576 +       debuglevel="${build.debuglevel}"
577 +      deprecation="${build.deprecation}"
578 +           source="${build.sourcelevel}"
579 +             fork="true">
580 +            
581 +      <compilerarg value="${bootclasspath.args}"/>
582 +      <compilerarg line="${build.args}"/>
583 +      
584 +      <classpath refid="test.classpath"/>
585 +      
586 +      <include name="Compatibility.java"/>
587 +      
588 +    </javac>
589 +    
590 +            
591 +    <java classname="Compatibility" fork="true">
592 +      <jvmarg value="${bootclasspath.args}"/>
593 +      <classpath refid="test.classpath"/>
594      </java>
595    </target>
596  
597  
598 +
599 +  <property name="pretiger.src.dir"     location="${build.dir}/pretiger/src"/>
600 +  <property name="build.pretiger.dir"   location="${build.dir}/pretiger/classes"/>
601 +  <property name="pretiger.jar"         location="${build.lib.dir}/jsr166-pretiger.jar"/>
602 +  <property name="pretiger.sourcelevel" value="1.4"/>
603 +  
604 +  <target name="defang"
605 +       depends="init"
606 +   description="Generates pre-Tiger compatible source">
607 +  
608 +    <delete dir="${pretiger.src.dir}"/>
609 +    <mkdir dir="${pretiger.src.dir}"/>
610 +  
611 +    <exec executable="perl">
612 +      <arg file="etc/defang.pl"/>
613 +      <!-- <arg value="-v"/> -->
614 +      <arg value="-s"/> <arg file="${src.dir}"/>
615 +      <arg value="-t"/> <arg file="${pretiger.src.dir}"/>
616 +    </exec>
617 +    
618 +  </target>
619 +
620 +  <target name="compile-pretiger"
621 +          depends="init, configure-compiler, defang"
622 +          description="Compiles pre-Tiger sources to build folder">
623 +
624 +    <mkdir dir="${build.pretiger.dir}"/>
625 +
626 +    <javac srcdir="${pretiger.src.dir}"
627 +          destdir="${build.pretiger.dir}"
628 +            debug="${build.debug}"
629 +       debuglevel="${build.debuglevel}"
630 +      deprecation="${build.deprecation}"
631 +           source="${pretiger.sourcelevel}"
632 +             fork="true">
633 +
634 +      <compilerarg line="${build.args}"/>
635 +      <exclude name="**/Thread.java"/>
636 +
637 +    </javac>
638 +
639 +  </target>
640 +  
641 +  <target name="pretiger" depends="compile-pretiger">
642 +
643 +    <mkdir dir="${build.lib.dir}"/>
644 +    
645 +    <jar destfile="${pretiger.jar}">
646 +      <fileset dir="${build.pretiger.dir}">
647 +      </fileset>
648 +    </jar>
649 +    
650 +  </target>
651 +
652   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines