ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant build.xml
Date Thu, 20 May 2004 08:34:32 GMT
peterreilly    2004/05/20 01:34:32

  Modified:    .        Tag: ANT_16_BRANCH build.xml
  Log:
  sync with head
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.392.2.27 +28 -7     ant/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/ant/build.xml,v
  retrieving revision 1.392.2.26
  retrieving revision 1.392.2.27
  diff -u -r1.392.2.26 -r1.392.2.27
  --- build.xml	17 May 2004 13:22:52 -0000	1.392.2.26
  +++ build.xml	20 May 2004 08:34:32 -0000	1.392.2.27
  @@ -363,12 +363,35 @@
   
     <!--
          ===================================================================
  +         Set up a preset def for javac depending on
  +         the java version
  +       ===================================================================
  +  -->
  +  
  +  <target name="javac.preset" depends="javac.preset.1.5+,javac.preset.1.5-"/>
  +  <target name="javac.preset.1.5+" depends="check_for_optional_packages"
  +          if="jdk1.5+">
  +    <presetdef name="javac.preset">
  +      <javac source="${javac.source}"/>
  +    </presetdef>
  +  </target>
  +  <target name="javac.preset.1.5-" depends="check_for_optional_packages"
  +          unless="jdk1.5+">
  +    <presetdef name="javac.preset">
  +      <javac/>
  +    </presetdef>
  +  </target>
  +
  +
  +  <!--
  +       ===================================================================
            Check to see what optional dependencies are available
          ===================================================================
     -->
     <target name="check_for_optional_packages">
       <available property="jdk1.3+" classname="java.lang.StrictMath"/>
       <available property="jdk1.4+" classname="java.lang.CharSequence"/>
  +    <available property="jdk1.5+" classname="java.util.concurrent.Callable"/>
       <available property="kaffe" classname="kaffe.util.NotImplemented"/>
       <available property="bsf.present"
                  classname="org.apache.bsf.BSFManager"
  @@ -593,18 +616,17 @@
          ===================================================================
     -->
     <target name="build"
  -          depends="prepare, check_for_optional_packages"
  +          depends="prepare, check_for_optional_packages, javac.preset"
             description="--> compiles the source code">
       <mkdir dir="${build.dir}"/>
       <mkdir dir="${build.classes}"/>
       <mkdir dir="${build.lib}"/>
   
  -    <javac srcdir="${java.dir}"
  +    <javac.preset srcdir="${java.dir}"
              destdir="${build.classes}"
              debug="${debug}"
              deprecation="${deprecation}"
              target="${javac.target}"
  -           source="${javac.source}"
              optimize="${optimize}" >
         <classpath refid="classpath"/>
   
  @@ -651,7 +673,7 @@
             </or>
           </not>
         </selector>
  -    </javac>
  +    </javac.preset>
   
       <copy todir="${build.classes}">
         <fileset dir="${java.dir}">
  @@ -1351,16 +1373,15 @@
     <target name="compile-tests" depends="build" if="junit.present">
       <mkdir dir="${build.tests}"/>
   
  -    <javac srcdir="${tests.dir}"
  +    <javac.preset srcdir="${tests.dir}"
              destdir="${build.tests}"
              debug="${debug}"
              target="${javac.target}"
  -           source="${javac.source}"
              deprecation="${deprecation}" >
         <classpath refid="tests-classpath"/>
   
         <selector refid="conditional-patterns"/>
  -    </javac>
  +    </javac.preset>
   
       <!-- Used by AntlibTest.testAntlibResource: -->
       <jar jarfile="${build.tests}/org/apache/tools/ant/taskdefs/test2-antlib.jar">
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message