changeset 290:704bc91a0c41

8015278: Revert accidental changes to build.xml Reviewed-by: jlaskey, lagergren
author attila
date Thu, 23 May 2013 13:36:49 +0200
parents f7eb4436410e
children 8af550dee961
files make/build.xml
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/make/build.xml	Thu May 23 13:10:58 2013 +0200
+++ b/make/build.xml	Thu May 23 13:36:49 2013 +0200
@@ -42,6 +42,8 @@
     <condition property="hg.executable" value="/usr/local/bin/hg" else="hg">
       <available file="/usr/local/bin/hg"/>
     </condition>
+    <!-- check if JDK already has ASM classes -->
+    <available property="asm.available" classname="jdk.internal.org.objectweb.asm.Type"/>
     <!-- check if testng.jar is avaiable -->
     <available property="testng.available" file="${file.reference.testng.jar}"/>
 
@@ -78,7 +80,19 @@
     <delete dir="${dist.dir}"/>
   </target>
 
-  <target name="compile" depends="prepare" description="Compiles nashorn">
+  <!-- do it only if ASM is not available -->
+  <target name="compile-asm" depends="prepare" unless="asm.available">
+    <javac srcdir="${jdk.asm.src.dir}"
+           destdir="${build.classes.dir}"
+           excludes="**/optimizer/* **/xml/* **/attrs/*"
+           source="${javac.source}"
+           target="${javac.target}"
+           debug="${javac.debug}"
+           encoding="${javac.encoding}"
+           includeantruntime="false"/>
+  </target>
+
+  <target name="compile" depends="compile-asm" description="Compiles nashorn">
     <javac srcdir="${src.dir}"
            destdir="${build.classes.dir}"
            classpath="${javac.classpath}"