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

Diff of /jsr166/build.xml

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

revision 1.37 by tim, Fri May 30 03:24:18 2003 UTC revision 1.52 by tim, Tue Aug 19 15:10:45 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 -->
65    <!-- Files excluded from emulation and dist-docs -->    <patternset id="unsafe.exclusion">
   <patternset id="emulation.excludes">  
66      <exclude name="java/util/Random.*"/>      <exclude name="java/util/Random.*"/>
67      <exclude name="sun/misc/Unsafe.*"/>      <exclude name="sun/misc/Unsafe.*"/>
68    </patternset>    </patternset>
69    
70      <!-- Files excludes from emulation jar -->
71      <patternset id="atomic.exclusion">
72        <exclude name="java/util/concurrent/atomic/AtomicBoolean*"/>
73        <exclude name="java/util/concurrent/atomic/AtomicInteger*"/>
74        <exclude name="java/util/concurrent/atomic/AtomicLong*"/>
75        <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>
79    
80    
81    
82    <!-- Main targets -->    <!-- Main targets -->
# Line 124  Line 136 
136    
137    
138    <target name="doccheck"    <target name="doccheck"
139            depends="filter-src"            depends="filter-doccheck"
140            description="Reports on javadoc style errors (not working yet)">            description="Reports on javadoc style errors">
141    
142      <delete dir="${build.doccheck.dir}"/>      <delete dir="${build.doccheck.dir}"/>
143      <mkdir dir="${build.doccheck.dir}"/>      <mkdir dir="${build.doccheck.dir}"/>
# Line 133  Line 145 
145      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
146           docletpath="${lib.dir}/doccheck.jar"           docletpath="${lib.dir}/doccheck.jar"
147              destdir="${build.doccheck.dir}">              destdir="${build.doccheck.dir}">
148        <packageset dir="${build.filter.src.dir}"/>        <packageset dir="${build.filter.doccheck.dir}"/>
149      </javadoc>      </javadoc>
150    
151        <echo>DocCheck output is in ${build.doccheck.dir}</echo>
152    
153    </target>    </target>
154    
155    
# Line 163  Line 177 
177    </target>    </target>
178    
179    
180      <target name="sinjdocs"
181              depends="configure-tests"
182              description="Builds javadocs with custom tags to build folder">
183    
184        <delete dir="${build.sinjdocs.dir}"/>
185        <mkdir dir="${build.sinjdocs.dir}"/>
186    
187        <java classname="net.cscott.sinjdoc.Main" fork="true">
188    
189          <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
190    
191          <classpath>
192            <pathelement location="${sinjdoc.jar}"/>
193            <pathelement location="${lib.dir}/jutil.jar"/>
194            <pathelement location="${lib.dir}/cup.jar"/>
195            <path refid="test.classpath"/>
196          </classpath>
197    
198    
199          <arg value="-d"/>          <arg value="${build.sinjdocs.dir}"/>
200          <arg value="-sourcepath"/> <arg value="${src.dir}"/>
201          <arg value="-overview"/>   <arg value="${src.dir}/intro.html"/>
202          <arg value="-source"/>     <arg value="${build.sourcelevel}"/>
203          <!-- <arg value="-verbose"/> -->
204          <!-- <arg value="-link"/>  <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> -->
205          <arg value="java.lang"/>
206          <arg value="java.util"/>
207          <arg value="java.util.concurrent"/>
208          <arg value="java.util.concurrent.atomic"/>
209          <arg value="java.util.concurrent.locks"/>
210    
211          <!--
212          <arg value="-help"/>
213          -->
214    
215        </java>
216    
217      </target>
218    
219    
220    <target name="strip"    <target name="strip"
221            depends="init, configure-compiler"            depends="init, configure-compiler"
222            description="Strip generics from java source (not working yet)">            description="Strip generics from java source (not working yet)">
# Line 194  Line 248 
248            depends="init, dist-clean, dist-jar, dist-docs"            depends="init, dist-clean, dist-jar, dist-docs"
249            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
250    
251      <target name="release"
252              depends="dist"
253              description="Puts entire CVS tree, plus distribution productions, in a jar">
254    
255    <!--
256        #keep build dir? - dl
257        <delete dir="${build.dir}"/>
258    -->
259        <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
260    
261        <jar basedir="${basedir}" destfile="${release.jar}">
262          <exclude name="${release.jar}"/>
263          <exclude name="user.properties"/>
264          <exclude name="etc/notes/**"/>
265          <exclude name="lib/gjc/2.1/**"/>
266          <exclude name="**/SyntaxTest.java"/>
267        </jar>
268    
269      </target>
270    
271    <target name="clean"    <target name="clean"
272            description="Removes all build products">            description="Removes all build products">
# Line 292  Line 365 
365    
366      <jar destfile="${product.jar}" duplicate="add">      <jar destfile="${product.jar}" duplicate="add">
367        <fileset dir="${build.classes.dir}">        <fileset dir="${build.classes.dir}">
368          <patternset refid="emulation.excludes"/>          <patternset refid="atomic.exclusion"/>
369            <patternset refid="unsafe.exclusion"/>
370        </fileset>        </fileset>
371        <fileset dir="${build.emulation.dir}"/>        <fileset dir="${build.emulation.dir}"/>
372      </jar>      </jar>
# Line 332  Line 406 
406        </fileset>        </fileset>
407      </copy>      </copy>
408    
     <!-- Not needed now, used for doccheck filtering:  
     <property name="generic.declarations"  
              value="public interface E {} public interface T {} public interface K {} public interface V {}"  
     />  
     -->  
   
409      <copy todir="${build.filter.src.dir}">      <copy todir="${build.filter.src.dir}">
410        <fileset dir="${src.dir}">        <fileset dir="${src.dir}">
411          <exclude name="**/*.html"/>          <exclude name="**/*.html"/>
412          <patternset refid="emulation.excludes"/>          <patternset refid="unsafe.exclusion"/>
413        </fileset>        </fileset>
414        <filterchain>        <filterchain>
415    
# Line 377  Line 445 
445            <param name="pattern"     value="^//@"/>            <param name="pattern"     value="^//@"/>
446            <param name="replacement" value=""/>            <param name="replacement" value=""/>
447          </filterreader>          </filterreader>
448          </filterchain>
449        </copy>
450    
451      </target>
452    
453    
454    
455    
456      <target name="filter-doccheck"
457              depends="filter-src">
458    
459        <mkdir dir="${build.filter.doccheck.dir}"/>
460    
461        <copy todir="${build.filter.doccheck.dir}">
462          <fileset dir="${build.filter.src.dir}">
463            <include name="**/*.html"/>
464          </fileset>
465        </copy>
466    
467        <property name="generic.declarations"
468                 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 {}"
469        />
470    
471        <copy todir="${build.filter.doccheck.dir}">
472          <fileset dir="${build.filter.src.dir}">
473            <exclude name="**/*.html"/>
474          </fileset>
475          <filterchain>
476          <!--          <!--
477           # The next two filters try to make the source look like           # These two filters try to make the source look like
478           # something that doccheck can process. The first removes           # something that doccheck can process. The first removes
479           # -source 1.4 assertions and the second adds in a bunch           # -source 1.4 assertions and the second adds in a bunch
480           # of single letter public nested marker interfaces so that           # of single letter public nested marker interfaces so that
481           # the generic type parameters are recognized.           # the generic type parameters are recognized.
          #  
          # Currently commented out because doccheck doesn't work. :-(  
482           -->           -->
483    
         <!--  
484          <filterreader classname="jsr166.ant.filters.ReplaceFilter"          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
485                        classpath="${build.ant.dir}">                        classpath="${build.ant.dir}">
486            <param name="matching"    value="^\s*assert[\s ].*$"/>            <param name="matching"    value="^\s*assert[\s ].*$"/>
# Line 399  Line 490 
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="^(.*(class|interface|implements) .*|)\{.*$"/>            <param name="matching"    value="^([^*]*(class|interface|implements) .*|)\{.*$"/>
494            <param name="pattern"     value="$"/>            <param name="pattern"     value="$"/>
495            <param name="replacement" value=" ${generic.declarations}"/>            <param name="replacement" value=" ${generic.declarations}"/>
496          </filterreader>          </filterreader>
         -->  
497    
498        </filterchain>        </filterchain>
499      </copy>      </copy>
# Line 498  Line 588 
588    <target name="configure-compiler">    <target name="configure-compiler">
589    
590      <property name="gjc.version"      <property name="gjc.version"
591               value="2.0"/>               value="2.2"/>
592    
593      <condition property="novariance.arg" value="-novariance">      <condition property="novariance.arg" value="-novariance">
594        <and>        <and>
# Line 539  Line 629 
629       -->       -->
630    
631      <path id="pre.bootclasspath">      <path id="pre.bootclasspath">
       <!-- <pathelement location="${src.dir}"/> -->  
632        <pathelement location="${javac.jar}"/>        <pathelement location="${javac.jar}"/>
633      </path>      </path>
634    
635      <path id="compile.bootclasspath">      <path id="compile.bootclasspath">
636        <!-- <pathelement location="${src.dir}"/> -->        <pathelement location="${build.classes.dir}"/>
637        <pathelement location="${collect.jar}"/>        <pathelement location="${collect.jar}"/>
638        <pathelement location="${rt.jar}"/>        <pathelement location="${rt.jar}"/>
639      </path>      </path>
# Line 660  Line 749 
749    </target>    </target>
750    
751    
752      <target name="ng" depends="test">
753        <java classname="SuperfluousAbstract" fork="true">
754    
755          <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
756    
757        </java>
758      </target>
759    
760    
761  </project>  </project>

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.52

dl@cs.oswego.edu
ViewVC Help
Powered by ViewVC 1.1.27