harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r584052 - in /harmony/enhanced: classlib/trunk/make/build-java.xml classlib/trunk/make/build-test.xml classlib/trunk/make/properties.xml jdktools/trunk/make/build-java.xml trunk/build.xml
Date Fri, 12 Oct 2007 05:36:00 GMT
Author: varlax
Date: Thu Oct 11 22:35:57 2007
New Revision: 584052

URL: http://svn.apache.org/viewvc?rev=584052&view=rev
Log:
Fix for HARMONY-4915 [build] cannot override default Java compiler

Modified:
    harmony/enhanced/classlib/trunk/make/build-java.xml
    harmony/enhanced/classlib/trunk/make/build-test.xml
    harmony/enhanced/classlib/trunk/make/properties.xml
    harmony/enhanced/jdktools/trunk/make/build-java.xml
    harmony/enhanced/trunk/build.xml

Modified: harmony/enhanced/classlib/trunk/make/build-java.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/make/build-java.xml?rev=584052&r1=584051&r2=584052&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/make/build-java.xml (original)
+++ harmony/enhanced/classlib/trunk/make/build-java.xml Thu Oct 11 22:35:57 2007
@@ -113,13 +113,7 @@
           target: -compile
          ================================= -->
     <target name="-compile" depends="-prepare-depends, -layout">
-        <fail message="The Eclipse compiler class for Ant could not be found. Please place
the ECJ JAR in ANT_HOME/lib. The JAR can be downloaded directly from eclipse.org or copied
from COMMON_RESOURCES/depends/jars/ecj_3.x folder after the fetch-depends target for JDKTOOLS
has been run.">
-            <condition>
-                <not>
-                    <available classname="org.eclipse.jdt.core.JDTCompilerAdapter"/>
-                </not>
-            </condition>
-        </fail>
+        <ensure-javac/>
         <mkdir dir="${build.output}" />
 
         <hy.javac destdir="${build.output}"

Modified: harmony/enhanced/classlib/trunk/make/build-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/make/build-test.xml?rev=584052&r1=584051&r2=584052&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/make/build-test.xml (original)
+++ harmony/enhanced/classlib/trunk/make/build-test.xml Thu Oct 11 22:35:57 2007
@@ -107,21 +107,10 @@
 
     <target name="compile-support" depends="copy-test-resources, check-support-jars"
             description="Compile the unit test source">
-        <fail message="The Eclipse compiler class for Ant could not be found. Please place
the ECJ JAR in ANT_HOME/lib. The JAR can copied from CLASSLIB_TRUNK/depends/jars/ecj_3.2 folder
after the fetch-depends target has been run.">
-            <condition>
-                <not>
-                    <available classname="org.eclipse.jdt.core.JDTCompilerAdapter"/>
-                </not>
-            </condition>
-        </fail>
+        <ensure-javac/>
         <mkdir dir="${tests.support.output}" />
-        <javac 
-               destdir="${tests.support.output}"
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
+        <hy.javac 
+               destdir="${tests.support.output}">
 
             <src path="${support.dir}/src/test/java" />
             <classpath location="${junit.jar}" />
@@ -136,7 +125,7 @@
                     <include name="**/*.jar" />
                 </fileset>
             </bootclasspath>
-        </javac>
+        </hy.javac>
         
     </target>
     

Modified: harmony/enhanced/classlib/trunk/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/make/properties.xml?rev=584052&r1=584051&r2=584052&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/make/properties.xml (original)
+++ harmony/enhanced/classlib/trunk/make/properties.xml Thu Oct 11 22:35:57 2007
@@ -42,7 +42,7 @@
     </condition>
 
     <!-- Local variable tables should be available in debug, and unavailable in release
modes. -->
-    <condition property="build.compilerarg" value="-warn:none -g" else="-warn:none -g:lines,source">
+    <condition property="build.compilerarg" value="-nowarn -g" else="-nowarn -g:lines,source">
         <equals arg1="${hy.cfg}" arg2="debug" />
     </condition>
 
@@ -513,6 +513,24 @@
            </concat>
        </sequential>
    </macrodef>
+    
+    <macrodef name="ensure-javac">
+        <sequential>
+            <fail>
+                <condition>
+                    <and>
+                        <equals arg1="${hy.javac.compiler}" arg2="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+                        <not>
+                            <available classname="${hy.javac.compiler}"/>
+                        </not>
+                    </and>
+                </condition>
+The Eclipse compiler class for Ant could not be found. Please place the ECJ JAR in ANT_HOME/lib.
+The JAR can be downloaded directly from eclipse.org or copied from COMMON_RESOURCES/depends/jars/ecj_3.x
folder after the fetch-depends target for JDKTOOLS has been run.
+Alternatively, you can switch to another compiler, e.g. specify '-Dhy.javac.compiler=modern'
for classic javac.                
+            </fail>
+        </sequential>
+    </macrodef>
    
    <presetdef name="hy.javac">
        <javac target="${hy.javac.target}" source="${hy.javac.source}" 

Modified: harmony/enhanced/jdktools/trunk/make/build-java.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/build-java.xml?rev=584052&r1=584051&r2=584052&view=diff
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/build-java.xml (original)
+++ harmony/enhanced/jdktools/trunk/make/build-java.xml Thu Oct 11 22:35:57 2007
@@ -62,13 +62,19 @@
           invokes target build-java for all modules
          ================================= -->
     <target name="build-modules" depends="-prepare-depends">
-        <fail message="The Eclipse compiler class for Ant could not be found. Please place
the ECJ JAR in ANT_HOME/lib. The JAR can copied from CLASSLIB_TRUNK/depends/jars/ecj_3.2 folder
after the fetch-depends target has been run.">
-            <condition>
-                <not>
-                    <available classname="org.eclipse.jdt.core.JDTCompilerAdapter"/>
-                </not>
-            </condition>
-        </fail>
+            <fail>
+                <condition>
+                    <and>
+                        <equals arg1="${hy.javac.compiler}" arg2="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+                        <not>
+                            <available classname="${hy.javac.compiler}"/>
+                        </not>
+                    </and>
+                </condition>
+The Eclipse compiler class for Ant could not be found. Please place the ECJ JAR in ANT_HOME/lib.
+The JAR can be downloaded directly from eclipse.org or copied from COMMON_RESOURCES/depends/jars/ecj_3.x
folder after the fetch-depends target for JDKTOOLS has been run.
+Alternatively, you can switch to another compiler, e.g. specify '-Dhy.javac.compiler=modern'
for classic javac.                
+            </fail>
         <mkdir dir="${build.output}" />
         <call-modules target="build-java" />
     </target>

Modified: harmony/enhanced/trunk/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/build.xml?rev=584052&r1=584051&r2=584052&view=diff
==============================================================================
--- harmony/enhanced/trunk/build.xml (original)
+++ harmony/enhanced/trunk/build.xml Thu Oct 11 22:35:57 2007
@@ -60,7 +60,8 @@
 
     <target name="build-all"
         description="build complete implementation"
-        depends="build_classlib,
+        depends="show_props,
+                 build_classlib,
                  build_vm,
                  build_commonresources,
                  build_jdktools"/>
@@ -396,6 +397,7 @@
             <arg line="build.sh -Dexternal.dep.CLASSLIB.loc=${drlvm.classlib.offset}"/>
             <arg line="-Ddeploy.canonical.flag=true"/>
             <arg line="-Dsvn.revision=${harmony.version}" />
+            <arg line="${custom.props}"/>
             <env key="BUILD_CFG" value="${hy.cfg}"/>
         </exec>
     </target>
@@ -430,6 +432,7 @@
         <exec executable="cmd" dir="working_vm/build" failonerror="true">
             <arg line="/c build.bat -Dexternal.dep.CLASSLIB.loc=${drlvm.classlib.offset}"/>
             <arg line="-Ddeploy.canonical.flag=true"/>
+            <arg line="${custom.props}"/>
             <env key="BUILD_CFG" value="${hy.cfg}"/>
             <env key="CXX" value="msvc"/>
         </exec>
@@ -656,6 +659,12 @@
         <!-- copy symbol debug info to debug build on Windows -->
         <condition property="copy.progdb">
             <equals arg1="${hy.cfg}" arg2="debug" />
+        </condition>
+        
+        <!-- workaround for drlvm build till it starts with a script-->
+        <condition property="custom.props" value="-Dhy.javac.compiler=${hy.javac.compiler}"
+            else="">
+            <isset property="hy.javac.compiler"/>
         </condition>
 
     </target>



Mime
View raw message