6795030: Files in langtools build can be compiled ignoring java.home settings
authorjjg
Wed, 21 Jan 2009 08:21:41 -0800
changeset 1871 9bb6518238ff
parent 1870 57a1138dffc8
child 1872 9820a8bee1e5
6795030: Files in langtools build can be compiled ignoring java.home settings Reviewed-by: mcimadamore
langtools/make/build.xml
--- a/langtools/make/build.xml	Tue Jan 20 18:23:13 2009 -0800
+++ b/langtools/make/build.xml	Wed Jan 21 08:21:41 2009 -0800
@@ -390,8 +390,8 @@
             <attribute name="classes.dir" default="${build.classes.dir}"/>
             <attribute name="gensrc.dir" default="${build.gensrc.dir}"/>
             <attribute name="lib.dir" default="${dist.lib.dir}"/>
-            <attribute name="java" default="java"/>
             <attribute name="javac.bootclasspath" default="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/>
+            <attribute name="javac.java.home" default="${boot.java.home}"/>
             <attribute name="javac.target" default="${javac.target}"/>
             <attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/>
             <attribute name="jarclasspath" default=""/>
@@ -433,6 +433,7 @@
             <attribute name="gensrc.dir" default="${build.gensrc.dir}"/>
             <attribute name="lib.dir" default="${dist.lib.dir}"/>
             <attribute name="javac.bootclasspath" default="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/>
+            <attribute name="javac.java.home" default="${boot.java.home}"/>
             <attribute name="javac.target" default="${javac.target}"/>
             <attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/>
             <attribute name="jarclasspath" default=""/>
@@ -471,6 +472,7 @@
             <attribute name="classes.dir" default="${build.classes.dir}"/>
             <attribute name="gensrc.dir" default="${build.gensrc.dir}"/>
             <attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/>
+            <attribute name="javac.java.home" default="${boot.java.home}"/>
             <attribute name="javac.target" default="${javac.target}"/>
             <attribute name="release" default="${release}"/>
             <attribute name="full.version" default="${full.version}"/>
@@ -493,6 +495,7 @@
                           destdir="@{gensrc.dir}"
                           includes="**/*.properties"/>
                 <javac fork="true"
+                       executable="@{javac.java.home}/bin/javac"
                        srcdir="@{gensrc.dir}"
                        destdir="@{classes.dir}"
                        includes="@{includes}"
@@ -504,6 +507,7 @@
                     <compilerarg line="-Xlint"/>
                 </javac>
                 <javac fork="true"
+                       executable="@{javac.java.home}/bin/javac"
                        srcdir="${src.classes.dir}"
                        destdir="@{classes.dir}"
                        includes="@{includes}"
@@ -540,7 +544,6 @@
                 classes.dir="${build.bootstrap.dir}/classes"
                 bin.dir="${build.bootstrap.dir}/bin"
                 lib.dir="${build.bootstrap.dir}/lib"
-                java="${boot.java}"
                 javac.bootclasspath=""
                 release="${bootstrap.release}"
                 full.version="${bootstrap.full.version}"/>
@@ -562,7 +565,9 @@
     
     <target name="-def-pcompile">
         <mkdir dir="${build.toolclasses.dir}"/>
-        <javac srcdir="${make.tools.dir}/CompileProperties"
+        <javac fork="true"
+               executable="${boot.java.home}/bin/javac"
+               srcdir="${make.tools.dir}/CompileProperties"
                destdir="${build.toolclasses.dir}/"
                classpath="${ant.home}/lib/ant.jar"/>
         <taskdef name="pcompile"