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.50 by tim, Tue Aug 5 04:03:38 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 +        <path refid="test.classpath"/>
193 +      </classpath>
194 +
195 +      <!-- <arg value="-link"/>       <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> -->
196 +
197 +      <arg value="-d"/>          <arg value="${build.javadocs.dir}"/>
198 +      <arg value="-sourcepath"/> <arg value="${src.dir}"/>
199 +      <arg value="-overview"/>   <arg value="${src.dir}/intro.html"/>
200 +      <arg value="-source"/>     <arg value="1.5"/>
201 +      <arg value="-verbose"/>
202 +      <arg value="java.util"/>
203 +
204 +      <!--
205 +      <arg value="-help"/>
206 +      -->
207 +
208 +    </java>
209 +
210 +  </target>
211 +
212 +
213    <target name="strip"
214            depends="init, configure-compiler"
215            description="Strip generics from java source (not working yet)">
# Line 177 | Line 229
229             source="${build.sourcelevel}"
230               fork="true">
231  
232 <      <bootclasspath refid="javac.bootclasspath"/>
233 <      <compilerarg line="${build.javac.args} -s"/>
232 >      <compilerarg    line="${gjc.args} -s"/>
233 >      <bootclasspath refid="compile.bootclasspath"/>
234  
235      </javac>
236  
# Line 189 | Line 241
241            depends="init, dist-clean, dist-jar, dist-docs"
242            description="Puts all distributable products in single hierarchy"/>
243  
244 +  <target name="release"
245 +          depends="dist"
246 +          description="Puts entire CVS tree, plus distribution productions, in a jar">
247 +
248 + <!--
249 +    #keep build dir? - dl
250 +    <delete dir="${build.dir}"/>
251 + -->
252 +    <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
253 +
254 +    <jar basedir="${basedir}" destfile="${release.jar}">
255 +      <exclude name="${release.jar}"/>
256 +      <exclude name="user.properties"/>
257 +      <exclude name="etc/notes/**"/>
258 +      <exclude name="lib/gjc/2.1/**"/>
259 +      <exclude name="**/SyntaxTest.java"/>
260 +    </jar>
261 +
262 +  </target>
263  
264    <target name="clean"
265            description="Removes all build products">
# Line 272 | Line 343
343             source="${build.sourcelevel}"
344               fork="true">
345  
346 <      <bootclasspath refid="javac.bootclasspath"/>
347 <      <compilerarg line="${build.javac.args}"/>
346 >      <compilerarg    line="${gjc.args}"/>
347 >      <bootclasspath refid="compile.bootclasspath"/>
348  
349      </javac>
350  
# Line 287 | Line 358
358  
359      <jar destfile="${product.jar}" duplicate="add">
360        <fileset dir="${build.classes.dir}">
361 <        <patternset refid="emulation.excludes"/>
361 >        <patternset refid="atomic.exclusion"/>
362 >        <patternset refid="unsafe.exclusion"/>
363        </fileset>
364        <fileset dir="${build.emulation.dir}"/>
365      </jar>
# Line 327 | Line 399
399        </fileset>
400      </copy>
401  
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
402      <copy todir="${build.filter.src.dir}">
403        <fileset dir="${src.dir}">
404          <exclude name="**/*.html"/>
405 <        <patternset refid="emulation.excludes"/>
405 >        <patternset refid="unsafe.exclusion"/>
406        </fileset>
407        <filterchain>
408  
# Line 372 | Line 438
438            <param name="pattern"     value="^//@"/>
439            <param name="replacement" value=""/>
440          </filterreader>
441 +      </filterchain>
442 +    </copy>
443  
444 +  </target>
445  
446 +
447 +
448 +
449 +  <target name="filter-doccheck"
450 +          depends="filter-src">
451 +
452 +    <mkdir dir="${build.filter.doccheck.dir}"/>
453 +
454 +    <copy todir="${build.filter.doccheck.dir}">
455 +      <fileset dir="${build.filter.src.dir}">
456 +        <include name="**/*.html"/>
457 +      </fileset>
458 +    </copy>
459 +
460 +    <property name="generic.declarations"
461 +             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 {}"
462 +    />
463 +
464 +    <copy todir="${build.filter.doccheck.dir}">
465 +      <fileset dir="${build.filter.src.dir}">
466 +        <exclude name="**/*.html"/>
467 +      </fileset>
468 +      <filterchain>
469          <!--
470 <         # The next two filters try to make the source look like
470 >         # These two filters try to make the source look like
471           # something that doccheck can process. The first removes
472           # -source 1.4 assertions and the second adds in a bunch
473           # of single letter public nested marker interfaces so that
474           # the generic type parameters are recognized.
383         #
384         # Currently commented out because doccheck doesn't work. :-(
475           -->
476  
387        <!--
477          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
478                        classpath="${build.ant.dir}">
479            <param name="matching"    value="^\s*assert[\s ].*$"/>
# Line 394 | Line 483
483  
484          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
485                        classpath="${build.ant.dir}">
486 <          <param name="matching"    value="^(.*(class|interface|implements) .*|)\{.*$"/>
486 >          <param name="matching"    value="^([^*]*(class|interface|implements) .*|)\{.*$"/>
487            <param name="pattern"     value="$"/>
488            <param name="replacement" value=" ${generic.declarations}"/>
489          </filterreader>
401        -->
490  
491        </filterchain>
492      </copy>
# Line 411 | Line 499
499  
500      <mkdir dir="${build.testcases.dir}"/>
501  
502 + <!--
503 +    <echo>javac ${gjc.args}</echo>
504 +    <echo>bootclasspath=${test.compile.bootclasspath}</echo>
505 +    <echo>classpath="${test.classpath}"</echo>
506 + -->
507 +
508      <javac srcdir="${test.src.dir}"
509            destdir="${build.testcases.dir}"
510              debug="${build.debug}"
# Line 419 | Line 513
513             source="${build.sourcelevel}"
514               fork="true">
515  
516 <      <classpath refid="test.classpath"/>
517 <      <bootclasspath refid="javac.bootclasspath"/>
518 <      <compilerarg line="${build.javac.args}"/>
516 >      <compilerarg    line="${gjc.args}"/>
517 >      <bootclasspath refid="test.compile.bootclasspath"/>
518 >      <classpath     refid="test.classpath"/>
519  
520      </javac>
521  
# Line 443 | Line 537
537                      dir="${build.reports.dir}"
538                     fork="true">
539  
540 <      <jvmarg value="${test.bootclasspath.arg}"/>
540 >      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
541  
542        <formatter type="xml"/>
543  
# Line 487 | Line 581
581    <target name="configure-compiler">
582  
583      <property name="gjc.version"
584 <             value="2.0"/>
584 >             value="2.2"/>
585  
586 <    <condition property="build.novariance" value="-novariance">
586 >    <condition property="novariance.arg" value="-novariance">
587        <and>
588          <equals arg1="${gjc.version}" arg2="2.0"/>
589          <or>
# Line 499 | Line 593
593        </and>
594      </condition>
595  
596 <    <property name="build.novariance"
596 >    <property name="novariance.arg"
597               value=""/>
598  
599      <property name="gjc.dir"
# Line 509 | Line 603
603            location="${gjc.dir}/${gjc.version}/javac.jar"/>
604  
605      <property name="collect.jar"
606 <          location="${gjc.dir}/${gjc.version}/collect${build.novariance}.jar"/>
606 >          location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/>
607  
608  
609 <    <condition property="build.warnunchecked" value="-warnunchecked">
609 >    <condition property="warnunchecked.arg" value="-warnunchecked">
610        <istrue value="${gjc.warnunchecked}"/>
611      </condition>
612  
613 <    <property name="build.warnunchecked" value=""/>
613 >    <property name="warnunchecked.arg" value=""/>
614  
615      <condition property="prepare.src.dir" value="${build.dir}/prepare-src">
616        <istrue value="${build.nothreads}"/>
# Line 527 | Line 621
621       ! Bootclasspath munging for source compilation.
622       -->
623  
624 <    <path id="javac.bootclasspath.prefix">
531 <      <!-- <pathelement location="${src.dir}"/> -->
624 >    <path id="pre.bootclasspath">
625        <pathelement location="${javac.jar}"/>
626      </path>
627  
628 <    <path id="javac.bootclasspath">
629 <      <!-- <pathelement location="${src.dir}"/> -->
628 >    <path id="compile.bootclasspath">
629 >      <pathelement location="${build.classes.dir}"/>
630        <pathelement location="${collect.jar}"/>
631        <pathelement location="${rt.jar}"/>
632      </path>
633  
634 <    <!-- Flatten bootclasspath prefix into a platform-appropriate string -->
635 <    <property name="javac.bootclasspath.prefix"
636 <             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"/>
634 >    <!-- Flatten paths into platform-appropriate strings -->
635 >    <property name="pre.bootclasspath"     refid="pre.bootclasspath"/>
636 >    <property name="compile.bootclasspath" refid="compile.bootclasspath"/>
637  
553    <!-- Common options in javac invocations -->
554    <property name="build.javac.args"
555             value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/>
638  
639 <    <echo>javac ${build.javac.args}</echo>
640 <    <echo>bootclasspath=${javac.bootclasspath}</echo>
639 >    <!-- Common options in javac invocations -->
640 >    <property name="gjc.args"
641 >             value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}"
642 >    />
643  
644    </target>
645  
# Line 591 | Line 675
675    </target>
676  
677  
678 <  <target name="configure-tests">
678 >  <target name="configure-tests"
679 >       depends="configure-compiler">
680  
681      <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
682      <available property="junit.available"
# Line 612 | Line 697
697        <pathelement location="${junit.jar}"/>
698      </path>
699  
700 <    <!-- Flatten test classpath into a platform-appropriate string -->
701 <    <property name="test.classpath" refid="test.classpath"/>
700 >    <path id="test.compile.bootclasspath">
701 >      <pathelement location="${javac.jar}"/>
702 >      <pathelement location="${collect.jar}"/>
703 >      <pathelement location="${rt.jar}"/>
704 >    </path>
705 >
706 >    <path id="test.run.bootclasspath">
707 >      <pathelement location="${javac.jar}"/>
708 >      <path refid="test.classpath"/>
709 >    </path>
710  
711 <    <!-- Turn the flattened test classpath into a javac argument -->
712 <    <property name="test.bootclasspath.arg"
713 <             value='-Xbootclasspath/p:${test.classpath}'/>
711 >    <!-- Flatten test classpaths into platform-appropriate strings -->
712 >    <property name="test.classpath"             refid="test.classpath"/>
713 >    <property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/>
714 >    <property name="test.run.bootclasspath"     refid="test.run.bootclasspath"/>
715  
716    </target>
717  
# Line 648 | Line 742
742    </target>
743  
744  
745 +  <target name="ng" depends="test">
746 +    <java classname="SuperfluousAbstract" fork="true">
747 +
748 +      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
749 +
750 +    </java>
751 +  </target>
752 +
753 +
754   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines