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.36 by tim, Thu May 29 17:29:08 2003 UTC vs.
Revision 1.51 by tim, Thu Aug 7 03:49:48 2003 UTC

# Line 39 | Line 39
39    <property name="build.reports.dir"    location="${build.dir}/reports"/>
40    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>
41    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
42 +  <property name="build.filter.doccheck.dir" location="${build.dir}/filterdocchk"/>
43  
44    <!-- Source locations -->
45    <property name="src.dir"              location="${basedir}/src/main"/>
# Line 56 | Line 57
57    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
58    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
59    <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>
60 +  <property name="sinjdoc.jar"          location="${lib.dir}/sinjdoc.jar"/>
61  
62  
63 <
64 <  <!-- Files excluded from emulation and dist-docs -->
63 <  <patternset id="emulation.excludes">
63 >  <!-- Files excluded from dist-docs and emulation jar -->
64 >  <patternset id="unsafe.exclusion">
65      <exclude name="java/util/Random.*"/>
66      <exclude name="sun/misc/Unsafe.*"/>
67    </patternset>
68  
69 +  <!-- Files excludes from emulation jar -->
70 +  <patternset id="atomic.exclusion">
71 +    <exclude name="java/util/concurrent/atomic/AtomicBoolean*"/>
72 +    <exclude name="java/util/concurrent/atomic/AtomicInteger*"/>
73 +    <exclude name="java/util/concurrent/atomic/AtomicLong*"/>
74 +    <exclude name="java/util/concurrent/atomic/AtomicReference*"/>
75 +    <exclude name="java/util/concurrent/locks/LockSupport*"/>
76 +    <exclude name="java/util/concurrent/locks/ReentrantLock*"/>
77 +  </patternset>
78 +
79  
80  
81    <!-- Main targets -->
# Line 77 | Line 88
88  
89      <mkdir dir="${build.classes.dir}"/>
90  
91 + <!--
92 +    <echo>javac ${gjc.args}</echo>
93 +    <echo>bootclasspath=${compile.bootclasspath}</echo>
94 + -->
95 +
96      <javac srcdir="${prepare.src.dir}"
97            destdir="${build.classes.dir}"
98              debug="${build.debug}"
# Line 85 | Line 101
101             source="${build.sourcelevel}"
102               fork="true">
103  
104 <      <bootclasspath refid="javac.bootclasspath"/>
105 <      <compilerarg line="${build.javac.args}"/>
104 >      <compilerarg    line="${gjc.args}"/>
105 >      <bootclasspath refid="compile.bootclasspath"/>
106  
107      </javac>
108  
# Line 119 | Line 135
135  
136  
137    <target name="doccheck"
138 <          depends="filter-src"
139 <          description="Reports on javadoc style errors (not working yet)">
138 >          depends="filter-doccheck"
139 >          description="Reports on javadoc style errors">
140  
141      <delete dir="${build.doccheck.dir}"/>
142      <mkdir dir="${build.doccheck.dir}"/>
# Line 128 | Line 144
144      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
145           docletpath="${lib.dir}/doccheck.jar"
146              destdir="${build.doccheck.dir}">
147 <      <packageset dir="${build.filter.src.dir}"/>
147 >      <packageset dir="${build.filter.doccheck.dir}"/>
148      </javadoc>
149  
150 +    <echo>DocCheck output is in ${build.doccheck.dir}</echo>
151 +
152    </target>
153  
154  
# Line 158 | Line 176
176    </target>
177  
178  
179 +  <target name="sinjdocs"
180 +          depends="configure-tests"
181 +          description="Builds javadocs with custom tags to build folder">
182 +
183 +    <delete dir="${build.javadocs.dir}"/>
184 +    <mkdir dir="${build.javadocs.dir}"/>
185 +
186 +    <java classname="net.cscott.sinjdoc.Main" fork="true">
187 +
188 +      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
189 +
190 +      <classpath>
191 +        <pathelement location="${sinjdoc.jar}"/>
192 +        <pathelement location="${lib.dir}/jutil.jar"/>
193 +        <pathelement location="${lib.dir}/cup.jar"/>
194 +        <path refid="test.classpath"/>
195 +      </classpath>
196 +
197 +
198 +      <arg value="-d"/>          <arg value="${build.javadocs.dir}"/>
199 +      <arg value="-sourcepath"/> <arg value="${src.dir}"/>
200 +      <arg value="-overview"/>   <arg value="${src.dir}/intro.html"/>
201 +      <arg value="-source"/>     <arg value="${build.sourcelevel}"/>
202 +      <!-- <arg value="-verbose"/> -->
203 +      <!-- <arg value="-link"/>  <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> -->
204 +      <arg value="java.lang"/>
205 +      <arg value="java.util"/>
206 +      <arg value="java.util.concurrent"/>
207 +      <arg value="java.util.concurrent.atomic"/>
208 +      <arg value="java.util.concurrent.locks"/>
209 +
210 +      <!--
211 +      <arg value="-help"/>
212 +      -->
213 +
214 +    </java>
215 +
216 +  </target>
217 +
218 +
219    <target name="strip"
220            depends="init, configure-compiler"
221            description="Strip generics from java source (not working yet)">
# Line 177 | Line 235
235             source="${build.sourcelevel}"
236               fork="true">
237  
238 <      <bootclasspath refid="javac.bootclasspath"/>
239 <      <compilerarg line="${build.javac.args} -s"/>
238 >      <compilerarg    line="${gjc.args} -s"/>
239 >      <bootclasspath refid="compile.bootclasspath"/>
240  
241      </javac>
242  
# Line 189 | Line 247
247            depends="init, dist-clean, dist-jar, dist-docs"
248            description="Puts all distributable products in single hierarchy"/>
249  
250 +  <target name="release"
251 +          depends="dist"
252 +          description="Puts entire CVS tree, plus distribution productions, in a jar">
253 +
254 + <!--
255 +    #keep build dir? - dl
256 +    <delete dir="${build.dir}"/>
257 + -->
258 +    <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
259 +
260 +    <jar basedir="${basedir}" destfile="${release.jar}">
261 +      <exclude name="${release.jar}"/>
262 +      <exclude name="user.properties"/>
263 +      <exclude name="etc/notes/**"/>
264 +      <exclude name="lib/gjc/2.1/**"/>
265 +      <exclude name="**/SyntaxTest.java"/>
266 +    </jar>
267 +
268 +  </target>
269  
270    <target name="clean"
271            description="Removes all build products">
# Line 272 | Line 349
349             source="${build.sourcelevel}"
350               fork="true">
351  
352 <      <bootclasspath refid="javac.bootclasspath"/>
353 <      <compilerarg line="${build.javac.args}"/>
352 >      <compilerarg    line="${gjc.args}"/>
353 >      <bootclasspath refid="compile.bootclasspath"/>
354  
355      </javac>
356  
# Line 287 | Line 364
364  
365      <jar destfile="${product.jar}" duplicate="add">
366        <fileset dir="${build.classes.dir}">
367 <        <patternset refid="emulation.excludes"/>
367 >        <patternset refid="atomic.exclusion"/>
368 >        <patternset refid="unsafe.exclusion"/>
369        </fileset>
370        <fileset dir="${build.emulation.dir}"/>
371      </jar>
# Line 327 | Line 405
405        </fileset>
406      </copy>
407  
330    <!-- Not needed now, used for doccheck filtering:
331    <property name="generic.declarations"
332             value="public interface E {} public interface T {} public interface K {} public interface V {}"
333    />
334    -->
335
408      <copy todir="${build.filter.src.dir}">
409        <fileset dir="${src.dir}">
410          <exclude name="**/*.html"/>
411 <        <patternset refid="emulation.excludes"/>
411 >        <patternset refid="unsafe.exclusion"/>
412        </fileset>
413        <filterchain>
414  
# Line 372 | Line 444
444            <param name="pattern"     value="^//@"/>
445            <param name="replacement" value=""/>
446          </filterreader>
447 +      </filterchain>
448 +    </copy>
449 +
450 +  </target>
451  
452  
453 +
454 +
455 +  <target name="filter-doccheck"
456 +          depends="filter-src">
457 +
458 +    <mkdir dir="${build.filter.doccheck.dir}"/>
459 +
460 +    <copy todir="${build.filter.doccheck.dir}">
461 +      <fileset dir="${build.filter.src.dir}">
462 +        <include name="**/*.html"/>
463 +      </fileset>
464 +    </copy>
465 +
466 +    <property name="generic.declarations"
467 +             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 {}"
468 +    />
469 +
470 +    <copy todir="${build.filter.doccheck.dir}">
471 +      <fileset dir="${build.filter.src.dir}">
472 +        <exclude name="**/*.html"/>
473 +      </fileset>
474 +      <filterchain>
475          <!--
476 <         # The next two filters try to make the source look like
476 >         # These two filters try to make the source look like
477           # something that doccheck can process. The first removes
478           # -source 1.4 assertions and the second adds in a bunch
479           # of single letter public nested marker interfaces so that
480           # the generic type parameters are recognized.
383         #
384         # Currently commented out because doccheck doesn't work. :-(
481           -->
482  
387        <!--
483          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
484                        classpath="${build.ant.dir}">
485            <param name="matching"    value="^\s*assert[\s ].*$"/>
# Line 394 | Line 489
489  
490          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
491                        classpath="${build.ant.dir}">
492 <          <param name="matching"    value="^(.*(class|interface|implements) .*|)\{.*$"/>
492 >          <param name="matching"    value="^([^*]*(class|interface|implements) .*|)\{.*$"/>
493            <param name="pattern"     value="$"/>
494            <param name="replacement" value=" ${generic.declarations}"/>
495          </filterreader>
401        -->
496  
497        </filterchain>
498      </copy>
# Line 411 | Line 505
505  
506      <mkdir dir="${build.testcases.dir}"/>
507  
508 + <!--
509 +    <echo>javac ${gjc.args}</echo>
510 +    <echo>bootclasspath=${test.compile.bootclasspath}</echo>
511 +    <echo>classpath="${test.classpath}"</echo>
512 + -->
513 +
514      <javac srcdir="${test.src.dir}"
515            destdir="${build.testcases.dir}"
516              debug="${build.debug}"
# Line 419 | Line 519
519             source="${build.sourcelevel}"
520               fork="true">
521  
522 <      <classpath refid="test.classpath"/>
523 <      <bootclasspath refid="javac.bootclasspath"/>
524 <      <compilerarg line="${build.javac.args}"/>
522 >      <compilerarg    line="${gjc.args}"/>
523 >      <bootclasspath refid="test.compile.bootclasspath"/>
524 >      <classpath     refid="test.classpath"/>
525  
526      </javac>
527  
# Line 443 | Line 543
543                      dir="${build.reports.dir}"
544                     fork="true">
545  
546 <      <jvmarg value="${test.bootclasspath.arg}"/>
546 >      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
547  
548        <formatter type="xml"/>
549  
# Line 487 | Line 587
587    <target name="configure-compiler">
588  
589      <property name="gjc.version"
590 <             value="2.0"/>
590 >             value="2.2"/>
591  
592 <    <condition property="build.novariance" value="-novariance">
592 >    <condition property="novariance.arg" value="-novariance">
593        <and>
594          <equals arg1="${gjc.version}" arg2="2.0"/>
595          <or>
# Line 499 | Line 599
599        </and>
600      </condition>
601  
602 <    <property name="build.novariance"
602 >    <property name="novariance.arg"
603               value=""/>
604  
605      <property name="gjc.dir"
# Line 509 | Line 609
609            location="${gjc.dir}/${gjc.version}/javac.jar"/>
610  
611      <property name="collect.jar"
612 <          location="${gjc.dir}/${gjc.version}/collect${build.novariance}.jar"/>
612 >          location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/>
613  
614  
615 <    <condition property="build.warnunchecked" value="-warnunchecked">
615 >    <condition property="warnunchecked.arg" value="-warnunchecked">
616        <istrue value="${gjc.warnunchecked}"/>
617      </condition>
618  
619 <    <property name="build.warnunchecked" value=""/>
619 >    <property name="warnunchecked.arg" value=""/>
620  
621      <condition property="prepare.src.dir" value="${build.dir}/prepare-src">
622        <istrue value="${build.nothreads}"/>
# Line 527 | Line 627
627       ! Bootclasspath munging for source compilation.
628       -->
629  
630 <    <path id="javac.bootclasspath.prefix">
531 <      <!-- <pathelement location="${src.dir}"/> -->
630 >    <path id="pre.bootclasspath">
631        <pathelement location="${javac.jar}"/>
632      </path>
633  
634 <    <path id="javac.bootclasspath">
635 <      <!-- <pathelement location="${src.dir}"/> -->
634 >    <path id="compile.bootclasspath">
635 >      <pathelement location="${build.classes.dir}"/>
636        <pathelement location="${collect.jar}"/>
637        <pathelement location="${rt.jar}"/>
638      </path>
639  
640 <    <!-- Flatten bootclasspath prefix into a platform-appropriate string -->
641 <    <property name="javac.bootclasspath.prefix"
642 <             refid="javac.bootclasspath.prefix"/>
544 <
545 <    <!-- Turn the flattened bootclasspath prefix into a javac argument -->
546 <    <property name="build.bootclasspath.arg"
547 <             value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/>
548 <
549 <    <!-- Flatten bootclasspath for trace message -->
550 <    <property name="javac.bootclasspath"
551 <             refid="javac.bootclasspath"/>
640 >    <!-- Flatten paths into platform-appropriate strings -->
641 >    <property name="pre.bootclasspath"     refid="pre.bootclasspath"/>
642 >    <property name="compile.bootclasspath" refid="compile.bootclasspath"/>
643  
553    <!-- Common options in javac invocations -->
554    <property name="build.javac.args"
555             value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/>
644  
645 <    <echo>javac ${build.javac.args}</echo>
646 <    <echo>bootclasspath=${javac.bootclasspath}</echo>
645 >    <!-- Common options in javac invocations -->
646 >    <property name="gjc.args"
647 >             value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}"
648 >    />
649  
650    </target>
651  
# Line 591 | Line 681
681    </target>
682  
683  
684 <  <target name="configure-tests">
684 >  <target name="configure-tests"
685 >       depends="configure-compiler">
686  
687      <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
688      <available property="junit.available"
# Line 612 | Line 703
703        <pathelement location="${junit.jar}"/>
704      </path>
705  
706 <    <!-- Flatten test classpath into a platform-appropriate string -->
707 <    <property name="test.classpath" refid="test.classpath"/>
706 >    <path id="test.compile.bootclasspath">
707 >      <pathelement location="${javac.jar}"/>
708 >      <pathelement location="${collect.jar}"/>
709 >      <pathelement location="${rt.jar}"/>
710 >    </path>
711 >
712 >    <path id="test.run.bootclasspath">
713 >      <pathelement location="${javac.jar}"/>
714 >      <path refid="test.classpath"/>
715 >    </path>
716  
717 <    <!-- Turn the flattened test classpath into a javac argument -->
718 <    <property name="test.bootclasspath.arg"
719 <             value='-Xbootclasspath/p:${test.classpath}'/>
717 >    <!-- Flatten test classpaths into platform-appropriate strings -->
718 >    <property name="test.classpath"             refid="test.classpath"/>
719 >    <property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/>
720 >    <property name="test.run.bootclasspath"     refid="test.run.bootclasspath"/>
721  
722    </target>
723  
# Line 648 | Line 748
748    </target>
749  
750  
751 +  <target name="ng" depends="test">
752 +    <java classname="SuperfluousAbstract" fork="true">
753 +
754 +      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
755 +
756 +    </java>
757 +  </target>
758 +
759 +
760   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines