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

Diff of /jsr166/build.xml

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

revision 1.32 by tim, Thu May 29 04:35:42 2003 UTC revision 1.36 by tim, Thu May 29 17:29:08 2003 UTC
# Line 70  Line 70 
70    <!-- Main targets -->    <!-- Main targets -->
71    
72    <target name="compile"    <target name="compile"
73            depends="init, configure-compiler"            depends="init, configure-compiler, prepare-src"
74            description="Compiles main sources to build folder">            description="Compiles main sources to build folder">
75    
76        <property name="prepare.src.dir" value="${src.dir}"/>
77    
78      <mkdir dir="${build.classes.dir}"/>      <mkdir dir="${build.classes.dir}"/>
79    
80      <javac srcdir="${src.dir}"      <javac srcdir="${prepare.src.dir}"
81            destdir="${build.classes.dir}"            destdir="${build.classes.dir}"
82              debug="${build.debug}"              debug="${build.debug}"
83         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
# Line 325  Line 327 
327        </fileset>        </fileset>
328      </copy>      </copy>
329    
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    
336      <copy todir="${build.filter.src.dir}">      <copy todir="${build.filter.src.dir}">
337        <fileset dir="${src.dir}">        <fileset dir="${src.dir}">
338          <exclude name="**/*.html"/>          <exclude name="**/*.html"/>
339          <patternset refid="emulation.excludes"/>          <patternset refid="emulation.excludes"/>
340        </fileset>        </fileset>
341        <filterchain>        <filterchain>
342    
343            <!--
344             # This filter gets rid of angle-bracketed type parameters
345             # so that javadoc can run on the result. The following
346             # heuristic seems to work:
347             #
348             # For all lines not starting with space(s)-asterisk-space(s),
349             #   replace <something> with a space, where there may be more
350             #   than one right angle bracket at the end, and "something"
351             #   must not contain parens or pipes. (This may need some
352             #   tweaking.)
353             -->
354    
355          <filterreader classname="jsr166.ant.filters.ReplaceFilter"          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
356                        classpath="${build.ant.dir}">                        classpath="${build.ant.dir}">
           <!--  
            # These arguments are to get rid of angle-bracketed type  
            # parameters so that javadoc can run on the result. The  
            # following heuristic that seems to work:  
            #  
            # For all lines not starting with space(s)-asterisk-space(s),  
            #   replace <something> with a space, where there may be more  
            #   than one right angle bracket at the end, and "something"  
            #   must not contain parens or pipes. (This may need some  
            #   tweaking.)  
            -->  
357            <param name="notmatching" value="^\s+\*\s.*$"/>            <param name="notmatching" value="^\s+\*\s.*$"/>
358            <param name="pattern" value="&lt;[^|>()]+?>+"/>            <param name="pattern"     value="&lt;[^|>()]+?>+"/>
359            <param name="replacement" value=" "/>            <param name="replacement" value=" "/>
360          </filterreader>          </filterreader>
361    
362    
363            <!--
364             # This filter uncomments lines beginning with "//@" so that
365             # javadoc can see imports that are needed to resolve links
366             # but that shouldn't be in the compiled code.
367             -->
368    
369          <filterreader classname="jsr166.ant.filters.ReplaceFilter"          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
370                        classpath="${build.ant.dir}">                        classpath="${build.ant.dir}">
371            <!--            <param name="matching"    value="^//@.*$"/>
372             # These arguments are to uncomment lines beginning with            <param name="pattern"     value="^//@"/>
            # "//@" so that javadoc can see imports that are needed  
            # to resolve links but that shouldn't be in the compiled  
            # code.  
            -->  
           <param name="matching" value="^//@.*$"/>  
           <param name="pattern" value="^//@"/>  
373            <param name="replacement" value=""/>            <param name="replacement" value=""/>
374          </filterreader>          </filterreader>
375    
376    
377            <!--
378             # The next two filters try to make the source look like
379             # something that doccheck can process. The first removes
380             # -source 1.4 assertions and the second adds in a bunch
381             # of single letter public nested marker interfaces so that
382             # the generic type parameters are recognized.
383             #
384             # Currently commented out because doccheck doesn't work. :-(
385             -->
386    
387            <!--
388            <filterreader classname="jsr166.ant.filters.ReplaceFilter"
389                          classpath="${build.ant.dir}">
390              <param name="matching"    value="^\s*assert[\s ].*$"/>
391              <param name="pattern"     value="assert"/>
392              <param name="replacement" value="//assert"/>
393            </filterreader>
394    
395            <filterreader classname="jsr166.ant.filters.ReplaceFilter"
396                          classpath="${build.ant.dir}">
397              <param name="matching"    value="^(.*(class|interface|implements) .*|)\{.*$"/>
398              <param name="pattern"     value="$"/>
399              <param name="replacement" value=" ${generic.declarations}"/>
400            </filterreader>
401            -->
402    
403        </filterchain>        </filterchain>
404      </copy>      </copy>
405    
# Line 447  Line 487 
487    <target name="configure-compiler">    <target name="configure-compiler">
488    
489      <property name="gjc.version"      <property name="gjc.version"
490               value="1.3"/>               value="2.0"/>
491    
492      <condition property="build.novariance" value="-novariance">      <condition property="build.novariance" value="-novariance">
493        <and>        <and>
# Line 478  Line 518 
518    
519      <property name="build.warnunchecked" value=""/>      <property name="build.warnunchecked" value=""/>
520    
521        <condition property="prepare.src.dir" value="${build.dir}/prepare-src">
522          <istrue value="${build.nothreads}"/>
523        </condition>
524    
525    
526      <!--      <!--
527       ! Bootclasspath munging for source compilation.       ! Bootclasspath munging for source compilation.
# Line 510  Line 554 
554      <property name="build.javac.args"      <property name="build.javac.args"
555               value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/>               value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/>
556    
557      <echo>javac ${build.javac.args}      <echo>javac ${build.javac.args}</echo>
558  bootclasspath is ${javac.bootclasspath}</echo>      <echo>bootclasspath=${javac.bootclasspath}</echo>
559    
560      </target>
561    
562    
563      <target name="prepare-src"
564              depends="configure-compiler"
565              if="prepare.src.dir">
566    
567        <mkdir dir="${prepare.src.dir}"/>
568        <copy todir="${prepare.src.dir}">
569          <fileset dir="${src.dir}">
570            <exclude name="java/lang/**"/>
571          </fileset>
572        </copy>
573    
574    </target>    </target>
575    

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.36

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