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

View of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.65 - (download) (as text) (annotate)
Fri Apr 9 20:10:29 2004 UTC (13 years, 7 months ago) by jsr166
Branch: MAIN
Changes since 1.64: +146 -104 lines
Add target to run appletviewer on SwingWorkerDemo
<project name="jsr166" default="usage">

  <description>
------------------------------------------------------------------------------
  Build file for JSR-166

  Usage: ant [target]

  User-specific settings are read from user.properties.
  See user.properties.sample for an explanation of some useful settings.
------------------------------------------------------------------------------
  </description>

  <target name="usage" description="Advises user to run with -projecthelp">
    <echo>Run "ant -projecthelp" for full usage information.</echo>
  </target>


  <!-- User-specific settings -->
  <property file="user.properties"/>


  <!-- Compilation options -->
  <property name="build.sourcelevel"    value="1.5"/>
  <property name="build.debug"          value="true"/>
  <property name="build.debuglevel"     value="source,lines,vars"/>
  <property name="build.deprecation"    value="false"/>

  <!-- Build locations -->
  <property name="build.dir"            location="build"/>
  <property name="build.classes.dir"    location="${build.dir}/classes"/>
  <property name="build.testcases.dir"  location="${build.dir}/testcases"/>
  <property name="build.j1.dir"         location="${build.dir}/j1"/>
  <property name="build.loops.dir"      location="${build.dir}/loops"/>
  <property name="build.lib.dir"        location="${build.dir}/lib"/>
  <property name="build.ant.dir"        location="${build.dir}/ant"/>
  <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>
  <property name="build.reports.dir"    location="${build.dir}/reports"/>
  <property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/>
  <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>
  <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
  <property name="build.dc-filter.dir"  location="${build.dir}/filterdocchk"/>

  <!-- Source locations -->
  <property name="src.dir"              location="${basedir}/src/main"/>
  <property name="test.src.dir"         location="${basedir}/src/test"/>
  <property name="j1.src.dir"           location="${basedir}/src/javaone"/>
  <property name="loops.src.dir"        location="${basedir}/src/loops"/>
  <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
  <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
  <property name="ant.src.dir"          location="${basedir}/etc/ant"/>
  <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>
  <property name="lib.dir"              location="${basedir}/lib"/>
  <property name="dist.dir"             location="${basedir}/dist"/>

  <!-- Distribution locations -->
  <property name="dist.javadocs.dir"    location="${dist.dir}/docs"/>

  <!-- Jar locations -->
  <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
  <property name="junit.jar"            location="${lib.dir}/junit.jar"/>

  <!-- Bootclasspath argument -->
  <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>

  <!-- Test classpath -->
  <path id="test.classpath">
    <pathelement location="${build.testcases.dir}"/>
    <pathelement location="${junit.jar}"/>
  </path>

  <!-- ALoops classpath -->
  <path id="loops.classpath">
    <pathelement location="${build.loops.dir}"/>
  </path>

  <!-- J1 classpath -->
  <path id="j1.classpath">
    <pathelement location="${build.j1.dir}"/>
    <pathelement location="${junit.jar}"/>
  </path>


  <!-- Main targets -->


  <target name="compile"
          depends="init, configure-compiler"
          description="Compiles main sources to build folder">

    <mkdir dir="${build.classes.dir}"/>

    <javac srcdir="${src.dir}"
          destdir="${build.classes.dir}"
            debug="${build.debug}"
       debuglevel="${build.debuglevel}"
      deprecation="${build.deprecation}"
           source="${build.sourcelevel}"
             fork="true">

      <compilerarg line="${build.args}"/>

    </javac>

  </target>



  <target name="jar"
          depends="compile"
          description="Builds library jar from compiled sources">

    <mkdir dir="${build.lib.dir}"/>

    <jar destfile="${product.jar}">
      <fileset dir="${build.classes.dir}"/>
    </jar>

  </target>



  <target name="test"
          depends="init, configure-tests, report-tests"
          description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />



  <target name="docs"
          description="Builds javadocs with custom tags to build folder">

    <delete dir="${build.javadocs.dir}"/>
    <mkdir dir="${build.javadocs.dir}"/>

    <javadoc destdir="${build.javadocs.dir}"
                link="http://java.sun.com/j2se/1.4.1/docs/api"
            overview="${src.dir}/intro.html"
              source="${build.sourcelevel}">

      <tag name="revised" description="Last revised:"/>
      <tag name="spec"    description="Specified by:"/>

      <packageset dir="${src.dir}"/>

    </javadoc>

  </target>



  <target name="doccheck"
          depends="filter-doccheck"
          description="Reports on javadoc style errors">

    <delete dir="${build.doccheck.dir}"/>
    <mkdir dir="${build.doccheck.dir}"/>

    <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
         docletpath="${lib.dir}/doccheck.jar"
            destdir="${build.doccheck.dir}">
      <packageset dir="${build.dc-filter.dir}"/>
    </javadoc>

    <echo>DocCheck output is in ${build.doccheck.dir}</echo>

  </target>



  <target name="checkstyle"
          depends="filter-src"
          description="Reports on style errors in Java source (verbose, mostly chaff)">

    <taskdef resource="checkstyletask.properties"
            classpath="${lib.dir}/checkstyle-all-3.1.jar"/>

    <mkdir dir="${build.checkstyle.dir}"/>

    <checkstyle config="etc/checkstyle/sun_checks.xml"
       failOnViolation="false">
      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
      <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
    </checkstyle>

    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
          out="${build.checkstyle.dir}/checkstyle-report.html"
        style="${stylesheet.dir}/checkstyle-frames.xsl"/>

  </target>



  <target name="dist"
          depends="init, dist-clean, dist-jar, dist-docs"
          description="Puts all distributable products in single hierarchy"/>



  <target name="release"
          depends="dist"
          description="Puts entire CVS tree, plus distribution productions, in a jar">

    <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>

    <jar basedir="${basedir}" destfile="${release.jar}">
      <!-- <exclude name="build/**"/> -->
      <exclude name="${release.jar}"/>
      <exclude name="user.properties"/>
      <exclude name="etc/notes/**"/>
      <exclude name="src/emulation/**"/>
      <exclude name="**/SyntaxTest.java"/>
      <exclude name="**/SuperfluousAbstract.java"/>
    </jar>

  </target>



  <target name="clean"
          description="Removes all build products">

    <delete dir="${build.dir}"/>
    <delete dir="${build.classes.dir}"/>
    <delete dir="${build.lib.dir}"/>

  </target>



  <target name="dist-clean"
          description="Removes all build and distribution products">

    <delete dir="${dist.dir}"/>

  </target>



  <target name="dist-docs"
          description="Builds javadocs without custom tags to dist folder">

    <delete dir="${dist.javadocs.dir}"/>
    <mkdir dir="${dist.javadocs.dir}"/>

    <javadoc destdir="${dist.javadocs.dir}"
                link="http://java.sun.com/j2se/1.4.2/docs/api"
            overview="${src.dir}/intro.html"
              source="${build.sourcelevel}">

      <packageset dir="${src.dir}"/>

    </javadoc>

  </target>



  <!-- Internal targets -->


  <target name="init">

    <!-- Version is kept in a separate file -->
    <loadfile property="version" srcFile="version.properties"/>
    <echo>Building JSR-166 version ${version}</echo>
    <echo>java.home is ${java.home}</echo>

  </target>


  <target name="dist-jar"
          depends="clean, jar">

    <copy file="${product.jar}" todir="${dist.dir}"/>

  </target>


  <target name="compile-ant-filter"
          depends="init">

    <mkdir dir="${build.ant.dir}"/>

    <javac srcdir="${ant.src.dir}"
          destdir="${build.ant.dir}"
           source="1.4"/>

  </target>


  <target name="filter-src"
          depends="compile-ant-filter">

    <mkdir dir="${build.filter.src.dir}"/>

    <copy todir="${build.filter.src.dir}">
      <fileset dir="${src.dir}">
        <include name="**/*.html"/>
      </fileset>
    </copy>

    <copy todir="${build.filter.src.dir}">
      <fileset dir="${src.dir}">
        <exclude name="**/*.html"/>
        <!-- Files excluded from dist-docs -->
        <exclude name="java/util/Random.*"/>
        <exclude name="sun/misc/Unsafe.*"/>
      </fileset>
      <!--
      <filterchain>
      -->

        <!--
         # This filter gets rid of angle-bracketed type parameters
         # so that javadoc can run on the result. The following
         # heuristic 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.)
         -->

        <!--
        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
                      classpath="${build.ant.dir}">
          <param name="notmatching" value="^\s+\*\s.*$"/>
          <param name="pattern"     value="&lt;[^|>()]+?>+"/>
          <param name="replacement" value=" "/>
        </filterreader>
        -->

      <!--
      </filterchain>
      -->
    </copy>

  </target>


  <target name="filter-doccheck"
          depends="filter-src">

    <mkdir dir="${build.dc-filter.dir}"/>

    <copy todir="${build.dc-filter.dir}">
      <fileset dir="${build.filter.src.dir}">
        <include name="**/*.html"/>
      </fileset>
    </copy>

    <property name="generic.declarations"
             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 {}"
    />

    <copy todir="${build.dc-filter.dir}">
      <fileset dir="${build.filter.src.dir}">
        <exclude name="**/*.html"/>
      </fileset>
      <filterchain>
        <!--
         # These two filters try to make the source look like
         # something that doccheck can process. The first removes
         # -source 1.4 assertions and the second adds in a bunch
         # of single letter public nested marker interfaces so that
         # the generic type parameters are recognized.
         -->

        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
                      classpath="${build.ant.dir}">
          <param name="matching"    value="^\s*assert[\s ].*$"/>
          <param name="pattern"     value="assert"/>
          <param name="replacement" value="//assert"/>
        </filterreader>

        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
                      classpath="${build.ant.dir}">
          <param name="matching"    value="^([^*]*(class|interface|implements) .*|)\{.*$"/>
          <param name="pattern"     value="$"/>
          <param name="replacement" value=" ${generic.declarations}"/>
        </filterreader>

      </filterchain>
    </copy>

  </target>


  <target name="compile-tests"
          depends="jar">

    <mkdir dir="${build.testcases.dir}"/>

    <javac srcdir="${tck.src.dir}"
          destdir="${build.testcases.dir}"
            debug="${build.debug}"
       debuglevel="${build.debuglevel}"
      deprecation="${build.deprecation}"
           source="${build.sourcelevel}"
             fork="true">

      <compilerarg value="${bootclasspath.args}"/>
      <compilerarg line="${build.args}"/>

      <classpath refid="test.classpath"/>

    </javac>

    <javac srcdir="${test.src.dir}"
          destdir="${build.testcases.dir}"
            debug="${build.debug}"
       debuglevel="${build.debuglevel}"
      deprecation="${build.deprecation}"
           source="${build.sourcelevel}"
             fork="true">

      <include name="jsr166/test/**"/>

      <compilerarg value="${bootclasspath.args}"/>
      <compilerarg line="${build.args}"/>

      <classpath refid="test.classpath"/>

    </javac>

<!--
    <javac srcdir="${jtreg.src.dir}"
          destdir="${build.testcases.dir}"
            debug="${build.debug}"
       debuglevel="${build.debuglevel}"
      deprecation="${build.deprecation}"
           source="${build.sourcelevel}"
             fork="true">

      <compilerarg value="${bootclasspath.args}"/>
      <compilerarg line="${build.args}"/>

      <classpath refid="test.classpath"/>

    </javac>
-->

  </target>


  <target name="run-tests"
          depends="compile-tests">

    <!-- May be overridden by user.properties -->
    <property name="testcase" value="*"/>

    <mkdir dir="${build.reports.dir}"/>

    <junit printsummary="true"
             showoutput="true"
          errorProperty="junit.failed"
        failureProperty="junit.failed"
                    dir="${build.reports.dir}"
                   fork="true">

      <jvmarg value="${bootclasspath.args}"/>
      <jvmarg value="-server"/>
      <jvmarg value="-showversion"/>

      <classpath refid="test.classpath"/>

      <formatter type="xml"/>

      <batchtest todir="${build.reports.dir}" unless="no.test.tck">
        <fileset dir="${tck.src.dir}">
          <include name="**/${testcase}Test.java"/>
        </fileset>
      </batchtest>

      <batchtest todir="${build.reports.dir}" if="do.test.old">
        <fileset dir="${test.src.dir}">
          <include name="jsr166/test/**/${testcase}Test.java"/>
        </fileset>
      </batchtest>

<!--
      <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
        <fileset dir="${jtreg.src.dir}">
          <include name="**/${testcase}Test.java"/>
        </fileset>
      </batchtest>
-->

    </junit>

  </target>


  <target name="report-tests"
          depends="run-tests">

    <!-- Sets junit.report.format to frames if redirection is present,
         otherwise sets it to noframes. -->
    <available property="junit.report.format"
                  value="frames"
              classname="org.apache.xalan.lib.Redirect"
    />
    <property name="junit.report.format" value="noframes"/>

    <junitreport todir="${build.reports.dir}">
      <fileset dir="${build.reports.dir}">
        <include name="TEST-*.xml"/>
      </fileset>
      <report styledir="${stylesheet.dir}"
                format="${junit.report.format}"
                 todir="${build.reports.dir}"
      />
    </junitreport>

    <fail message="Test Cases Failed" if="junit.failed"/>

  </target>


  <target name="configure-compiler">

    <property name="unchecked.option" value="-Xlint:unchecked"/>

    <condition property="warnunchecked.arg" value="${unchecked.option}">
      <istrue value="${build.warnunchecked}"/>
    </condition>

    <property name="warnunchecked.arg" value=""/>


    <!-- Common options in javac invocations -->
    <property name="build.args" value="${warnunchecked.arg}"/>

  </target>


  <target name="configure-tests"
       depends="configure-compiler">

    <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
    <available property="junit.available"
               classname="junit.framework.Protectable"/>

    <!-- Xalan -->
    <available property="xalan.available"
               classname="org.apache.xalan.Version"/>


    <!-- Ant 1.6beta and later don't need or want this check -->
    <!--
    <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
          unless="junit.available"/>

    <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
          unless="xalan.available"/>
    -->

  </target>



  <!-- Anthill targets -->

  <target name="anthill-build">

    <!-- Override this in user.properties -->
    <property name="tiger.home" location="e:/j2sdk1.5.0"/>

    <exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java">
      <arg value="-Xmx256000000"/>
      <!-- classpath of new JVM -->
      <arg value="-classpath"/> <arg path="${java.class.path}"/>
      <!-- location of Ant home directory -->
      <arg value="-Dant.home=${ant.home}"/>
      <!-- the Ant main class -->
      <arg value="org.apache.tools.ant.Main"/>
      <!-- The build file -->
      <arg value="-buildfile"/>  <arg value="build.xml"/>
      <!-- the target to build on the new Ant instance -->
      <arg value="-DJAVA_HOME=${tiger.home}"/>
      <arg value="do-anthill-build"/>
    </exec>
  </target>

  <target name="do-anthill-build"
          depends="jar, test, docs, dist-docs"/>

  <target name="anthill-publish">

    <copy todir="${deployDir}/docs/private">
      <fileset dir="${build.javadocs.dir}"/>
    </copy>

    <copy todir="${deployDir}/docs/public">
      <fileset dir="${dist.javadocs.dir}"/>
    </copy>

    <copy tofile="${deployDir}/index.html"
          file="${basedir}/etc/anthill-index.html"/>

    <copy todir="${deployDir}/notes">
      <fileset dir="${basedir}/etc/notes"/>
    </copy>

  </target>



  <!-- Various demos and test programs -->


  <target name="sample" depends="init, configure-compiler"
          description="Standalone demo program">

    <mkdir dir="${build.testcases.dir}"/>

    <javac srcdir="${test.src.dir}"
          destdir="${build.testcases.dir}"
            debug="${build.debug}"
       debuglevel="${build.debuglevel}"
      deprecation="${build.deprecation}"
           source="${build.sourcelevel}"
             fork="true">

      <include name="jsr166/test/Sample.java"/>

    </javac>

    <copy todir="${build.testcases.dir}">
      <fileset dir="${test.src.dir}">
        <include name="**/*.properties"/>
      </fileset>
    </copy>


    <java classname="jsr166.test.Sample" fork="true">
      <classpath refid="test.classpath"/>
      <!-- <jvmarg value="-ea"/> -->
      <!-- <jvmarg value="-server"/> -->
      <!-- <arg value="1000"/> -->
    </java>
  </target>


  <target name="loops" depends="init, configure-compiler"
          description="Benchmark from Doug Lea's AQS paper">

    <mkdir dir="${build.loops.dir}"/>

    <javac srcdir="${loops.src.dir}"
          destdir="${build.loops.dir}"
            debug="${build.debug}"
       debuglevel="${build.debuglevel}"
      deprecation="${build.deprecation}"
           source="${build.sourcelevel}"
             fork="true">

      <compilerarg line="${build.args}"/>
      <classpath refid="loops.classpath"/>

    </javac>

    <java classname="ALoops" fork="true">
      <classpath refid="loops.classpath"/>
    </java>

  </target>


  <target name="compile-j1" depends="init, configure-compiler">

    <mkdir dir="${build.j1.dir}"/>

    <javac srcdir="${j1.src.dir}"
          destdir="${build.j1.dir}"
            debug="${build.debug}"
       debuglevel="${build.debuglevel}"
      deprecation="${build.deprecation}"
           source="${build.sourcelevel}"
             fork="true">

      <compilerarg line="${build.args}"/>
      <classpath refid="j1.classpath"/>

    </javac>

  </target>


  <target name="sw" depends="compile-j1"
          description="Runs the SwingWorker demo">

    <!--
    <java classname="jsr166.swing.SwingWorkerDemo" fork="true">
      <classpath refid="j1.classpath"/>
    </java>
    -->

    <copy todir="${build.j1.dir}" file="${j1.src.dir}/jsr166/swing/SwingWorker.html"/>

    <exec dir="${build.j1.dir}" executable="appletviewer.exe">
      <arg value="${build.j1.dir}/SwingWorker.html"/>
    </exec>

  </target>

  <target name="j1" depends="compile-j1"
          description="Runs a standalone JavaOne program">

    <java classname="jsr166.misc.SortedEnumSet" fork="true">
      <classpath refid="j1.classpath"/>
    </java>

  </target>


  <target name="test-j1" depends="compile-j1"
          description="Runs testcases from the JavaOne source directories">

    <junit printsummary="true"
             showoutput="true"
          errorProperty="junit.failed"
        failureProperty="junit.failed"
                    dir="${build.j1.dir}"
                   fork="true">

      <!-- <jvmarg value="-server"/> -->
      <classpath refid="j1.classpath"/>
      <formatter type="xml"/>

      <batchtest todir="${build.j1.dir}">
        <fileset dir="${j1.src.dir}">
          <include name="**/*Test.java"/>
        </fileset>
      </batchtest>

    </junit>

    <available property="junit.report.format"
                  value="frames"
              classname="org.apache.xalan.lib.Redirect"/>
    <property name="junit.report.format" value="noframes"/>

    <junitreport todir="${build.j1.dir}">
      <fileset dir="${build.j1.dir}">
        <include name="TEST-*.xml"/>
      </fileset>
      <report styledir="${stylesheet.dir}"
                format="${junit.report.format}"
                 todir="${build.j1.dir}"
      />
    </junitreport>

    <fail message="Test Cases Failed" if="junit.failed"/>

  </target>



  <!-- C++ and JNI definitions and demos -->

  <target name="configure-cpp">

    <!-- Define tasks and types -->

    <path id="cpptasks.path">
      <pathelement location="${lib.dir}/cpptasks.jar"/>
    </path>
    <taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/>
    <typedef resource="cpptasks.types" classpathref="cpptasks.path"/>

    <!-- Set platform property for JNI includes -->

    <condition property="platform" value="linux">
      <os name="Linux"/>
    </condition>
    <condition property="platform" value="win32">
      <os family="windows"/>
    </condition>
    <condition property="platform" value="solaris">
      <os name="SunOS"/>
    </condition>

  </target>


  <target name="cppdemo" depends="configure-cpp">

    <mkdir dir="${build.dir}"/>

    <cc multithreaded="true"
                 name="g++"
               objdir="${build.dir}"
              outfile="${build.dir}/CppDemo">
      <fileset dir="${test.src.dir}" includes="CppDemo.cpp"/>
      <libset libs="stdc++"/>
    </cc>

    <exec executable="${build.dir}/CppDemo">
      <arg line="count in word frequency of word in command line count"/>
    </exec>

  </target>


  <target name="jnidemo" depends="init, configure-compiler, configure-cpp">

    <mkdir dir="${build.testcases.dir}"/>

    <javac srcdir="${test.src.dir}"
          destdir="${build.testcases.dir}"
            debug="${build.debug}"
       debuglevel="${build.debuglevel}"
      deprecation="${build.deprecation}"
           source="${build.sourcelevel}"
             fork="true">
      <compilerarg value="${bootclasspath.args}"/>
      <compilerarg line="${build.args}"/>
      <classpath refid="test.classpath"/>
      <include name="JniDemo.java"/>
    </javac>

    <javah destdir="${build.testcases.dir}"
      classpathref="test.classpath">
      <class name="JniDemo"/>
    </javah>

    <cc multithreaded="true"
                 name="g++"
               objdir="${build.dir}"
              outfile="${build.dir}/JniDemo"
              outtype="shared">

      <compiler>
        <defineset>
          <define name="__int64" value="long long"/>
        </defineset>
        <includepath location="${java.home}/../include"/>
        <includepath location="${java.home}/../include/${platform}"/>
        <compilerarg value="-mno-cygwin"/>
      </compiler>

      <linker>
        <linkerarg value="--add-stdcall-alias"/>
      </linker>

      <includepath location="${build.testcases.dir}"/>

      <fileset dir="${test.src.dir}" includes="JniDemo.cpp"/>

      <libset libs="stdc++"/>

    </cc>

    <!-- Necessary if windows, harmless if not -->
    <copy file="${build.dir}/libJniDemo.so" tofile="${build.dir}/JniDemo.dll"/>

    <java classname="JniDemo" fork="true">
      <!-- Watch out: path separator hardwired to semicolon here! -->
      <sysproperty key="java.library.path" path="${java.library.path};${build.dir}"/>
      <classpath refid="test.classpath"/>
      <arg line="count in word frequency of word in command line count"/>
    </java>

  </target>



  <!-- Backward compatibility, work in progress (some files not checked in) -->



  <property name="pretiger.src.dir"     location="${build.dir}/pretiger/src"/>
  <property name="build.pretiger.dir"   location="${build.dir}/pretiger/classes"/>
  <property name="pretiger.jar"         location="${build.lib.dir}/jsr166-pretiger.jar"/>
  <property name="pretiger.sourcelevel" value="1.4"/>

  <target name="defang"
       depends="init"
   description="Generates pre-Tiger compatible source">

    <delete dir="${pretiger.src.dir}"/>
    <mkdir dir="${pretiger.src.dir}"/>

    <exec executable="perl">
      <arg file="etc/defang.pl"/>
      <!-- <arg value="-v"/> -->
      <arg value="-s"/> <arg file="${src.dir}"/>
      <arg value="-t"/> <arg file="${pretiger.src.dir}"/>
    </exec>

  </target>

  <target name="compile-pretiger"
          depends="init, configure-compiler, defang"
          description="Compiles pre-Tiger sources to build folder">

    <mkdir dir="${build.pretiger.dir}"/>

    <javac srcdir="${pretiger.src.dir}"
          destdir="${build.pretiger.dir}"
            debug="${build.debug}"
       debuglevel="${build.debuglevel}"
      deprecation="${build.deprecation}"
           source="${pretiger.sourcelevel}"
             fork="true">

      <compilerarg line="${build.args}"/>
      <exclude name="**/Thread.java"/>

    </javac>

  </target>

  <target name="pretiger" depends="compile-pretiger">

    <mkdir dir="${build.lib.dir}"/>

    <jar destfile="${pretiger.jar}">
      <fileset dir="${build.pretiger.dir}">
      </fileset>
    </jar>

  </target>

</project>

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8