harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r479920 - in /harmony/enhanced/jdktools/trunk: build.xml make/ make/build-java.xml make/build-native.xml make/build-test.xml make/depends.properties make/depends.xml make/properties.xml modules/launcher/build.xml
Date Tue, 28 Nov 2006 05:58:11 GMT
Author: geirm
Date: Mon Nov 27 21:58:10 2006
New Revision: 479920

URL: http://svn.apache.org/viewvc?view=rev&rev=479920
Log:
copied the high-level build files from classlib
and modified to just build launcher and tools jars


Added:
    harmony/enhanced/jdktools/trunk/build.xml   (with props)
    harmony/enhanced/jdktools/trunk/make/
    harmony/enhanced/jdktools/trunk/make/build-java.xml   (with props)
    harmony/enhanced/jdktools/trunk/make/build-native.xml   (with props)
    harmony/enhanced/jdktools/trunk/make/build-test.xml   (with props)
    harmony/enhanced/jdktools/trunk/make/depends.properties   (with props)
    harmony/enhanced/jdktools/trunk/make/depends.xml   (with props)
    harmony/enhanced/jdktools/trunk/make/properties.xml   (with props)
Modified:
    harmony/enhanced/jdktools/trunk/modules/launcher/build.xml

Added: harmony/enhanced/jdktools/trunk/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/build.xml?view=auto&rev=479920
==============================================================================
--- harmony/enhanced/jdktools/trunk/build.xml (added)
+++ harmony/enhanced/jdktools/trunk/build.xml Mon Nov 27 21:58:10 2006
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+     
+         http://www.apache.org/licenses/LICENSE-2.0
+     
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License. -->
+
+<!-- ====================================================================== 
+     Build source and lay out results in the required format
+     ====================================================================== -->
+<project name="jdktools" default="build" basedir=".">
+    <description>
+    	Build jdktools
+    </description>
+
+    <target name="help">
+        <echo>
+Apache Harmony Ant Build
+
+Usage:
+
+  ant build
+    Compiles the java and native code to produce the tool parts of the jdk in
+    "deploy/jdk".
+
+  ant clean
+    Removes all the files generated by a build.
+
+  ant rebuild
+    Performs a full build - that is 'clean' then 'build'.
+
+  ant test
+    Runs all the tests.
+
+  ant doc
+    Generates the javadoc.
+
+        </echo>
+    </target>
+
+    <property file="${user.home}/.harmony-classlib.properties" />
+
+    <property name="hy.hdk" location="deploy" />
+    <property name="hy.jdk" location="deploy/jdk" />
+
+    <!-- import properties for snapshot targets -->
+    <import file="${basedir}/make/properties.xml" />
+
+    <!-- ================================
+	 target : rebuild
+	     
+	 builds with a clean first
+	 ================================= -->
+    <target name="rebuild" depends="clean,build"
+        description="Performs a full build - that is 'clean' then 'build'" />
+	
+    <target name="build" depends="build-java,build-native"
+        description="Compiles the java and native code to produce a jdk">
+    </target>
+
+    <target name="clean" depends="clean-java,clean-native"
+            description="Removes all the files generated by a build" />
+
+    <!-- ================================
+	 target : rebuild-java
+	     
+	 builds java source with a clean first
+	 ================================= -->
+    <target name="rebuild-java" depends="clean-java,build-java"
+            description="Like 'rebuild' but for java code only" />
+
+    <!-- ================================= 
+          target: build-java              
+
+          runs the build target in build-java.xml
+         ================================= -->
+    <target name="build-java" 
+            description="Compiles the java code only" >
+        <echo>
+========================================
+Building Java component archives...
+========================================
+        </echo>
+        <ant antfile="make/build-java.xml" inheritall="false" target="build">
+            <property name="hy.hdk" value="${hy.hdk}"/>
+        </ant>
+    </target>
+
+    <!-- ================================= 
+          target: clean-java              
+
+          runs the clean target in build-java.xml
+         ================================= -->
+    <target name="clean-java" 
+            description="Removes the compiled java code" >
+        <ant antfile="make/build-java.xml" inheritall="false" target="clean" />
+    </target>
+
+    <!-- ================================
+	 target : rebuild-native
+	     
+	 builds native source with a clean first
+	 ================================= -->
+    <target name="rebuild-native" depends="clean-native,build-native"
+            description="Like 'rebuild' but for native code only" />
+
+    <!-- ================================= 
+          target: build-native             
+
+          runs the build target in build-native.xml
+         ================================= -->
+    <target name="build-native" 
+            description="Compiles the native code only" >
+        <echo>
+========================================
+Building native libs and executables...
+========================================
+        </echo>
+        <ant antfile="make/build-native.xml" inheritall="false" target="build">
+            <property name="hy.hdk" value="${hy.hdk}"/>
+        </ant>
+    </target>
+
+    <!-- ================================= 
+          target: clean-native              
+
+          runs the clean target in build-native.xml
+         ================================= -->
+    <target name="clean-native"
+        description="Removes the compiled native code" >
+
+        <ant antfile="make/build-native.xml" inheritall="false" target="clean" />
+    </target>
+
+    <target name="test"
+            description="Runs all tests">
+        <echo>
+========================================
+Testing class libraries...
+========================================
+</echo>
+        <ant antfile="make/build-test.xml" inheritall="false" target="test-all"/>
+    </target>
+
+
+    <!-- ================================= 
+          target: -properties
+         ================================= -->
+    <target name="-properties" depends="svn-prop">
+        <property name="deploy.file.prefix"
+                  value="incubator-harmony-classlib-r${svn.revision}" />
+        <property name="deploy.tar"
+                  value="${deploy.file.prefix}-${hy.os}-${hy.arch}-snapshot.tar.gz" />
+        <property name="deploy.zip"
+                  value="${deploy.file.prefix}-${hy.os}-${hy.arch}-snapshot.zip" />
+    </target>
+
+    <target name="check-depends"
+            description="Report on whether the dependencies are met">
+        <ant antfile="make/depends.xml" inheritall="false" target="check" />
+    </target>
+
+    <target name="fetch-depends"
+        description="Fetches dependencies. Note: Some of Harmony's dependencies are licensed under terms other than the Apache License v2.">
+        <ant antfile="make/depends.xml" inheritall="false" target="download" />
+    </target>
+
+    <target name="properties" depends="echo"
+        description="Display the properties that are use in the ant build files"
+            />
+
+    <macrodef name="chksum">
+        <attribute name="file" />
+        <attribute name="type" default="md5" />
+        <sequential>
+            <checksum property="@{file}.@{type}" file="@{file}"
+                      algorithm="@{type}" />
+            <echo file="@{file}.@{type}"
+                  message="${@{file}.@{type}}  @{file}${line.separator}" />
+        </sequential>
+    </macrodef>
+
+</project>
+

Propchange: harmony/enhanced/jdktools/trunk/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/jdktools/trunk/make/build-java.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/build-java.xml?view=auto&rev=479920
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/build-java.xml (added)
+++ harmony/enhanced/jdktools/trunk/make/build-java.xml Mon Nov 27 21:58:10 2006
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+     Licensed to the Apache Software Foundation (ASF) under one or more
+     contributor license agreements.  See the NOTICE file distributed with
+     this work for additional information regarding copyright ownership.
+     The ASF licenses this file to You under the Apache License, Version 2.0
+     (the "License"); you may not use this file except in compliance with
+     the License.  You may obtain a copy of the License at
+     
+         http://www.apache.org/licenses/LICENSE-2.0
+     
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License. -->
+
+<!-- ====================================================================== 
+     build-java-source    
+     Compile the Java source and package in component archives.
+     ====================================================================== -->
+<project name="build-java-source" default="default" basedir="..">
+    <description>
+        Compile the Java source and package in component archives.
+    </description>
+
+    <!-- import common properties -->
+    <import file="${basedir}/make/properties.xml" />
+
+    <property name="build.output" location="build/classes" />
+    <property name="depends.jars" location="depends/jars" />
+    <property name="depends.manifests" location="depends/manifests" />
+    <property name="depends.files" location="depends/files" />
+    <property name="hy.hdk" location="deploy" />
+    <property name="hy.jdk" location="deploy/jdk" />
+    <property file="make/depends.properties" />
+
+
+    <!-- ================================= 
+          target: default              
+         ================================= -->
+    <target name="default" 
+        description="Compile the Java source and package in component archives." 
+        depends="clean, build" />
+
+    <!-- ================================= 
+          target: build
+         ================================= -->
+    <target name="build" depends="-layout, -compile"
+            description="Compile Java source and construct deploy directory." />
+
+    <!-- ================================= 
+          target: clean            
+         ================================= -->
+    <target name="clean" depends="-clean-bin, -clean-layout"
+        description="Remove compiled classes and delete the deploy directory."/>
+
+    <!-- ================================= 
+          target: -clean-bin
+          Delete all built classes
+         ================================= -->
+    <target name="-clean-bin"
+            depends="-modules-clean-bin,
+                     -clean-bin-catch-all-test,
+                     -clean-bin-catch-all"/>
+
+    <target name="-modules-clean-bin">
+        <call-modules target="clean" />
+    </target>
+
+    <target name="-clean-bin-catch-all-test">
+        <!-- without this test the pathconvert in the catch all clean
+             target fails -->
+        <available property="catch.all.required"
+                   file="${build.output}" type="dir" />
+    </target>
+
+    <target name="-clean-bin-catch-all" if="catch.all.required">
+        <fileset id="built.files" dir="${build.output}">
+            <include name="**/**" />
+        </fileset>
+        <pathconvert property="built.files.list"
+                     refid="built.files"
+                     pathsep="${line.separator}" />
+        <condition property="built.files.exist">
+            <not>
+                <equals arg1="${built.files.list}" arg2="" />
+            </not>
+        </condition>
+
+        <delete includeemptydirs="true" failonerror="false">
+            <fileset refid="built.files" />
+        </delete>
+
+        <fail if="built.files.exist">
+...
+
+Built files still exist after module clean targets have run.  This
+probably means that one or more patternsets are incomplete.  The
+remaining files are:
+
+${built.files.list}
+
+        </fail>
+    </target>
+
+    <!-- =================================
+          target: -compile
+         ================================= -->
+    <target name="-compile" 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>
+        <mkdir dir="${build.output}" />
+
+        <call-modules target="build" />
+    </target>
+
+
+    <!-- ================================= 
+          target: -layout              
+          Construct the correct directory structure for the class libs
+         ================================= -->
+    <target name="-layout" depends="-prepare-depends">
+
+        <!-- Create the structure -->
+        <mkdir dir="${hy.jdk}/jre/bin" />
+
+        <!-- Copy across the jdk/lib dependency jars -->
+        <copy todir="${hy.jdk}/lib" flatten="yes">
+            <fileset file="${ecj.jar}" />
+        </copy>
+
+    </target>
+
+
+    <!-- ================================= 
+          target: -clean-layout              
+         ================================= -->
+    <target name="-clean-layout">
+        <delete includeemptydirs="true" failonerror="false">
+            <fileset dir="${hy.jdk}">
+                <exclude name="jre/bin/default/**" />
+                <exclude name="jre/bin/**" />
+                <exclude name="jre/lib/ext/**" />
+            </fileset>
+            <fileset dir="${hy.hdk}">
+                <include name="LICENSE" />
+                <include name="NOTICE" />
+            </fileset>
+        </delete>
+    </target>
+
+    <!-- =================================
+         target: -prepare-depends
+         Check for jars required to compile prefs
+         ================================= --> 
+    <target name="-prepare-depends">
+
+        <ant antfile="make/depends.xml" inheritall="false" target="check"/>
+
+    </target>
+
+</project>

Propchange: harmony/enhanced/jdktools/trunk/make/build-java.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/jdktools/trunk/make/build-native.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/build-native.xml?view=auto&rev=479920
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/build-native.xml (added)
+++ harmony/enhanced/jdktools/trunk/make/build-native.xml Mon Nov 27 21:58:10 2006
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+     Licensed to the Apache Software Foundation (ASF) under one or more
+     contributor license agreements.  See the NOTICE file distributed with
+     this work for additional information regarding copyright ownership.
+     The ASF licenses this file to You under the Apache License, Version 2.0
+     (the "License"); you may not use this file except in compliance with
+     the License.  You may obtain a copy of the License at
+     
+         http://www.apache.org/licenses/LICENSE-2.0
+     
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License. -->
+
+<!-- ====================================================================== 
+     build-native-source    
+     Compile the native source into component shared libs.
+     ====================================================================== -->
+<project name="build-native-source" default="default" basedir="..">
+    <description>
+		Compile the native source into component shared libs.
+    </description>
+
+    <!-- import common properties -->
+    <import file="${basedir}/make/properties.xml" />
+
+    <property file="make/depends.properties" />
+
+    <property name="hy.hdk" location="deploy" />
+    <property name="hy.jdk" location="deploy/jdk" />
+    <property name="depends.build" location="depends/build" />
+    <property name="depends.libs" location="depends/libs/${hy.platform}" />
+    <property name="depends.files" location="depends/files" />
+    <property name="native.lib.target" location="${hy.jdk}/lib" />
+
+    <!-- ================================= 
+          target: default              
+         ================================= -->
+    <target name="default" 
+        description="Compile the native source into component shared libs." 
+        depends="clean, build" />
+
+
+    <!-- ================================= 
+          target: build
+         ================================= -->
+    <target name="build"
+        depends=" make-all, layout" />
+
+
+    <!-- ================================= 
+          target: clean              
+         ================================= -->
+    <target name="clean"
+        depends="make-clean, clean-layout" />
+
+
+    <!-- This target invokes make on the all target to compile all natives -->
+    <target name="make-all" >
+    	<!-- Create the target directory structure -->
+        <mkdir dir="${hy.jdk}/jre/bin" />
+        <mkdir dir="${hy.jdk}/include" />
+    	<mkdir dir="${native.lib.target}"/>
+    	
+    	<!-- These module targets take care of building and copying
+             their shared libs -->
+    	<ant dir="modules/launcher" antfile="build.xml" target="build-native" />
+    </target>
+
+
+    <!-- ================================= 
+          target: make-clean              
+         ================================= -->
+    <target name="make-clean"
+        depends="-make-clean" />
+
+    <target name="-make-clean">
+    	<ant dir="modules/launcher" antfile="build.xml" target="clean-native" />
+    	<delete dir="${native.lib.target}" />
+    </target>
+
+
+    <!-- ================================= 
+          target: layout              
+         ================================= -->
+    <target name="layout" depends="layout.windows"
+        description="Construct the correct directory structure for native binaries">
+    </target>
+
+    <target name="layout.windows" if="is.windows">
+        <!-- workaround until msdll is moved. -->
+        <copy file="${msvcr71.dll}" todir="${hy.jdk}/jre/bin" overwrite="yes" />
+    </target>
+
+    <!-- ================================= 
+          target: clean-layout              
+         ================================= -->
+    <target name="clean-layout">
+        <delete includeemptydirs="true" failonerror="false">
+            <fileset dir="${hy.jdk}">
+                <include name="**/bin/java${exe.suffix}" />
+                <include name="**/bin/javaw${exe.suffix}" />
+                <include name="**/bin/*${shlib.suffix}*" />
+            	<include name="**/bin/harmony*.properties" />
+            </fileset>
+        </delete>
+    </target>
+
+
+</project>

