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

Diff of /jsr166/build.xml

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

revision 1.39 by tim, Sat May 31 17:24:03 2003 UTC 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"/>    <property name="build.reports.dir"    location="${build.dir}/reports"/>
40    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>
41    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>    <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 -->    <!-- Source locations -->
45    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
# Line 56  Line 57 
57    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
58    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
59    <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>    <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>
60      <property name="sinjdoc.jar"          location="${lib.dir}/sinjdoc.jar"/>
61    
62    
63      <!-- Files excluded from dist-docs and emulation jar -->
64    <!-- Files excluded from emulation and dist-docs -->    <patternset id="unsafe.exclusion">
   <patternset id="emulation.excludes">  
65      <exclude name="java/util/Random.*"/>      <exclude name="java/util/Random.*"/>
66      <exclude name="sun/misc/Unsafe.*"/>      <exclude name="sun/misc/Unsafe.*"/>
67    </patternset>    </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 -->    <!-- Main targets -->
# Line 124  Line 135 
135    
136    
137    <target name="doccheck"    <target name="doccheck"
138            depends="filter-src"            depends="filter-doccheck"
139            description="Reports on javadoc style errors (not working yet)">            description="Reports on javadoc style errors">
140    
141      <delete dir="${build.doccheck.dir}"/>      <delete dir="${build.doccheck.dir}"/>
142      <mkdir dir="${build.doccheck.dir}"/>      <mkdir dir="${build.doccheck.dir}"/>
# Line 133  Line 144 
144      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
145           docletpath="${lib.dir}/doccheck.jar"           docletpath="${lib.dir}/doccheck.jar"
146              destdir="${build.doccheck.dir}">              destdir="${build.doccheck.dir}">
147        <packageset dir="${build.filter.src.dir}"/>        <packageset dir="${build.filter.doccheck.dir}"/>
148      </javadoc>      </javadoc>
149    
150        <echo>DocCheck output is in ${build.doccheck.dir}</echo>
151    
152    </target>    </target>
153    
154    
# Line 163  Line 176 
176    </target>    </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"    <target name="strip"
220            depends="init, configure-compiler"            depends="init, configure-compiler"
221            description="Strip generics from java source (not working yet)">            description="Strip generics from java source (not working yet)">
# Line 194  Line 247 
247            depends="init, dist-clean, dist-jar, dist-docs"            depends="init, dist-clean, dist-jar, dist-docs"
248            description="Puts all distributable products in single hierarchy"/>            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"    <target name="clean"
271            description="Removes all build products">            description="Removes all build products">
# Line 292  Line 364 
364    
365      <jar destfile="${product.jar}" duplicate="add">      <jar destfile="${product.jar}" duplicate="add">
366        <fileset dir="${build.classes.dir}">        <fileset dir="${build.classes.dir}">
367          <patternset refid="emulation.excludes"/>          <patternset refid="atomic.exclusion"/>
368            <patternset refid="unsafe.exclusion"/>
369        </fileset>        </fileset>
370        <fileset dir="${build.emulation.dir}"/>        <fileset dir="${build.emulation.dir}"/>
371      </jar>      </jar>
# Line 332  Line 405 
405        </fileset>        </fileset>
406      </copy>      </copy>
407    
     <!-- Not needed now, used for doccheck filtering:  
     <property name="generic.declarations"  
              value="public interface E {} public interface T {} public interface K {} public interface V {}"  
     />  
     -->  
   
408      <copy todir="${build.filter.src.dir}">      <copy todir="${build.filter.src.dir}">
409        <fileset dir="${src.dir}">        <fileset dir="${src.dir}">
410          <exclude name="**/*.html"/>          <exclude name="**/*.html"/>
411          <patternset refid="emulation.excludes"/>          <patternset refid="unsafe.exclusion"/>
412        </fileset>        </fileset>
413        <filterchain>        <filterchain>
414    
# Line 377  Line 444 
444            <param name="pattern"     value="^//@"/>            <param name="pattern"     value="^//@"/>
445            <param name="replacement" value=""/>            <param name="replacement" value=""/>
446          </filterreader>          </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           # These two filters try to make the source look like
477           # something that doccheck can process. The first removes           # something that doccheck can process. The first removes
478           # -source 1.4 assertions and the second adds in a bunch           # -source 1.4 assertions and the second adds in a bunch
479           # of single letter public nested marker interfaces so that           # of single letter public nested marker interfaces so that
480           # the generic type parameters are recognized.           # the generic type parameters are recognized.
          #  
          # Currently commented out because doccheck doesn't work. :-(  
481           -->           -->
482    
         <!--  
483          <filterreader classname="jsr166.ant.filters.ReplaceFilter"          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
484                        classpath="${build.ant.dir}">                        classpath="${build.ant.dir}">
485            <param name="matching"    value="^\s*assert[\s ].*$"/>            <param name="matching"    value="^\s*assert[\s ].*$"/>
# Line 399  Line 489 
489    
490          <filterreader classname="jsr166.ant.filters.ReplaceFilter"          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
491                        classpath="${build.ant.dir}">                        classpath="${build.ant.dir}">
492            <param name="matching"    value="^(.*(class|interface|implements) .*|)\{.*$"/>            <param name="matching"    value="^([^*]*(class|interface|implements) .*|)\{.*$"/>
493            <param name="pattern"     value="$"/>            <param name="pattern"     value="$"/>
494            <param name="replacement" value=" ${generic.declarations}"/>            <param name="replacement" value=" ${generic.declarations}"/>
495          </filterreader>          </filterreader>
         -->  
496    
497        </filterchain>        </filterchain>
498      </copy>      </copy>
# Line 498  Line 587 
587    <target name="configure-compiler">    <target name="configure-compiler">
588    
589      <property name="gjc.version"      <property name="gjc.version"
590               value="2.0"/>               value="2.2"/>
591    
592      <condition property="novariance.arg" value="-novariance">      <condition property="novariance.arg" value="-novariance">
593        <and>        <and>
# Line 659  Line 748 
748    </target>    </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>  </project>

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.51

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