[cvs] / jsr166 / build.xml Repository:
ViewVC logotype

Diff of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.41, Fri Jun 6 20:48:55 2003 UTC revision 1.56, Mon Sep 1 04:21:55 2003 UTC
# Line 35  Line 35 
35    <property name="build.lib.dir"        location="${build.dir}/lib"/>    <property name="build.lib.dir"        location="${build.dir}/lib"/>
36    <property name="build.ant.dir"        location="${build.dir}/ant"/>    <property name="build.ant.dir"        location="${build.dir}/ant"/>
37    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>
38      <property name="build.sinjdocs.dir"   location="${build.dir}/sinjdocs"/>
39    <property name="build.stripped.dir"   location="${build.dir}/stripped"/>    <property name="build.stripped.dir"   location="${build.dir}/stripped"/>
40    <property name="build.reports.dir"    location="${build.dir}/reports"/>    <property name="build.reports.dir"    location="${build.dir}/reports"/>
41    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>
42    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
43      <property name="build.filter.doccheck.dir" location="${build.dir}/filterdocchk"/>
44    
45    <!-- Source locations -->    <!-- Source locations -->
46    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
# Line 56  Line 58 
58    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
59    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
60    <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>    <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>
61      <property name="sinjdoc.jar"          location="${lib.dir}/sinjdoc.jar"/>
62    
63    
64    <!-- Files excluded from dist-docs and emulation jar -->    <!-- Files excluded from dist-docs and emulation jar -->
# Line 71  Line 73 
73      <exclude name="java/util/concurrent/atomic/AtomicInteger*"/>      <exclude name="java/util/concurrent/atomic/AtomicInteger*"/>
74      <exclude name="java/util/concurrent/atomic/AtomicLong*"/>      <exclude name="java/util/concurrent/atomic/AtomicLong*"/>
75      <exclude name="java/util/concurrent/atomic/AtomicReference*"/>      <exclude name="java/util/concurrent/atomic/AtomicReference*"/>
76        <exclude name="java/util/concurrent/locks/LockSupport*"/>
77        <exclude name="java/util/concurrent/locks/ReentrantLock*"/>
78    </patternset>    </patternset>
79    
80    
# Line 99  Line 103 
103               fork="true">               fork="true">
104    
105        <compilerarg    line="${gjc.args}"/>        <compilerarg    line="${gjc.args}"/>
106    <!--
107        <bootclasspath refid="compile.bootclasspath"/>        <bootclasspath refid="compile.bootclasspath"/>
108    -->
109    
110      </javac>      </javac>
111    
# Line 132  Line 138 
138    
139    
140    <target name="doccheck"    <target name="doccheck"
141            depends="filter-src"            depends="filter-doccheck"
142            description="Reports on javadoc style errors (not working yet)">            description="Reports on javadoc style errors">
143    
144      <delete dir="${build.doccheck.dir}"/>      <delete dir="${build.doccheck.dir}"/>
145      <mkdir dir="${build.doccheck.dir}"/>      <mkdir dir="${build.doccheck.dir}"/>
# Line 141  Line 147 
147      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
148           docletpath="${lib.dir}/doccheck.jar"           docletpath="${lib.dir}/doccheck.jar"
149              destdir="${build.doccheck.dir}">              destdir="${build.doccheck.dir}">
150        <packageset dir="${build.filter.src.dir}"/>        <packageset dir="${build.filter.doccheck.dir}"/>
151      </javadoc>      </javadoc>
152    
153        <echo>DocCheck output is in ${build.doccheck.dir}</echo>
154    
155    </target>    </target>
156    
157    
# Line 171  Line 179 
179    </target>    </target>
180    
181    
182      <target name="sinjdocs"
183              depends="configure-tests"
184              description="Builds javadocs with custom tags to build folder">
185    
186        <delete dir="${build.sinjdocs.dir}"/>
187        <mkdir dir="${build.sinjdocs.dir}"/>
188    
189        <java classname="net.cscott.sinjdoc.Main" fork="true">
190    
191          <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
192    
193          <classpath>
194            <pathelement location="${sinjdoc.jar}"/>
195            <pathelement location="${lib.dir}/jutil.jar"/>
196            <pathelement location="${lib.dir}/cup.jar"/>
197            <path refid="test.classpath"/>
198          </classpath>
199    
200    
201          <arg value="-d"/>          <arg value="${build.sinjdocs.dir}"/>
202          <arg value="-sourcepath"/> <arg value="${src.dir}"/>
203          <arg value="-overview"/>   <arg value="${src.dir}/intro.html"/>
204          <arg value="-source"/>     <arg value="${build.sourcelevel}"/>
205          <!-- <arg value="-verbose"/> -->
206          <!-- <arg value="-link"/>  <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> -->
207          <arg value="java.lang"/>
208          <arg value="java.util"/>
209          <arg value="java.util.concurrent"/>
210          <arg value="java.util.concurrent.atomic"/>
211          <arg value="java.util.concurrent.locks"/>
212    
213          <!--
214          <arg value="-help"/>
215          -->
216    
217        </java>
218    
219      </target>
220    
221    
222    <target name="strip"    <target name="strip"
223            depends="init, configure-compiler"            depends="init, configure-compiler"
224            description="Strip generics from java source (not working yet)">            description="Strip generics from java source (not working yet)">
# Line 191  Line 239 
239               fork="true">               fork="true">
240    
241        <compilerarg    line="${gjc.args} -s"/>        <compilerarg    line="${gjc.args} -s"/>
242    <!--
243        <bootclasspath refid="compile.bootclasspath"/>        <bootclasspath refid="compile.bootclasspath"/>
244    -->
245    
246      </javac>      </javac>
247    
# Line 202  Line 252 
252            depends="init, dist-clean, dist-jar, dist-docs"            depends="init, dist-clean, dist-jar, dist-docs"
253            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
254    
255      <target name="release"
256              depends="dist"
257              description="Puts entire CVS tree, plus distribution productions, in a jar">
258    
259    <!--
260        #keep build dir? - dl
261        <delete dir="${build.dir}"/>
262    -->
263        <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
264    
265        <jar basedir="${basedir}" destfile="${release.jar}">
266          <exclude name="${release.jar}"/>
267          <exclude name="user.properties"/>
268          <exclude name="etc/notes/**"/>
269          <exclude name="lib/gjc/2.1/**"/>
270          <exclude name="**/SyntaxTest.java"/>
271        </jar>
272    
273      </target>
274    
275    <target name="clean"    <target name="clean"
276            description="Removes all build products">            description="Removes all build products">
# Line 249  Line 318 
318      <!-- Version is kept in a separate file -->      <!-- Version is kept in a separate file -->
319      <loadfile property="version" srcFile="version.properties"/>      <loadfile property="version" srcFile="version.properties"/>
320      <echo>Building JSR-166 version ${version}</echo>      <echo>Building JSR-166 version ${version}</echo>
321        <echo>java.home is ${java.home}</echo>
322    
323    </target>    </target>
324    
# Line 286  Line 356 
356               fork="true">               fork="true">
357    
358        <compilerarg    line="${gjc.args}"/>        <compilerarg    line="${gjc.args}"/>
359    <!--
360        <bootclasspath refid="compile.bootclasspath"/>        <bootclasspath refid="compile.bootclasspath"/>
361    -->
362    
363      </javac>      </javac>
364    
# Line 341  Line 413 
413        </fileset>        </fileset>
414      </copy>      </copy>
415    
     <!-- Not needed now, used for doccheck filtering:  
     <property name="generic.declarations"  
              value="public interface E {} public interface T {} public interface K {} public interface V {}"  
     />  
     -->  
   
416      <copy todir="${build.filter.src.dir}">      <copy todir="${build.filter.src.dir}">
417        <fileset dir="${src.dir}">        <fileset dir="${src.dir}">
418          <exclude name="**/*.html"/>          <exclude name="**/*.html"/>
# Line 386  Line 452 
452            <param name="pattern"     value="^//@"/>            <param name="pattern"     value="^//@"/>
453            <param name="replacement" value=""/>            <param name="replacement" value=""/>
454          </filterreader>          </filterreader>
455          </filterchain>
456        </copy>
457    
458      </target>
459    
460    
461    
462    
463      <target name="filter-doccheck"
464              depends="filter-src">
465    
466        <mkdir dir="${build.filter.doccheck.dir}"/>
467    
468        <copy todir="${build.filter.doccheck.dir}">
469          <fileset dir="${build.filter.src.dir}">
470            <include name="**/*.html"/>
471          </fileset>
472        </copy>
473    
474        <property name="generic.declarations"
475                 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 {}"
476        />
477    
478        <copy todir="${build.filter.doccheck.dir}">
479          <fileset dir="${build.filter.src.dir}">
480            <exclude name="**/*.html"/>
481          </fileset>
482          <filterchain>
483          <!--          <!--
484           # The next two filters try to make the source look like           # These two filters try to make the source look like
485           # something that doccheck can process. The first removes           # something that doccheck can process. The first removes
486           # -source 1.4 assertions and the second adds in a bunch           # -source 1.4 assertions and the second adds in a bunch
487           # of single letter public nested marker interfaces so that           # of single letter public nested marker interfaces so that
488           # the generic type parameters are recognized.           # the generic type parameters are recognized.
          #  
          # Currently commented out because doccheck doesn't work. :-(  