Propchange: harmony/enhanced/jdktools/trunk/make/build-native.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/jdktools/trunk/make/build-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/build-test.xml?view=auto&rev=479920
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/build-test.xml (added)
+++ harmony/enhanced/jdktools/trunk/make/build-test.xml Mon Nov 27 21:58:10 2006
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+     Licensed to the Apache Software Foundation (ASF) under one or more
+     contributor license agreements.  See the NOTICE file distributed with
+     this work for additional information regarding copyright ownership.
+     The ASF licenses this file to You under the Apache License, Version 2.0
+     (the "License"); you may not use this file except in compliance with
+     the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<project name="classlib-test" default="test-all" basedir="..">
+
+    <description> Tests for classlib package</description>
+
+    <!-- import common properties -->
+    <import file="${basedir}/make/properties.xml" />
+
+    <!-- set global properties for this build. -->
+
+    <property name="tests.output" location="build/test_report" />
+    <property name="hy.hdk" location="deploy" />
+    <property name="hy.jdk" location="${hy.hdk}/jdk" />
+
+    <property name="tests.build.output" location="build/tests" />
+    <property name="tests.support.output" location="build/test_support" />
+    <property name="support.dir" location="support"/>
+    <property name="tests.depends.jars" location="deploy/jdk/jre/lib/boot" />
+    <property file="make/depends.properties" />
+
+    <!-- this list of components to test will grow to eventually be all modules -->
+    <target name="test-all"
+        depends="clean, test-modules, gen-report, check-test-result">
+    </target>
+
+    <target name="clean">
+        <delete dir="${tests.output}" />
+        <delete dir="${tests.build.output}" />
+        <delete dir="${tests.support.output}" />
+        <delete file="${hy.hdk}/build/test/support.jar" />
+    </target>
+
+    <target name="test-modules" depends="support-jar">
+        <call-modules target="-test-module" />
+    </target>
+
+    <target name="gen-report" depends="full-report,short-report" />
+
+    <target name="full-report" unless="short.report" >
+        <junitreport todir="${tests.output}">
+            <fileset dir="${tests.output}">
+                <include name="TEST*-*.xml"/>
+            </fileset>
+            <report format="frames" todir="${tests.output}/html"/>
+        </junitreport>
+
+        <!-- use this property just to get the slashes to display right in the echo -->
+        <property name="display-location" location="${tests.output}/html/index.html"/>
+        <echo message="The test report is in ${display-location}"/>
+    </target>
+
+    <target name="short-report" if="short.report" >
+        <junitreport todir="${tests.output}">
+            <fileset dir="${tests.output}" includes="TEST*-*.xml">
+                <containsregexp expression='(errors|failures)="[1-9]' />
+                <exclude name="TESTS-TestSuites.xml" />
+            </fileset>
+            <report format="frames" todir="${tests.output}/html"/>
+        </junitreport>
+
+        <!-- use this property just to get the slashes to display right in the echo -->
+        <property name="display-location" location="${tests.output}/html/index.html"/>
+        <echo message="The short test report is in ${display-location}"/>
+    </target>
+
+    <target name="support-jar" depends="compile-support">
+        <mkdir dir="${hy.hdk}/build/test" />
+        <jar destfile="${hy.hdk}/build/test/support.jar"
+             manifest="support/META-INF/MANIFEST.MF">
+            <fileset dir="${tests.support.output}" />
+        </jar>
+    </target>
+
+    <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>
+        <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}">
+
+            <src path="${support.dir}/src/test/java" />
+            <classpath location="${junit.jar}" />
+            <classpath location="${tests.support.output}" />
+            <classpath>
+                <fileset dir="${jetty.dir}">
+                    <include name="*.jar" />
+                </fileset>
+            </classpath>
+            <bootclasspath>
+                <fileset dir="${tests.depends.jars}">
+                    <include name="**/*.jar" />
+                </fileset>
+            </bootclasspath>
+        </javac>
+        
+    </target>
+    
+    <target name="check-test-result">
+        <available property="test.errors"
+                   file="${tests.output}/test.errors" />
+        <available property="test.failures"
+                   file="${tests.output}/test.failures" />
+        <fail if="test.errors" message="There were test errors." />
+        <fail if="test.failures" message="There were test failures." />
+    </target>
+
+    <!-- ================================= 
+          target: copy-test-resources              
+         ================================= -->
+    <target name="copy-test-resources"
+            description="Copy non-Java files from test support tree to the support output tree">
+
+        <mkdir dir="${tests.support.output}" />
+        <copy todir="${tests.support.output}" includeemptydirs="false">
+            <fileset dir="${support.dir}/src/test/java">
+                <exclude name="**/*.java" />
+            </fileset>
+            <fileset file="${support.dir}/src/test/resources/hyts_Foo.c"/>
+        </copy>
+    </target>
+
+    <target name="check-support-jars"
+            description="Check for jars required to compile and run unit tests">
+
+      <ant antfile="make/depends.xml" inheritall="false" target="check"/>
+
+    </target>
+
+    <target name="run-tests" description="Run JUnit tests">
+        <!-- The location of the Harmony launcher can be overridden by 
+             the "harmony.vm.exe" property. Default value of property
+             is set assuming it is under the deploy tree -->
+        <property name="harmony.vm.exe" location="${hy.jdk}/jre/bin/java"/>
+        
+        <!-- Delete "junitCompleted" - an empty file that can be used to
+             check that the junit test VM does not exit prematurely -->
+        <delete file="${user.home}/junitCompleted" failonerror="false" />
+
+        <path id="classpath.id" location="${tests.build.output}" />
+        
+        <java classname="tests.main.AllTests"
+              fork="true"
+              jvm="${harmony.vm.exe}">
+            
+
+            <!-- Required by various tests that set security manager etc -->
+            <jvmarg value="-Djava.security.policy=${support.dir}/src/test/resources/config/testing.policy" />
+
+            <!-- Required for running the java.net unit tests -->
+            <jvmarg value="-Dtest.ini.file=${support.dir}/src/test/resources/config/localhosttest.ini" />
+
+            <!-- Required if using the test excluder decorator -->
+            <jvmarg value="-Dexcludes.file.uri=file:///${support.dir}/src/test/resources/config/jcltest-excludes.xml" />
+            
+            <classpath>
+                <path refid="classpath.id" />
+                <pathelement location="${junit.jar}" />
+            </classpath>
+        </java>
+    </target>
+
+    
+    <!-- ================================= 
+          target: run-tests-with-junit-task
+         ================================= -->
+    <target name="run-tests-with-junit-task" description="Run JUnit tests">
+        <!-- The location of the Harmony launcher can be overridden by 
+             the "harmony.vm.exe" property. Default value of property
+             is set assuming it is under the deploy tree -->
+        <property name="harmony.vm.exe" location="${hy.jdk}/jre/bin/java"/>
+
+        <!-- Delete "junitCompleted" - an empty file that can be used to
+             check that the junit test VM does not exit prematurely -->
+        <delete file="${user.home}/junitCompleted" failonerror="false" />
+
+        <path id="classpath.id" location="${tests.build.output}" />
+        
+        <junit fork="true"
+               forkmode="once"
+               jvm="${harmony.vm.exe}"
+               errorproperty="tests.failed"
+               failureproperty="tests.failed">
+
+            <env key="LD_LIBRARY_PATH" value="" />
+            <!-- required to be unset on Linux -->
+
+            <!-- Required by various tests that set security manager etc -->
+            <jvmarg value="-Djava.security.policy=${support.dir}/src/test/resources/config/testing.policy" />
+
+            <!-- Required for running the java.net unit tests -->
+            <jvmarg value="-Dtest.ini.file=${support.dir}/src/test/resources/config/localhosttest.ini" />
+
+            <!-- Required if using the test excluder decorator -->
+            <jvmarg value="-Dexcludes.file.uri=file:///${support.dir}/src/test/resources/config/jcltest-excludes.xml" />
+            
+            <classpath>
+                <path refid="classpath.id" />
+                <pathelement location="${junit.jar}" />
+            </classpath>
+            
+            <formatter type="plain" usefile="false" />
+            <formatter type="xml" />
+            
+            <test todir="${tests.results.dir}" name="tests.main.AllTests" />
+        </junit>
+
+        <fail if="tests.failed" message="Some Tests Failed !" />
+
+        <!-- if the junit test process completed as expected, this file
+             should now exist -->
+        <fail message="JUnit task ended prematurely - Hint: This may have been caused by the test VM terminating unexpectedly during the test run">
+            <condition>
+                <not>
+                    <available file="${user.home}/junitCompleted" />
+                </not>
+            </condition>
+        </fail>
+        <!-- Clean up after ourselves -->
+        <delete file="${user.home}/junitCompleted" />
+    </target>
+
+</project>

