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.58 by tim, Mon Sep 15 15:13:35 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 34 | Line 33
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"/>
37  <property name="build.sinjdocs.dir"   location="${build.dir}/sinjdocs"/>
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"/>
43  <property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/>
41  
42    <!-- Source locations -->
43    <property name="src.dir"              location="${basedir}/src/main"/>
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 56 | 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 <  <property name="sinjdoc.jar"          location="${lib.dir}/sinjdoc.jar"/>
59 <
57 >  
58 >  <!-- Bootclasspath argument -->
59 >  <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
60  
61 <  <!-- Files excluded from dist-docs -->
62 <  <patternset id="docs.exclusion">
63 <    <exclude name="java/util/Random.*"/>
64 <    <exclude name="sun/misc/Unsafe.*"/>
65 <  </patternset>
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  
77    <property name="prepare.src.dir" value="${src.dir}"/>
78
76      <mkdir dir="${build.classes.dir}"/>
77  
78 <    <javac srcdir="${prepare.src.dir}"
78 >    <javac srcdir="${src.dir}"
79            destdir="${build.classes.dir}"
80              debug="${build.debug}"
81         debuglevel="${build.debuglevel}"
# Line 93 | Line 90
90    </target>
91  
92  
96  <target name="jar"
97          depends="init-jar, native-jar"
98          description="Builds library jar from compiled sources"/>
99
100
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
93  
94 <  <target name="checkstyle"
95 <          depends="filter-src"
96 <          description="Reports on style errors in Java source (verbose, mostly chaff)">
94 >  <target name="jar"
95 >          depends="compile"
96 >          description="Builds library jar from compiled sources">
97  
98 <    <taskdef resource="checkstyletask.properties"
111 <            classpath="${lib.dir}/checkstyle-all-3.1.jar"/>
98 >    <mkdir dir="${build.lib.dir}"/>
99  
100 <    <mkdir dir="${build.checkstyle.dir}"/>
101 <    
102 <    <checkstyle config="etc/checkstyle/sun_checks.xml"
116 <       failOnViolation="false">
117 <      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
118 <      <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
119 <    </checkstyle>
120 <    
121 <    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
122 <          out="${build.checkstyle.dir}/checkstyle-report.html"
123 <        style="${stylesheet.dir}/checkstyle-frames.xsl"/>
100 >    <jar destfile="${product.jar}">
101 >      <fileset dir="${build.classes.dir}"/>
102 >    </jar>
103  
104    </target>
105  
106  
128  <target name="doccheck"
129          depends="filter-doccheck"
130          description="Reports on javadoc style errors">
131
132    <delete dir="${build.doccheck.dir}"/>
133    <mkdir dir="${build.doccheck.dir}"/>
134
135    <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
136         docletpath="${lib.dir}/doccheck.jar"
137            destdir="${build.doccheck.dir}">
138      <packageset dir="${build.dc-filter.dir}"/>
139    </javadoc>
107  
108 <    <echo>DocCheck output is in ${build.doccheck.dir}</echo>
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  
143  </target>
112  
113  
114    <target name="docs"
147          depends="filter-src"
115            description="Builds javadocs with custom tags to build folder">
116  
117      <delete dir="${build.javadocs.dir}"/>
# Line 153 | 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:"/>
127  
128 <      <packageset dir="${build.filter.src.dir}"/>
128 >      <packageset dir="${src.dir}"/>
129  
130      </javadoc>
131  
132    </target>
133  
134  
168  <target name="sinjdocs"
169          depends="configure-tests"
170          description="Builds javadocs with custom tags to build folder">
135  
136 <    <delete dir="${build.sinjdocs.dir}"/>
137 <    <mkdir dir="${build.sinjdocs.dir}"/>
136 >  <target name="doccheck"
137 >          depends="filter-doccheck"
138 >          description="Reports on javadoc style errors">
139  
140 <    <java classname="net.cscott.sinjdoc.Main" fork="true">
140 >    <delete dir="${build.doccheck.dir}"/>
141 >    <mkdir dir="${build.doccheck.dir}"/>
142  
143 <      <jvmarg value="-Xbootclasspath/p:${test.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 <      <classpath>
180 <        <pathelement location="${sinjdoc.jar}"/>
181 <        <pathelement location="${lib.dir}/jutil.jar"/>
182 <        <pathelement location="${lib.dir}/cup.jar"/>
183 <        <path refid="test.classpath"/>
184 <      </classpath>
185 <
186 <      <!-- <arg value="-help"/> -->
187 <      <!-- <arg value="-verbose"/> -->
188 <      <!-- <arg value="-link"/>  <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> -->
189 <      
190 <      <arg value="-d"/>          <arg value="${build.sinjdocs.dir}"/>
191 <      <arg value="-sourcepath"/> <arg value="${src.dir}"/>
192 <      <arg value="-overview"/>   <arg value="${src.dir}/intro.html"/>
193 <      <arg value="-source"/>     <arg value="${build.sourcelevel}"/>
194 <      
195 <      <arg value="java.lang"/>
196 <      <arg value="java.util"/>
197 <      <arg value="java.util.concurrent"/>
198 <      <arg value="java.util.concurrent.atomic"/>
199 <      <arg value="java.util.concurrent.locks"/>
149 >    <echo>DocCheck output is in ${build.doccheck.dir}</echo>
150  
151 +  </target>
152  
153 <    </java>
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">
# Line 227 | Line 199
199  
200    </target>
201  
202 +
203 +
204    <target name="clean"
205            description="Removes all build products">
206  
# Line 237 | Line 211
211    </target>
212  
213  
214 +
215    <target name="dist-clean"
216            description="Removes all build and distribution products">
217  
# Line 245 | Line 220
220    </target>
221  
222  
223 +
224    <target name="dist-docs"
249          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 278 | Line 253
253    </target>
254  
255  
281  <target name="init-jar">
282
283    <mkdir dir="${build.lib.dir}"/>
284
285  </target>
286
287
288  <target name="native-jar"
289          depends="compile">
290
291    <jar destfile="${product.jar}">
292      <fileset dir="${build.classes.dir}"/>
293    </jar>
294
295  </target>
296
297
256    <target name="dist-jar"
257            depends="clean, jar">
258  
# Line 330 | Line 288
288      <copy todir="${build.filter.src.dir}">
289        <fileset dir="${src.dir}">
290          <exclude name="**/*.html"/>
291 <        <patternset refid="docs.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 346 | 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    </target>
# Line 412 | Line 378
378  
379      <mkdir dir="${build.testcases.dir}"/>
380  
381 <    <javac srcdir="${test.src.dir}"
381 >    <javac srcdir="${tck.src.dir}"
382            destdir="${build.testcases.dir}"
383              debug="${build.debug}"
384         debuglevel="${build.debuglevel}"
# Line 420 | Line 386
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}"
398 +            debug="${build.debug}"
399 +       debuglevel="${build.debuglevel}"
400 +      deprecation="${build.deprecation}"
401 +           source="${build.sourcelevel}"
402 +             fork="true">
403 +
404 +      <include name="jsr166/test/**"/>
405 +      
406 +      <compilerarg value="${bootclasspath.args}"/>
407 +      <compilerarg line="${build.args}"/>
408        
409 <      <include name="java/**"/>
427 <      <include name="jsr166/**"/>
409 >      <classpath refid="test.classpath"/>
410  
411      </javac>
412  
# Line 446 | Line 428
428                      dir="${build.reports.dir}"
429                     fork="true">
430  
431 <      <jvmarg value="-Xbootclasspath:${test.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="${tck.src.dir}">
439 +          <include name="**/${testcase}Test.java"/>
440 +        </fileset>
441          <fileset dir="${test.src.dir}">
442 <          <include name="java/**/${testcase}Test.java"/>
456 <          <include name="jsr166/**/${testcase}Test.java"/>
442 >          <include name="jsr166/test/**/${testcase}Test.java"/>
443          </fileset>
444        </batchtest>
445  
# Line 497 | Line 483
483      </condition>
484  
485      <property name="warnunchecked.arg" value=""/>
500    
501    <condition property="prepare.src.dir" value="${build.dir}/prepare-src">
502      <istrue value="${build.nothreads}"/>
503    </condition>
486  
487  
488      <!-- Common options in javac invocations -->
# Line 509 | Line 491
491    </target>
492  
493  
512  <target name="prepare-src"
513          depends="configure-compiler"
514          if="prepare.src.dir">
515
516    <mkdir dir="${prepare.src.dir}"/>
517    <copy todir="${prepare.src.dir}">
518      <fileset dir="${src.dir}">
519        <exclude name="java/lang/**"/>
520      </fileset>
521    </copy>
522
523  </target>
524
525
494    <target name="configure-tests"
495         depends="configure-compiler">
496  
# Line 530 | Line 498
498      <available property="junit.available"
499                 classname="junit.framework.Protectable"/>
500  
533    <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
534          unless="junit.available"/>
535
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      <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
512            unless="xalan.available"/>
513 <
543 <
544 <    <!--
545 <     ! Bootclasspath munging for testing, so JUnit can test our local
546 <     ! modifications to java.*.
547 <     -->
548 <
549 <    <path id="test.classpath">
550 <      <pathelement location="${product.jar}"/>
551 <      <pathelement location="${rt.jar}"/>
552 <      <pathelement location="${junit.jar}"/>
553 <      <pathelement location="${build.testcases.dir}"/>
554 <    </path>
555 <
556 <    <path id="test.bootclasspath">
557 <      <path refid="test.classpath"/>
558 <    </path>
559 <
560 <    <!-- Flatten test classpaths into platform-appropriate strings -->
561 <    <property name="test.classpath"         refid="test.classpath"/>
562 <    <property name="test.bootclasspath"     refid="test.bootclasspath"/>
513 >    -->
514  
515    </target>
516  
# Line 611 | Line 562
562    </target>
563  
564  
614  <target name="ng" depends="test">
615    <java classname="SuperfluousAbstract" fork="true">
565  
566 <      <jvmarg value="-Xbootclasspath/p:${test.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