489           -->           -->
490    
         <!--  
491          <filterreader classname="jsr166.ant.filters.ReplaceFilter"          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
492                        classpath="${build.ant.dir}">                        classpath="${build.ant.dir}">
493            <param name="matching"    value="^\s*assert[\s ].*$"/>            <param name="matching"    value="^\s*assert[\s ].*$"/>
# Line 408  Line 497 
497    
498          <filterreader classname="jsr166.ant.filters.ReplaceFilter"          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
499                        classpath="${build.ant.dir}">                        classpath="${build.ant.dir}">
500            <param name="matching"    value="^(.*(class|interface|implements) .*|)\{.*$"/>            <param name="matching"    value="^([^*]*(class|interface|implements) .*|)\{.*$"/>
501            <param name="pattern"     value="$"/>            <param name="pattern"     value="$"/>
502            <param name="replacement" value=" ${generic.declarations}"/>            <param name="replacement" value=" ${generic.declarations}"/>
503          </filterreader>          </filterreader>
         -->  
504    
505        </filterchain>        </filterchain>
506      </copy>      </copy>
# Line 440  Line 528 
528               fork="true">               fork="true">
529    
530        <compilerarg    line="${gjc.args}"/>        <compilerarg    line="${gjc.args}"/>
531    <!--
532        <bootclasspath refid="test.compile.bootclasspath"/>        <bootclasspath refid="test.compile.bootclasspath"/>
533    -->
534        <classpath     refid="test.classpath"/>        <classpath     refid="test.classpath"/>
535    
536          <include name="java/**"/>
537          <include name="jsr166/**"/>
538    
539      </javac>      </javac>
540    
541    </target>    </target>
# Line 463  Line 556 
556                      dir="${build.reports.dir}"                      dir="${build.reports.dir}"
557                     fork="true">                     fork="true">
558    
559        <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>        <jvmarg value="-Xbootclasspath:${test.run.bootclasspath}"/>
560    
561        <formatter type="xml"/>        <formatter type="xml"/>
562    
563        <batchtest todir="${build.reports.dir}">        <batchtest todir="${build.reports.dir}">
564          <fileset dir="${test.src.dir}">          <fileset dir="${test.src.dir}">
565            <include name="**/${testcase}Test.java"/>            <include name="java/**/${testcase}Test.java"/>
566              <include name="jsr166/**/${testcase}Test.java"/>
567          </fileset>          </fileset>
568        </batchtest>        </batchtest>
569    
# Line 481  Line 575 
575    <target name="report-tests"    <target name="report-tests"
576            depends="run-tests">            depends="run-tests">
577    
578      <!-- Sets junit.report.format to frames if Xalan is present,      <!-- Sets junit.report.format to frames if redirection is present,
579           otherwise sets it to noframes. -->           otherwise sets it to noframes. -->
580      <available property="junit.report.format"      <available property="junit.report.format"
581                    value="frames"                    value="frames"
# Line 507  Line 601 
601    <target name="configure-compiler">    <target name="configure-compiler">
602    
603      <property name="gjc.version"      <property name="gjc.version"
604               value="2.0"/>               value="2.2"/>
605    
606      <condition property="novariance.arg" value="-novariance">      <condition property="novariance.arg" value="-novariance">
607        <and>        <and>
# Line 531  Line 625 
625      <property name="collect.jar"      <property name="collect.jar"
626            location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/>            location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/>
627    
628    <!--
629        <property name="unchecked.option" value="-warnunchecked"/>
630    -->
631    
632        <property name="unchecked.option" value="-Xlint:unchecked"/>
633    
634      <condition property="warnunchecked.arg" value="-warnunchecked">      <condition property="warnunchecked.arg" value="${unchecked.option}">
635        <istrue value="${gjc.warnunchecked}"/>        <istrue value="${gjc.warnunchecked}"/>
636      </condition>      </condition>
637    
# Line 548  Line 647 
647       -->       -->
648    
649      <path id="pre.bootclasspath">      <path id="pre.bootclasspath">
650    <!--
651        <pathelement location="${javac.jar}"/>        <pathelement location="${javac.jar}"/>
652    -->
653      </path>      </path>
654    
655      <path id="compile.bootclasspath">      <path id="compile.bootclasspath">
656        <pathelement location="${build.classes.dir}"/>        <pathelement location="${build.classes.dir}"/>
657    <!--
658        <pathelement location="${collect.jar}"/>        <pathelement location="${collect.jar}"/>
659    -->
660        <pathelement location="${rt.jar}"/>        <pathelement location="${rt.jar}"/>
661      </path>      </path>
662    
# Line 563  Line 666 
666    
667    
668      <!-- Common options in javac invocations -->      <!-- Common options in javac invocations -->
669    <!--
670      <property name="gjc.args"      <property name="gjc.args"
671               value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}"               value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}"
672      />      />
673    -->
674        <property name="gjc.args" value="${warnunchecked.arg} ${novariance.arg}"/>
675    
676    </target>    </target>
677    
# Line 587  Line 693 
693    <target name="configure-emulation">    <target name="configure-emulation">
694    
695      <condition property="build.emulation.true">      <condition property="build.emulation.true">
       <or>  
         <and>  
           <os family="windows"/>  
           <not>  
             <isset property="build.emulation"/>  
           </not>  
         </and>  