Propchange: harmony/enhanced/jdktools/trunk/make/build-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/jdktools/trunk/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/depends.properties?view=auto&rev=479920
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/depends.properties (added)
+++ harmony/enhanced/jdktools/trunk/make/depends.properties Mon Nov 27 21:58:10 2006
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+depends.dir=depends
+depends.jars=${depends.dir}/jars
+ibiblio.base=http://www.ibiblio.org
+
+ecj.dir=${depends.jars}/ecj_3.2
+ecj.jar=${ecj.dir}/ecj_3.2.jar
+ecj.url=http://download.eclipse.org/eclipse/downloads/drops/R-3.2-200606291905/ecj.jar
+ecj.md5=633e14a4dc14ca578b5548c3c088172f
+

Propchange: harmony/enhanced/jdktools/trunk/make/depends.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/jdktools/trunk/make/depends.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/depends.xml?view=auto&rev=479920
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/depends.xml (added)
+++ harmony/enhanced/jdktools/trunk/make/depends.xml Mon Nov 27 21:58:10 2006
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- 
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+     
+      http://www.apache.org/licenses/LICENSE-2.0
+     
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+  implied.  See the License for the specific language governing
+  permissions and limitations under the License.
+
+ -->
+
+<project name="dependencies" default="check" basedir="..">
+    <description>
+    Confirm that dependencies are present and fetch missing dependencies
+    where possible.
+    </description>
+
+    <property file="make/depends.properties" />
+    <import file="${basedir}/make/properties.xml" />
+
+    <target name="check" description="Check whether dependencies are available"
+            depends="-check" />
+
+    <target name="-check">
+        <check-one-file src="${ecj.url}" dest="${ecj.jar}" />
+    </target>
+
+    <target name="download" description="Download required jars"
+            depends="-download" />
+
+    <target name="-download">
+
+    <mkdir dir="${ecj.dir}" />
+    <download-one-file src="${ecj.url}" dest="${ecj.jar}"
+                           md5="${ecj.md5}" />
+        
+    </target>
+
+
+    <macrodef name="download-one-file">
+        <attribute name="src" />
+        <attribute name="dest" />
+        <attribute name="md5" />
+        <sequential>
+            <echo>Checking @{dest}</echo>
+        <available file="@{dest}" type="file"
+                       property="@{dest}.exists" />
+            <antcall target="-really-download">
+                <param name="src" value="@{src}" />
+                <param name="dest" value="@{dest}" />
+            </antcall>
+            <checksum file="@{dest}" property="@{dest}.md5" />
+            <condition property="@{dest}.md5.verified" value="true">
+                <equals arg1="${@{dest}.md5}" arg2="@{md5}" />
+            </condition>
+            <antcall target="-remove-file-if-bad">
+                <param name="jar" value="@{dest}" />
+            </antcall>
+        <fail unless="@{dest}.md5.verified">
+...
+
+File @{dest} has incorrect md5 checksum.  Expected:
+  @{md5}
+found:
+  ${@{dest}.md5}
+
+            </fail>
+            <echo>Checksum verified (${@{dest}.md5.verified})</echo>
+        </sequential>
+    </macrodef>
+
+    <target name="-really-download" unless="${dest}.exists">
+        <echo>Fetching ${dest}</echo>
+    <get src="${src}" dest="${dest}" usetimestamp="true" verbose="true" />
+    </target>
+
+    <target name="-remove-file-if-bad" unless="${dest}.md5.verified">
+        <delete file="${dest}" />
+    </target>
+
+    <macrodef name="check-one-file">
+        <attribute name="src" />
+        <attribute name="dest" />
+        <sequential>
+            <echo>Checking for @{dest}</echo>
+        <available file="@{dest}" type="file"
+                       property="@{dest}.exists" />
+        <fail>
+        <condition>
+            <not>
+            <isset property="@{dest}.exists" />
+            </not>
+        </condition>
+...
+
+Missing dependency.  The jar from:
+
+  @{src}
+
+should be downloaded to:
+
+  @{dest}
+
+Run "ant fetch-depends" to automatically fetch dependencies.
+Note: Some of Harmony's dependencies are licensed under terms other
+than the Apache License v2.
+            </fail>
+        </sequential>
+    </macrodef>
+
+    <target name="-awt-tar-extract" unless="awtdeps.uptodate">
+        <echo>Extracting awt dependencies</echo>
+    <untar src="${awtdeps.tar}" dest="${awtdeps.extract.dir}"
+               compression="gzip" />
+        <echo file="${awtdeps.testfile}"
+              message="${awtdeps.tar} extracted${line.separator}" />
+    </target>
+
+    <macrodef name="check-one-link">
+        <attribute name="src" />
+        <attribute name="dest" />
+        <attribute name="message" />
+        <sequential>
+            <echo>Checking for @{dest}</echo>
+        <available file="@{dest}" type="file"
+                       property="@{dest}.exists" />
+        <available file="@{src}" type="file"
+                       property="@{src}.exists" />
+        <fail>
+        <condition>
+                    <and>
+                <not>
+                <isset property="@{dest}.exists" />
+                        </not>
+                        <not>
+                <isset property="@{src}.exists" />
+                </not>
+                    </and>
+        </condition>
+...
+
+Missing dependency.  The file from:
+
+  @{src}
+
+should be linked to:
+
+  @{dest}
+
+But @{src} doesn't exist.
+@{message}
+            </fail>
+            <antcall target="-really-link">
+                <param name="src" value="@{src}" />
+                <param name="dest" value="@{dest}" />
+            </antcall>
+        </sequential>
+    </macrodef>
+
+    <target name="-really-link" unless="${dest}.exists">
+        <echo>Linking ${dest}</echo>
+        <symlink resource="${src}" link="${basedir}/${dest}" />
+    </target>
+
+</project>

