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.46 by tim, Sat Jul 26 13:17:51 2003 UTC

# Line 59 | Line 59
59  
60  
61  
62 <  <!-- Files excluded from emulation and dist-docs -->
63 <  <patternset id="emulation.excludes">
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>
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>
75 +
76  
77  
78    <!-- Main targets -->
# Line 77 | Line 85
85  
86      <mkdir dir="${build.classes.dir}"/>
87  
88 + <!--
89 +    <echo>javac ${gjc.args}</echo>
90 +    <echo>bootclasspath=${compile.bootclasspath}</echo>
91 + -->
92 +
93      <javac srcdir="${prepare.src.dir}"
94            destdir="${build.classes.dir}"
95              debug="${build.debug}"
# Line 85 | Line 98
98             source="${build.sourcelevel}"
99               fork="true">
100  
101 <      <bootclasspath refid="javac.bootclasspath"/>
102 <      <compilerarg line="${build.javac.args}"/>
101 >      <compilerarg    line="${gjc.args}"/>
102 >      <bootclasspath refid="compile.bootclasspath"/>
103  
104      </javac>
105  
# Line 177 | Line 190
190             source="${build.sourcelevel}"
191               fork="true">
192  
193 <      <bootclasspath refid="javac.bootclasspath"/>
194 <      <compilerarg line="${build.javac.args} -s"/>
193 >      <compilerarg    line="${gjc.args} -s"/>
194 >      <bootclasspath refid="compile.bootclasspath"/>
195  
196      </javac>
197  
# Line 189 | Line 202
202            depends="init, dist-clean, dist-jar, dist-docs"
203            description="Puts all distributable products in single hierarchy"/>
204  
205 +  <target name="release"
206 +          depends="dist"
207 +          description="Puts entire CVS tree, plus distribution productions, in a jar">
208 +
209 + <!--
210 +    #keep build dir? - dl
211 +    <delete dir="${build.dir}"/>
212 + -->
213 +    <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
214 +
215 +    <jar basedir="${basedir}" destfile="${release.jar}">
216 +      <exclude name="${release.jar}"/>
217 +      <exclude name="user.properties"/>
218 +      <exclude name="etc/notes/**"/>
219 +      <exclude name="lib/gjc/2.1/**"/>
220 +      <exclude name="**/SyntaxTest.java"/>
221 +    </jar>
222 +
223 +  </target>
224  
225    <target name="clean"
226            description="Removes all build products">
# Line 272 | Line 304
304             source="${build.sourcelevel}"
305               fork="true">
306  
307 <      <bootclasspath refid="javac.bootclasspath"/>
308 <      <compilerarg line="${build.javac.args}"/>
307 >      <compilerarg    line="${gjc.args}"/>
308 >      <bootclasspath refid="compile.bootclasspath"/>
309  
310      </javac>
311  
# Line 287 | Line 319
319  
320      <jar destfile="${product.jar}" duplicate="add">
321        <fileset dir="${build.classes.dir}">
322 <        <patternset refid="emulation.excludes"/>
322 >        <patternset refid="atomic.exclusion"/>
323 >        <patternset refid="unsafe.exclusion"/>
324        </fileset>
325        <fileset dir="${build.emulation.dir}"/>
326      </jar>
# Line 336 | Line 369
369      <copy todir="${build.filter.src.dir}">
370        <fileset dir="${src.dir}">
371          <exclude name="**/*.html"/>
372 <        <patternset refid="emulation.excludes"/>
372 >        <patternset refid="unsafe.exclusion"/>
373        </fileset>
374        <filterchain>
375  
# Line 411 | Line 444
444  
445      <mkdir dir="${build.testcases.dir}"/>
446  
447 + <!--
448 +    <echo>javac ${gjc.args}</echo>
449 +    <echo>bootclasspath=${test.compile.bootclasspath}</echo>
450 +    <echo>classpath="${test.classpath}"</echo>
451 + -->
452 +
453      <javac srcdir="${test.src.dir}"
454            destdir="${build.testcases.dir}"
455              debug="${build.debug}"
# Line 419 | Line 458
458             source="${build.sourcelevel}"
459               fork="true">
460  
461 <      <classpath refid="test.classpath"/>
462 <      <bootclasspath refid="javac.bootclasspath"/>
463 <      <compilerarg line="${build.javac.args}"/>
461 >      <compilerarg    line="${gjc.args}"/>
462 >      <bootclasspath refid="test.compile.bootclasspath"/>
463 >      <classpath     refid="test.classpath"/>
464  
465      </javac>
466  
# Line 443 | Line 482
482                      dir="${build.reports.dir}"
483                     fork="true">
484  
485 <      <jvmarg value="${test.bootclasspath.arg}"/>
485 >      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
486  
487        <formatter type="xml"/>
488  
# Line 487 | Line 526
526    <target name="configure-compiler">
527  
528      <property name="gjc.version"
529 <             value="2.0"/>
529 >             value="2.2"/>
530  
531 <    <condition property="build.novariance" value="-novariance">
531 >    <condition property="novariance.arg" value="-novariance">
532        <and>
533          <equals arg1="${gjc.version}" arg2="2.0"/>
534          <or>
# Line 499 | Line 538
538        </and>
539      </condition>
540  
541 <    <property name="build.novariance"
541 >    <property name="novariance.arg"
542               value=""/>
543  
544      <property name="gjc.dir"
# Line 509 | Line 548
548            location="${gjc.dir}/${gjc.version}/javac.jar"/>
549  
550      <property name="collect.jar"
551 <          location="${gjc.dir}/${gjc.version}/collect${build.novariance}.jar"/>
551 >          location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/>
552  
553  
554 <    <condition property="build.warnunchecked" value="-warnunchecked">
554 >    <condition property="warnunchecked.arg" value="-warnunchecked">
555        <istrue value="${gjc.warnunchecked}"/>
556      </condition>
557  
558 <    <property name="build.warnunchecked" value=""/>
558 >    <property name="warnunchecked.arg" value=""/>
559  
560      <condition property="prepare.src.dir" value="${build.dir}/prepare-src">
561        <istrue value="${build.nothreads}"/>
# Line 527 | Line 566
566       ! Bootclasspath munging for source compilation.
567       -->
568  
569 <    <path id="javac.bootclasspath.prefix">
531 <      <!-- <pathelement location="${src.dir}"/> -->
569 >    <path id="pre.bootclasspath">
570        <pathelement location="${javac.jar}"/>
571      </path>
572  
573 <    <path id="javac.bootclasspath">
574 <      <!-- <pathelement location="${src.dir}"/> -->
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 bootclasspath prefix into a platform-appropriate string -->
580 <    <property name="javac.bootclasspath.prefix"
581 <             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"/>
579 >    <!-- Flatten paths into platform-appropriate strings -->
580 >    <property name="pre.bootclasspath"     refid="pre.bootclasspath"/>
581 >    <property name="compile.bootclasspath" refid="compile.bootclasspath"/>
582  
553    <!-- Common options in javac invocations -->
554    <property name="build.javac.args"
555             value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/>
583  
584 <    <echo>javac ${build.javac.args}</echo>
585 <    <echo>bootclasspath=${javac.bootclasspath}</echo>
584 >    <!-- Common options in javac invocations -->
585 >    <property name="gjc.args"
586 >             value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}"
587 >    />
588  
589    </target>
590  
# Line 591 | Line 620
620    </target>
621  
622  
623 <  <target name="configure-tests">
623 >  <target name="configure-tests"
624 >       depends="configure-compiler">
625  
626      <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
627      <available property="junit.available"
# Line 612 | Line 642
642        <pathelement location="${junit.jar}"/>
643      </path>
644  
645 <    <!-- Flatten test classpath into a platform-appropriate string -->
646 <    <property name="test.classpath" refid="test.classpath"/>
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 <    <!-- Turn the flattened test classpath into a javac argument -->
657 <    <property name="test.bootclasspath.arg"
658 <             value='-Xbootclasspath/p:${test.classpath}'/>
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"/>
660  
661    </target>
662  
# Line 648 | Line 687
687    </target>
688  
689  
690 +  <target name="ng" depends="test">
691 +    <java classname="SuperfluousAbstract" fork="true">
692 +
693 +      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
694 +
695 +    </java>
696 +  </target>
697 +
698 +
699   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines