make/build.xml

changeset 288
704bc91a0c41
parent 286
1c1453863ea8
child 392
5f9abeb0bb50
     1.1 --- a/make/build.xml	Thu May 23 13:10:58 2013 +0200
     1.2 +++ b/make/build.xml	Thu May 23 13:36:49 2013 +0200
     1.3 @@ -42,6 +42,8 @@
     1.4      <condition property="hg.executable" value="/usr/local/bin/hg" else="hg">
     1.5        <available file="/usr/local/bin/hg"/>
     1.6      </condition>
     1.7 +    <!-- check if JDK already has ASM classes -->
     1.8 +    <available property="asm.available" classname="jdk.internal.org.objectweb.asm.Type"/>
     1.9      <!-- check if testng.jar is avaiable -->
    1.10      <available property="testng.available" file="${file.reference.testng.jar}"/>
    1.11  
    1.12 @@ -78,7 +80,19 @@
    1.13      <delete dir="${dist.dir}"/>
    1.14    </target>
    1.15  
    1.16 -  <target name="compile" depends="prepare" description="Compiles nashorn">
    1.17 +  <!-- do it only if ASM is not available -->
    1.18 +  <target name="compile-asm" depends="prepare" unless="asm.available">
    1.19 +    <javac srcdir="${jdk.asm.src.dir}"
    1.20 +           destdir="${build.classes.dir}"
    1.21 +           excludes="**/optimizer/* **/xml/* **/attrs/*"
    1.22 +           source="${javac.source}"
    1.23 +           target="${javac.target}"
    1.24 +           debug="${javac.debug}"
    1.25 +           encoding="${javac.encoding}"
    1.26 +           includeantruntime="false"/>
    1.27 +  </target>
    1.28 +
    1.29 +  <target name="compile" depends="compile-asm" description="Compiles nashorn">
    1.30      <javac srcdir="${src.dir}"
    1.31             destdir="${build.classes.dir}"
    1.32             classpath="${javac.classpath}"

mercurial