Propchange: harmony/enhanced/jdktools/trunk/make/depends.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/jdktools/trunk/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/properties.xml?view=auto&rev=479920
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/properties.xml (added)
+++ harmony/enhanced/jdktools/trunk/make/properties.xml Mon Nov 27 21:58:10 2006
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+  implied.  See the License for the specific language governing
+  permissions and limitations under the License.
+
+ -->
+
+<project name="Top-Level property definitions" default="echo" basedir="..">
+    <description>
+        Ant file of common properties to be imported by other ant files
+    </description>
+
+    <!-- Javac properties -->
+    <!-- Explicitly set to ECJ as the default compiler. -->
+    <property name="hy.javac.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
+    <property name="hy.javac.source" value="1.5" />
+    <property name="hy.javac.target" value="1.5" />
+    <property name="hy.javac.debug" value="on" />
+    <property name="hy.javac.maxmem" value="384M" />
+
+    <!-- Test run property -->
+    <property name="hy.test.forkmode" value="once" />
+    <property name="hy.test.timeout" value="900000" />
+    <property name="hy.test.vm.name" value="ibm" />
+
+    <!-- Conditions for operating systems -->
+    <condition property="is.windows">
+        <os family="Windows" />
+    </condition>
+    <condition property="is.linux">
+        <os name="linux" />
+    </condition>
+    <condition property="is.unix">
+        <os family="unix" />
+    </condition>
+
+    <!-- Normalized operating system name -->
+
+    <!-- this special case makes sense -->
+    <condition property="hy.os" value="windows">
+        <isset property="is.windows"/>
+    </condition>
+    <condition property="hy.os" value="linux">
+        <os name="linux" />
+    </condition>
+
+    <property name="hy.os" value="${os.name}" />
+
+
+
+    <!-- Conditions for different architectures -->
+    <condition property="is.x86_64">
+        <or>
+            <equals arg1="x86_64" arg2="${os.arch}"/>
+            <equals arg1="amd64" arg2="${os.arch}"/>
+        </or>
+    </condition>
+    <condition property="is.x86">
+	<and>
+	    <not>
+                <isset property="is.x86_64" />
+            </not>
+            <or>
+                <equals arg1="x86" arg2="${os.arch}"/>
+                <equals arg1="i386" arg2="${os.arch}"/>
+            </or>
+        </and>
+    </condition>
+    <condition property="is.ia64">
+        <equals arg1="ia64" arg2="${os.arch}"/>
+    </condition>
+    <condition property="is.64bit">
+        <or>
+            <isset property="is.ia64" />
+            <isset property="is.x86_64" />
+        </or>
+    </condition>
+    <condition property="is.32bit">
+        <or>
+            <isset property="is.x86" />
+        </or>
+    </condition>
+    <condition property="hy.bits" value="32">
+        <isset property="is.32bit" />
+    </condition>
+    <property name="hy.bits" value="64" />
+
+    <!-- Normalized architecture name -->
+    <condition property="hy.arch" value="x86_64">
+        <isset property="is.x86_64" />
+    </condition>
+    <condition property="hy.arch" value="x86">
+        <and>
+            <isset property="is.x86" />
+            <isset property="is.32bit" />
+        </and>
+    </condition>
+    <property name="hy.arch" value="${os.arch}" />
+    
+    <condition property="hy.arch.define" value="HYX86">
+        <equals arg1="${hy.arch}" arg2="x86"/>
+    </condition>
+    <condition property="hy.arch.define" value="HYX86_64">
+        <equals arg1="${hy.arch}" arg2="x86_64"/>
+    </condition>
+    <condition property="hy.arch.define" value="HYIA64">
+        <equals arg1="${hy.arch}" arg2="ia64"/>
+    </condition>
+
+    <condition property="hy.cflags" value="-fpic">
+        <equals arg1="${hy.arch}" arg2="x86_64"/>
+    </condition>
+    <condition property="hy.cflags" value="-march=pentium3">
+        <not>
+            <equals arg1="${hy.arch}" arg2="ia64"/>
+        </not>
+    </condition>
+    
+    <!-- Normalized platform name -->
+    <property name="hy.platform" value="${hy.os}.${hy.arch}"/>
+    <property name="hy.platform.path" value="${hy.os}/${hy.arch}"/>
+
+    <condition property="exe.suffix" value=".exe">
+        <isset property="is.windows"/>
+    </condition>
+    <property name="exe.suffix" value="" />
+
+    <condition property="shlib.suffix" value=".dll">
+        <isset property="is.windows"/>
+    </condition>
+    <property name="shlib.suffix" value=".so" />
+
+    <condition property="linklib.suffix" value=".lib">
+        <isset property="is.windows"/>
+    </condition>
+    <property name="linklib.suffix" value=".so" />
+
+    <condition property="make.command" value="nmake.exe">
+        <isset property="is.windows"/>
+    </condition>
+    <property name="make.command" value="make" />
+
+    <property name="png.home" value="/usr" />
+    <property name="lcms.home" value="/usr" />
+    <property name="jpeg.home" value="/usr" />
+
+    <!-- default property for call-modules macro - i.e. all modules -->
+    <property name="build.module" value="*" />
+
+    <target name="echo" depends="svn-prop, svn-info"
+            description="Display the properties defined by this ant file" >
+        <echo>
+Harmony javac properties:
+
+  hy.javac.compiler = ${hy.javac.compiler}
+  hy.javac.target = ${hy.javac.target}
+  hy.javac.source = ${hy.javac.source}
+  hy.javac.debug  = ${hy.javac.debug}
+  hy.javac.maxmem = ${hy.javac.maxmem}
+
+Harmony platform properties:
+
+  hy.os = ${hy.os}
+  hy.arch = ${hy.arch}
+  hy.bits = ${hy.bits}
+  hy.platform = ${hy.platform}
+  hy.platform.path = ${hy.platform.path}
+
+  is.windows = ${is.windows}
+  is.unix = ${is.unix}
+  is.linux = ${is.linux}
+  is.32bit = ${is.32bit}
+  is.64bit = ${is.64bit}
+  is.x86 = ${is.x86}
+  is.x86_64 = ${is.x86_64}
+  is.ia64 = ${is.ia64}
+
+  exe.suffix = ${exe.suffix}
+  shlib.suffix = ${shlib.suffix}
+  make.command = ${make.command}
+
+  hy.hdk = ${hy.hdk}
+  hy.cflags = ${hy.cflags}
+  hy.arch.define = ${hy.arch.define}
+
+
+The following property is only set if the "svn-prop" target has been
+called:
+
+  svn.revision = ${svn.revision}
+
+
+The following property is only set if the "svn-info" target has been
+called:
+
+  svn.info = ${svn.info}
+
+Ant native properties, for information, but please use Harmony
+properties in preference to these:
+
+  os.name = ${os.name}
+  os.arch = ${os.arch}
+
+        </echo>
+    </target>
+
+    <target name="svn-prop">
+        <exec executable="svn">
+            <arg value="--non-interactive" />
+            <arg value="info" />
+            <redirector outputproperty="svn.revision">
+                <outputfilterchain>
+                    <linecontains>
+                        <contains value="Revision: " />
+                    </linecontains>
+                    <tokenfilter>
+                        <replacestring from="Revision: " to=""/>
+                    </tokenfilter>
+                </outputfilterchain>
+            </redirector>
+        </exec>
+    </target>
+
+    <target name="svn-info">
+        <exec executable="svn"
+              failifexecutionfails="false"
+              resultproperty="svn.rc">
+            <arg value="info" />
+            <redirector outputproperty="svn.info.tmp">
+                <outputfilterchain>
+                    <linecontainsregexp>
+                        <regexp pattern="Repository Root:|Revision:" />
+                    </linecontainsregexp>
+                    <tokenfilter>
+                        <replacestring from="Repository Root: " to=""/>
+                        <replacestring from="Revision: " to=" "/>
+                    </tokenfilter>
+                    <striplinebreaks/>
+                </outputfilterchain>
+            </redirector>
+        </exec>
+        <condition property="svn.info" value="${svn.info.tmp}" >
+            <equals arg1="${svn.rc}" arg2="0" />
+        </condition>
+        <tstamp>
+            <format property="svn.info" pattern="'Unknown revision at' dd-MMM-yyyy hh:mm aa"/>
+        </tstamp>
+    </target>
+
+    <macrodef name="call-modules">
+        <attribute name="target" />
+        <sequential>
+            <subant target="@{target}">
+                <dirset dir="modules" includes="${build.module}" />
+            </subant>
+        </sequential>
+    </macrodef>
+
+    <!-- macros for modules -->
+    <!-- TOFIX move to a shared file in the HDK/build/make directory. -->
+
+    <macrodef name="make">
+        <attribute name="dir" />
+        <attribute name="target" default="" />
+        <sequential>
+            <exec failonerror="true"
+                  executable="${make.command}"
+                  dir="@{dir}">
+                <env key="HY_HDK" value="${hy.hdk}" />
+                <env key="HY_ARCH" value="${hy.arch}" />
+                <env key="HY_OS" value="${hy.os}" />
+                <env key="HY_PLATFORM" value="${hy.platform}" />
+                <env key="HY_CFLAGS" value="${hy.cflags}" />
+                <env key="HY_ARCH_DEFINE" value="${hy.arch.define}" />
+                <arg line="@{target}" />
+            </exec>
+        </sequential>
+    </macrodef>
+</project>

Propchange: harmony/enhanced/jdktools/trunk/make/properties.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/jdktools/trunk/modules/launcher/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/launcher/build.xml?view=diff&rev=479920&r1=479919&r2=479920
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/launcher/build.xml (original)
+++ harmony/enhanced/jdktools/trunk/modules/launcher/build.xml Mon Nov 27 21:58:10 2006
@@ -28,7 +28,9 @@
 
     <property file="../../make/depends.properties" />
 
-    <!-- Build secondary native luni components -->
+    <target name="build-native" depends="build"/>
+    <target name="clean-native" depends="clean"/>
+
     <target name="build" >
 
         <!-- Build launcher executables -->



Mime
View raw message