696          <istrue value="${build.emulation}"/>          <istrue value="${build.emulation}"/>
       </or>  
697      </condition>      </condition>
698    
699    </target>    </target>
# Line 611  Line 709 
709      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
710            unless="junit.available"/>            unless="junit.available"/>
711    
712        <!-- Xalan -->
713        <available property="xalan.available"
714                   classname="org.apache.xalan.Version"/>
715    
716        <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
717              unless="xalan.available"/>
718    
719    
720      <!--      <!--
721       ! Bootclasspath munging for testing, so JUnit can test our local       ! Bootclasspath munging for testing, so JUnit can test our local
# Line 619  Line 724 
724    
725      <path id="test.classpath">      <path id="test.classpath">
726        <pathelement location="${product.jar}"/>        <pathelement location="${product.jar}"/>
727          <pathelement location="${rt.jar}"/>
728        <pathelement location="${build.testcases.dir}"/>        <pathelement location="${build.testcases.dir}"/>
729        <pathelement location="${junit.jar}"/>        <pathelement location="${junit.jar}"/>
730      </path>      </path>
# Line 630  Line 736 
736      </path>      </path>
737    
738      <path id="test.run.bootclasspath">      <path id="test.run.bootclasspath">
739    <!--
740        <pathelement location="${javac.jar}"/>        <pathelement location="${javac.jar}"/>
741    -->
742        <path refid="test.classpath"/>        <path refid="test.classpath"/>
743      </path>      </path>
744    
# Line 645  Line 753 
753    
754    <!-- Anthill targets -->    <!-- Anthill targets -->
755    
756    <target name="anthill-build"    <target name="anthill-build">
757    
758        <!-- Override this in user.properties -->
759        <property name="tiger.home" location="e:/j2sdk1.5.0"/>
760    
761        <exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java">
762          <arg value="-Xmx256000000"/>
763          <!-- classpath of new JVM -->
764          <arg value="-classpath"/> <arg path="${java.class.path}"/>
765          <!-- location of Ant home directory -->
766          <arg value="-Dant.home=${ant.home}"/>
767          <!-- the Ant main class -->
768          <arg value="org.apache.tools.ant.Main"/>
769          <!-- The build file -->
770          <arg value="-buildfile"/>  <arg value="build.xml"/>
771          <!-- the target to build on the new Ant instance -->
772          <arg value="-DJAVA_HOME=${tiger.home}"/>
773          <arg value="do-anthill-build"/>
774        </exec>
775      </target>
776    
777      <target name="do-anthill-build"
778            depends="jar, test, docs, dist-docs"/>            depends="jar, test, docs, dist-docs"/>
779    
780    <target name="anthill-publish">    <target name="anthill-publish">
# Line 668  Line 797 
797    </target>    </target>
798    
799    
800      <target name="ng" depends="test">
801        <java classname="SuperfluousAbstract" fork="true">
802    
803          <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
804    
805        </java>
806      </target>
807    
808    
809  </project>  </project>

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.56

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8