harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r480322 - in /harmony/enhanced/jdktools/trunk/modules/jpda: build-test.xml build.xml
Date Wed, 29 Nov 2006 01:33:25 GMT
Author: geirm
Date: Tue Nov 28 17:33:23 2006
New Revision: 480322

URL: http://svn.apache.org/viewvc?view=rev&rev=480322
Log:
checkpoint commit - working with these to change from 
DRLVM style build to classlib style build

So far, can build working code for linux.

These build files don't really work yet


Added:
    harmony/enhanced/jdktools/trunk/modules/jpda/build-test.xml   (with props)
    harmony/enhanced/jdktools/trunk/modules/jpda/build.xml   (with props)

Added: harmony/enhanced/jdktools/trunk/modules/jpda/build-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/build-test.xml?view=auto&rev=480322
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/build-test.xml (added)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/build-test.xml Tue Nov 28 17:33:23 2006
@@ -0,0 +1,392 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+     Licensed 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="HarmonyJPDABuild" default="build" basedir=".">
+
+    <description> Build for JPDA stuff </description>
+
+    <!-- import common properties -->
+    <property name="hy.hdk" location="${basedir}/../../deploy" />
+    <import file="${hy.hdk}/build/ant/properties.xml" />
+
+    <!-- set global properties for this build. -->
+    <property name="java.source.ver" value="1.4" />
+    <property name="java.target.ver" value="1.4" />
+    <property name="classlib.path" location="../../../../trunk/working_classlib" />
+    <property name="harmony.depends.jars.path" location="../../../../common_resources/depends/jars"
/>
+    <property name="harmony.include.path" value="${classlib.path}/modules/luni/src/main/native/include"
/>
+    <property name="build.path" location="../../" />
+    <property name="deploy.path" location="${build.path}/deploy" />
+    <property environment="env" />
+
+    <!-- Detect Windows platform -->
+    <condition property="is.win" value="true">
+        <os family="windows" />
+    </condition>
+
+    <!-- Detect Linux platform -->
+    <condition property="is.linux" value="true">
+        <os family="unix" />
+    </condition>
+
+    <!-- Init Windows specific properties -->
+    <target name="setname.win" if="is.win">
+        <property name="sep" value=";" />
+        <property name="platform.name" value="windows" />
+        <property name="library.prefix" value="" />
+        <property name="library.ext" value=".dll" />
+        <property name="runtime.property" value="dynamic" />
+        <property name="native.compiler" value="msvc" />
+        <property name="jni_h.path" value="${classlib.path}/deploy/jdk/include:${harmony.include.path}/windows:${harmony.include.path}/shared"
/>
+        <echo message="Windows init done."/>
+    </target>
+
+    <!-- Init Linux specific properties -->
+    <target name="setname.linux" if="is.linux">
+        <property name="sep" value=":" />
+        <property name="platform.name" value="linux" />
+        <property name="library.prefix" value="lib" />
+        <property name="library.ext" value=".so" />
+        <property name="runtime.property" value="dynamic" />
+        <property name="native.compiler" value="gcc" />
+        <property name="jni_h.path" value="${classlib.path}/deploy/jdk/include:${harmony.include.path}/linux:${harmony.include.path}/shared"
/>
+        <echo message="Linux init done."/>
+    </target>
+
+    <!-- Init common properties -->
+    <target name="init" depends="setname.win, setname.linux">
+        <echo message="Init: platform.name=${platform.name}" />
+
+        <!-- Debug options -->
+        <property name="java.debug.option" value="on" />
+        <property name="native.debug.option" value="on" />
+
+        <!-- Warnings options -->
+        <property name="native.warnings.option" value="default" />
+
+        <!-- Force _DEBUG/NDEBUG macros to be passed to native comiler  -->
+        <condition property="debug.def" value="_DEBUG"><istrue value="${native.debug.option}"/></condition>
+        <condition property="debug.def" value="NDEBUG"><isfalse value="${native.debug.option}"/></condition>
+
+        <!-- Source and test file locations -->
+        <property name="src" location="${basedir}/src" />
+        <property name="src.tst" value="${basedir}/test" />
+        <property name="src.tst.common" value="${src.tst}/common" />
+        <property name="src.tst.unit" value="${src.tst.common}/unit" />
+        <property name="src.jdwp" value="${src}/common/other/jpda/jdwp" />
+        <property name="src.jdwp.platform" value="${src}/${platform.name}/other/jpda/jdwp"
/>
+
+        <!-- Build locations -->
+        <property name="harmonybin.path" value="jdk/jre"/>
+        <property name="harmonytest.path" value="test"/>
+        <property name="harmonydoc.path" value="doc"/>
+        <property name="deploy.lib.path" location="${deploy.path}/${harmonybin.path}/bin"
/>
+        <property name="deploy.jars.path" location="${deploy.path}/${harmonybin.path}/lib/boot"
/>
+        <property name="deploy.test.jars.path" location="${deploy.path}/${harmonytest.path}"
/>
+        <property name="deploy.doc.path" location="${deploy.path}/${harmonydoc.path}"
/>
+        <property name="deploy.ext.path" location="${deploy.path}/${harmonybin.path}/lib/ext"
/>
+        <property name="deploy.bin.path" location="${deploy.path}/${harmonybin.path}/bin"
/>
+
+        <!-- Test execution locations and parameters -->
+        <property name="test.debug.jvm" value="java" />
+        <property name="test.debugger.jvm" value="${test.debug.jvm}" />
+        <property name="test.debuggee.jvm" value="${test.debug.jvm}" />
+        <property name="tst.reports.path" location="${build.path}/build/test_reports"
/>
+
+        <!-- Temp directory -->
+        <property name="tmp" location="${build.path}/build/tmp" />
+
+        <!-- External tools -->
+        <property name="cpptask.jar" value="${harmony.depends.jars.path}/cpptasks-1.0b4/cpptasks.jar"
/>
+        <property name="junit.jar" value="${harmony.depends.jars.path}/junit_3.8.2/junit.jar"
/>
+        <property name="doxygen" value="doxygen" />
+
+        <echo message="Init done."/>
+    </target>
+
+    <!-- Init cpptask -->
+    <target name="init.cpptask" depends="init">
+        <!-- Check CPP Task  -->
+        <available file="${cpptask.jar}" type="file" property="cpptask.ok"/>
+        <fail unless="cpptask.ok">cpptask file not found: ${cpptask.jar}</fail>
+
+        <!-- Init CPP task  -->
+        <path id="cc.cp">
+            <pathelement location="${cpptask.jar}"/>
+        </path>
+        <taskdef resource="cpptasks.tasks">
+            <classpath refid="cc.cp"/>
+        </taskdef>
+        <typedef resource="cpptasks.types">
+            <classpath refid="cc.cp"/>
+        </typedef>
+    </target>
+
+    <!-- Init junit -->
+    <target name="init.junit" depends="init">
+        <!-- Check Junit Task  -->
+        <available file="${junit.jar}" type="file" property="junittask.ok"/>
+        <fail unless="junittask.ok">JUnit file not found: ${junit.jar}</fail>
+    </target>
+
+    <!-- Init doxygen -->
+    <target name="init.doxygen" depends="init">
+    </target>
+
+    <!-- Build JDWP tests -->
+    <target name="build.jdwp.tests" depends="init">
+        <mkdir dir="${build.path}/build/test/classes"/>
+        <javac
+            source="${java.source.ver}"
+            target="${java.target.ver}"
+            srcdir="${src.tst.unit}"
+            includes="org/apache/harmony/jpda/**/*.java"
+            destdir="${build.path}/build/test/classes"
+            classpath="${junit.jar}"
+            debug="${java.debug.option}"
+        />
+        <mkdir dir="${deploy.test.jars.path}"/>
+        <jar destfile="${deploy.test.jars.path}/jdwp_tests.jar">
+            <fileset dir="${build.path}/build/test/classes" includes="**"/>
+            <fileset dir="${src.tst.unit}">
+                <include name="org/apache/harmony/jpda/**"/>
+                <exclude name="**/*.java"/>
+            </fileset>
+        </jar>
+        <echo message="Test build finished."/>
+    </target>
+
+    <!-- Build JDWP tests documantation -->
+    <target name="build.jdwp.tests.doc" depends="init">
+        <mkdir dir="${deploy.doc.path}/jpda/jdwp/test/html"/>
+        <javadoc
+            sourcepath="${src.tst.unit}"
+            destdir="${deploy.doc.path}/jpda/jdwp/test/html"
+            packagenames="org.apache.harmony.jpda.*"
+            windowtitle="JPDA/JDWP tests" 
+        />
+        <echo message="Test documentaion build finished."/>
+    </target>
+
+    <!-- Build JDWP agent -->
+    <target name="build.jdwp.agent" depends="init,init.cpptask">
+        <mkdir dir="${tmp}/jdwp/obj" />
+        <cc name="${native.compiler}"
+            outfile="${tmp}/jdwp/jdwp"
+            objdir="${tmp}/jdwp/obj"
+            outtype="shared"
+            runtime="${runtime.property}"
+            warnings="${native.warnings.option}"
+            debug="${native.debug.option}"
+            exceptions="true"
+            rtti="false"
+        >
+
+            <fileset dir="${src.jdwp}/agent" includes="**/*.cpp"/>
+            <fileset dir="${src.jdwp.platform}/agent" includes="**/*.cpp"/>
+
+            <includepath path="${jni_h.path}"/>
+            <includepath path="${src.jdwp}/generic"/>
+            <includepath path="${src.jdwp}/agent/core"/>
+            <includepath path="${src.jdwp}/agent/commands"/>
+            <includepath path="${src.jdwp.platform}/agent/core"/>
+            <includepath path="${src.jdwp.platform}/agent/commands"/>
+
+            <defineset define="${debug.def}" if="is.linux"/>
+
+            <linkerarg value="-fPIC" if="is.linux"/>
+
+            <libset libs="dl,stdc++,m,gcc_s" if="is.linux"/>
+        </cc>
+        <copy todir="${deploy.lib.path}">
+            <fileset dir="${tmp}/jdwp" includes="${library.prefix}jdwp${library.ext}"/>
+            <fileset dir="${tmp}/jdwp" includes="jdwp.pdb"/>
+        </copy>
+        <echo message="Agent build finished."/>
+    </target>
+
+    <!-- Build JDWP transport -->
+    <target name="build.jdwp.transport" depends="init,init.cpptask">
+        <mkdir dir="${tmp}/dt_socket/obj" />
+        <cc name="${native.compiler}"
+            outfile="${tmp}/dt_socket/dt_socket"
+            objdir="${tmp}/dt_socket/obj"
+            outtype="shared"
+            runtime="${runtime.property}"
+            warnings="${native.warnings.option}"
+            debug="${native.debug.option}"
+            exceptions="false"
+            rtti="false"
+        >
+
+            <fileset dir="${src.jdwp}/transport/common" includes="**/*.cpp"/>
+            <fileset dir="${src.jdwp}/transport/dt_socket" includes="**/*.cpp"/>
+            <fileset dir="${src.jdwp.platform}/transport/dt_socket" includes="**/*.cpp"/>
+
+            <includepath path="${jni_h.path}"/>
+            <includepath path="${src.jdwp}/generic"/>
+            <includepath path="${src.jdwp}/transport/common"/>
+            <includepath path="${src.jdwp}/transport/dt_socket"/>
+            <includepath path="${src.jdwp.platform}/transport/dt_socket"/>
+
+            <defineset define="${debug.def}" if="is.linux"/>
+
+            <linkerarg value="-fPIC" if="is.linux"/>
+
+            <libset libs="stdc++,m,gcc_s" if="is.linux"/>
+            <libset libs="ws2_32" if="is.win"/>
+        </cc>
+        <copy todir="${deploy.lib.path}">
+            <fileset dir="${tmp}/dt_socket" includes="${library.prefix}dt_socket${library.ext}"/>
+            <fileset dir="${tmp}/dt_socket" includes="dt_socket.pdb"/>
+        </copy>
+        <echo message="Transport build finished."/>
+    </target>
+
+    <!--
+        Generate Doc Template.
+        Do not call directly.
+        Specify following properties in antcall:
+            doc.name
+            doc.input
+            doc.output
+            doc.logfile (optionally)
+    -->
+    <target name="generate.doc" depends="init">
+        <fail unless="doc.name">Property doc.name is not specified.</fail>
+        <fail unless="doc.input">Property doc.input is not specified.</fail>
+        <fail unless="doc.output">Property doc.output is not specified.</fail>
+        <property name="doc.logfile" value="" />
+        <loadfile property="doc.templ" srcFile="${basedir}/doc.templ" >
+            <filterchain>
+                <filterreader classname="org.apache.tools.ant.filters.ExpandProperties"/>
+            </filterchain>
+        </loadfile>
+        <echo>Generating docs for ${doc.name}</echo>
+        <mkdir dir="${build.path}/build/tmp"/>
+        <mkdir dir="${doc.output}"/>
+        <echo file="${build.path}/build/tmp/Doxyfile.cfg">${doc.templ}</echo>
+        <exec executable="${doxygen}"><arg value="${build.path}/build/tmp/Doxyfile.cfg"/></exec>
+        <delete file="${build.path}/build/tmp/Doxyfile.cfg" />
+    </target>
+
+    <!-- Build all agent documentation -->
+    <target name="build.jdwp.agent.doc" depends="init,init.doxygen">
+        <antcall target="generate.doc">
+            <param name="doc.name" value="JDWP Agent core"/>
+            <param name="doc.input" value="${src.jdwp}/agent/core"/>
+            <param name="doc.output" value="${deploy.doc.path}/jpda/jdwp/core"/>
+        </antcall>
+        <antcall target="generate.doc">
+            <param name="doc.name" value="JDWP Agent commands"/>
+            <param name="doc.input" value="${src.jdwp}/agent/commands"/>
+            <param name="doc.output" value="${deploy.doc.path}/jpda/jdwp/commands"/>
+        </antcall>
+        <antcall target="generate.doc">
+            <param name="doc.name" value="JDWP Agent generic"/>
+            <param name="doc.input" value="${src.jdwp}/generic"/>
+            <param name="doc.output" value="${deploy.doc.path}/jpda/jdwp/generic"/>
+        </antcall>
+        <antcall target="generate.doc">
+            <param name="doc.name" value="JDWP Agent transport"/>
+            <param name="doc.input" value="${src.jdwp}/transport"/>
+            <param name="doc.output" value="${deploy.doc.path}/jpda/jdwp/transport"/>
+        </antcall>
+        <copy file="${basedir}/jpda.html" tofile="${deploy.doc.path}/jpda/index.html"
/>
+        <echo message="Agent documentaion build finished."/>
+    </target>
+
+    <!-- Build all documentaion -->
+    <target name="build.doc" depends="build.jdwp.agent.doc, build.jdwp.tests.doc">
+        <echo message="Documentaion build finished."/>
+    </target>
+
+    <!-- Build all -->
+    <target name="build" depends="build.jdwp.agent, build.jdwp.transport, build.jdwp.tests">
+        <echo message="Build finished."/>
+    </target>
+
+    <!-- Run JDWP tests -->
+    <target name="run.jdwp.tests" description="Run all JDWP tests" depends="init,init.junit">
+        <mkdir dir="${tst.reports.path}" />
+        <echo message="Run JDWP tests:" />
+        <echo message="  Debugger JVM=${test.debugger.jvm}" />
+        <echo message="  Debuggee JVM=${test.debuggee.jvm}" />
+        <junit
+            printsummary="true"
+            haltonfailure="no" fork="yes"
+            jvm="${test.debugger.jvm}"
+        >
+            <formatter type="plain" usefile="true" />
+            <jvmarg value="-Djpda.settings.debuggeeJavaPath=${test.debuggee.jvm}" />
+            <classpath location="${junit.jar}" />
+            <classpath location="${build.path}/build/test/classes" />
+            <batchtest todir="${tst.reports.path}">
+                <fileset dir="${build.path}/build/test/classes"
+                    includes="org/apache/harmony/jpda/**/*Test.class" />
+            </batchtest>
+        </junit>
+        <echo message="Unit tests run finished."/>
+    </target>
+
+    <!-- Clean generated files -->
+    <target name="clean" depends="init">
+        <delete quiet="true" includeemptydirs="true" dir="${tmp}" />
+        <delete quiet="true" includeemptydirs="true" dir="${tst.reports.path}" />
+        <delete quiet="true" includeemptydirs="true" dir="${deploy.doc.path}" />
+        <delete quiet="true" includeemptydirs="true">
+            <fileset dir="${build.path}/build/test/classes" includes="org/apache/harmony/jpda/**/*"/>
+        </delete>
+        <delete quiet="true" includeemptydirs="true">
+            <fileset dir="${deploy.lib.path}" includes="${library.prefix}jdwp${library.ext}"/>
+            <fileset dir="${deploy.lib.path}" includes="jdwp.pdb"/>
+            <fileset dir="${deploy.lib.path}" includes="${library.prefix}dt_socket${library.ext}"/>
+            <fileset dir="${deploy.lib.path}" includes="dt_socket.pdb"/>
+        </delete>
+        <echo message="Clean finished."/>
+    </target>
+
+    <!-- Check configuration -->
+    <target name="check" depends="init,init.cpptask,init.junit,init.doxygen">
+        <echo message="Check finished."/>
+    </target>
+
+    <!-- Print Help -->
+    <target name="help">
+<echo>
+Build JPDA project.
+Targets:
+help
+ - Help
+build
+ - Build all binaries: agent, transport and tests
+build.jdwp.tests
+ - Build only tests
+build.jdwp.agent
+ - Build only agent
+build.jdwp.transport 
+ - Build only transport
+build.doc
+ - Build documentation from self commented source code
+run.jdwp.tests
+ - Run JPDA/JDWP tests
+clean
+ - Delete generated files
+check
+ - Check configuration
+</echo>
+    </target>
+
+</project>

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

Added: harmony/enhanced/jdktools/trunk/modules/jpda/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/build.xml?view=auto&rev=480322
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/build.xml (added)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/build.xml Tue Nov 28 17:33:23 2006
@@ -0,0 +1,388 @@
+<?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="JPDA Build" default="build" basedir=".">
+    <description>Build for LUNI component</description>
+
+    <!-- import common properties -->
+    <property name="hy.hdk" location="${basedir}/../../deploy" />
+    <import file="${hy.hdk}/build/ant/properties.xml" />
+
+    <!-- set global properties for this build. -->
+    <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
+    
+    <fileset id="classes" dir="${hy.build}">
+        <or>
+            <present targetdir="${hy.luni.src.main.java}" />
+            <present targetdir="${hy.luni.src.main.java}">
+                <mapper type="regexp"
+                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
+                        to="\1.java"/>
+            </present>
+        </or>
+    </fileset>
+
+    <property file="../../make/depends.properties" />
+    <property name="fdlibm.zip" location="${depends.oss}/fdlibm_5.2.zip" />
+    <property name="exclude.file" location="./make/exclude.${hy.platform}.${hy.test.vm.name}"
/>
+
+    <target name="build" depends="compile-java, copy-resources, build-jar" />
+
+    <target name="copy-native-includes">
+        <copy todir="${hy.hdk}/include" overwrite="yes">
+            <fileset dir="${hy.luni.src.main.native}/include/shared">
+                <include name="vmi.h" />
+                <include name="hyvmls.h" />
+                <include name="hysocket.h" />
+                <include name="gp.h" />
+                <include name="iohelp.h" />
+                <include name="exceptions.h" />
+                <include name="libglob.h" />
+                <include name="strhelp.h" />            	
+                <include name="fdlibm.h" />
+                <include name="hymagic.h" />
+                <include name="jsig.h" />
+            </fileset>
+        </copy>
+        <copy todir="${hy.jdk}/include" overwrite="yes">
+            <fileset dir="${hy.luni.src.main.native}/include/shared">
+                <include name="jni.h" />
+                <include name="jniport.h" />
+                <include name="jvmti.h" />
+            </fileset>
+        </copy>
+
+        <antcall target="copy-native-includes-windows" />
+        <antcall target="copy-native-includes-linux" />
+    </target>
+
+    <target name="copy-native-includes-windows" if="is.windows">
+        <copy todir="${hy.hdk}/include" overwrite="yes">
+            <fileset dir="${hy.luni.src.main.native}/include/windows">
+                <include name="jclprots.h" />
+            </fileset>
+        </copy>
+    </target>
+
+    <target name="copy-native-includes-linux" if="is.linux">
+        <copy todir="${hy.hdk}/include" overwrite="yes">
+            <fileset dir="${hy.luni.src.main.native}/include/linux">
+                <include name="jclprots.h" />
+            </fileset>
+        </copy>
+    </target>
+
+    <!-- Build native code -->
+    <target name="build-native"
+            depends="build-native-core, build-native-secondary" />
+
+    <!-- Build the core luni native components -->
+    <target name="build-native-core" >
+
+        <!-- Build fdlibm lib -->
+        <make dir="${hy.luni.src.main.native}/fdlibm/${hy.os}" />
+
+        <!-- Build vmi dll -->
+        <make dir="${hy.luni.src.main.native}/vmi/${hy.os}" />
+
+        <!-- On Linux we want to copy the libvmi.so into the
+             deploy/lib directory so that the natives can link
+             against it. This is only used at build time - at
+             runtime the libvmi.so provided by the VM
+             implementation is loaded
+          -->
+        <copy todir="${hy.hdk}/lib" overwrite="yes" failonerror="false">
+            <fileset dir="${hy.luni.src.main.native}/vmi">
+                <include name="libvmi.so"/>
+            </fileset>
+        </copy>
+    </target>
+
+    <!-- Build secondary native luni components -->
+    <target name="build-native-secondary" >
+        <!-- Build luni dll -->
+        <make dir="${hy.luni.src.main.native}/luni/${hy.os}" />
+        <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
+            <fileset dir="${hy.luni.src.main.native}/luni">
+                <patternset includes="*${shlib.suffix}*" />
+            </fileset>
+        </copy>
+
+        <!-- Build vmls lib -->
+        <make dir="${hy.luni.src.main.native}/vmls/${hy.os}" />
+
+        <!-- Build launcher executables -->
+        <make dir="${hy.luni.src.main.native}/launcher/${hy.os}" />
+
+        <!-- Copy across the built executables -->
+        <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
+            <fileset dir="${hy.luni.src.main.native}/launcher">
+                <patternset includes="java${exe.suffix}" />
+                <patternset includes="javaw${exe.suffix}" />
+            </fileset>
+        </copy>
+
+        <!-- Make sure the Linux launcher has execute permission -->
+        <chmod file="${hy.jdk}/jre/bin/java${exe.suffix}" perm="ugo+x" />
+
+    </target>
+
+    <!-- Overlay OSS packages into their required locations -->
+    <target name="overlay-oss" >
+        <unzip src="${fdlibm.zip}" dest="${hy.luni.src.main.native}/fdlibm_dist" />
+        <chmod dir="${hy.luni.src.main.native}/fdlibm_dist" perm="ugo+r" />
+    </target>
+
+    <!-- Clean overlaid OSS packages -->
+    <target name="clean-overlay-oss" >
+        <delete dir="${hy.luni.src.main.native}/fdlibm_dist" quiet="true" />
+    </target>
+
+    <!-- Clean natives -->
+    <target name="clean-native">
+        <make dir="${hy.luni.src.main.native}/fdlibm/${hy.os}" target="clean" />
+        <make dir="${hy.luni.src.main.native}/vmi/${hy.os}" target="clean" />
+        <make dir="${hy.luni.src.main.native}/luni/${hy.os}" target="clean" />
+        <make dir="${hy.luni.src.main.native}/vmls/${hy.os}" target="clean" />
+        <make dir="${hy.luni.src.main.native}/launcher/${hy.os}"
+              target="clean" />
+    </target>
+
+    <target name="test" depends="-test-module">
+        <fail message="Some tests failed">
+            <condition>
+                <or>
+                    <isset property="test.failures" />
+                    <isset property="test.errors" />
+                </or>
+            </condition>
+        </fail>
+    </target>
+
+    <!-- internal target for local and global test run sequence -->
+    <target name="-test-module" depends="build, compile-tests, run-tests" />
+
+    <target name="clean">
+        <delete file="${hy.jdk}/jre/lib/boot/luni.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/luni-src.jar" />
+        <delete failonerror="false">
+            <fileset refid="classes" />
+            <fileset dir="${hy.luni.bin.test}" />
+        </delete>
+        <antcall target="clean-native-includes" />
+    </target>
+
+    <target name="clean-native-includes">
+        <delete failonerror="false">
+            <fileset dir="${hy.hdk}/include">
+                <include name="vmi.h" />
+                <include name="hyvmls.h" />
+                <include name="jclprots.h" />
+                <include name="hysocket.h" />
+                <include name="gp.h" />
+                <include name="iohelp.h" />
+                <include name="exceptions.h" />
+                <include name="libglob.h" />
+                <include name="fdlibm.h" />
+                <include name="hymagic.h" />
+                <include name="jsig.h" />
+            </fileset>
+        </delete>
+        <delete failonerror="false">
+            <fileset dir="${hy.jdk}/include">
+                <include name="jni.h" />
+                <include name="jniport.h" />
+                <include name="jvmti.h" />
+            </fileset>
+        </delete>
+    </target>
+
+    <target name="compile-java">
+        <echo message="Compiling LUNI classes" />
+
+        <javac sourcepath=""
+               srcdir="${hy.luni.src.main.java}"
+               destdir="${hy.build}"
+               compiler="${hy.javac.compiler}"
+               memoryMaximumSize="${hy.javac.maxmem}"
+               source="${hy.javac.source}" 
+               target="${hy.javac.target}"
+               debug="${hy.javac.debug}">
+
+            <compilerarg line="${build.compilerarg}" />
+
+            <bootclasspath>
+                <fileset dir="${hy.jdk}/jre/lib/boot">
+                    <include name="**/*.jar" />
+                </fileset>
+            </bootclasspath>
+        </javac>
+    </target>
+
+    <target name="build-jar" depends="svn-info">
+        <jar destfile="${hy.jdk}/jre/lib/boot/luni.jar"
+             manifest="${hy.luni}/META-INF/MANIFEST.MF">
+            <fileset refid="classes" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/>
+            </manifest>
+            
+            <metainf file="${hy.hdk}/NOTICE"/>
+            <metainf file="${hy.hdk}/LICENSE"/>            
+        </jar>
+
+        <jar destfile="${hy.jdk}/jre/lib/boot/luni-src.jar">
+            <fileset dir="${hy.luni.src.main.java}" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/>
+            </manifest>
+            
+            <metainf file="${hy.hdk}/NOTICE"/>
+            <metainf file="${hy.hdk}/LICENSE"/>            
+        </jar>
+    </target>
+
+    <target name="compile-tests" depends="copy-test-resources">
+        <compile-tests description="JUnit Tests" destdir="${hy.luni.bin.test}">
+            <javac-elements>
+                <src>
+                    <pathelement location="${hy.luni.src.test}/java"/>
+                </src>
+                <include name="**/*.java" />
+            </javac-elements>
+        </compile-tests>
+    </target>
+
+    <target name="run-tests">
+        <run-tests description="JUnit Tests">
+            <junit-elements>
+                <classpath>
+                    <pathelement path="${hy.luni.bin.test}"/>
+                    <pathelement path="${hy.luni.src.test.resources}"/>
+                    <pathelement path="../../build/tests"/>
+                    <pathelement path="${hy.hdk}/build/test/support.jar" />
+                </classpath>
+                <!-- Required by various tests that set security manager etc -->
+                <jvmarg value="-Djava.security.policy=../../support/src/test/resources/config/testing.policy"
/>
+
+                <!-- Required for running the java.net unit tests -->
+                <jvmarg value="-Dtest.ini.file=../../support/src/test/resources/config/localhosttest.ini"
/>
+
+
+                <batchtest todir="${hy.tests.reports}" haltonfailure="no" unless="test.case">
+                    <fileset dir="${hy.luni.src.test}/java">
+                        <include name="**/*Test.java"/>
+                        <excludesfile name="${exclude.file}" />
+                    </fileset>
+                </batchtest>
+
+            </junit-elements>
+        </run-tests>
+
+        <antcall target="touch-failures-file" />
+        <antcall target="touch-errors-file" />
+    </target>
+
+    <target name="touch-failures-file" if="test.failures">
+        <echo file="${hy.tests.reports}/test.failures"
+            append="true">luni${line.separator}</echo>
+    </target>
+
+    <target name="touch-errors-file" if="test.errors">
+        <echo file="${hy.tests.reports}/test.errors"
+            append="true">luni${line.separator}</echo>
+    </target>
+
+    <target name="copy-resources">
+        <mkdir dir="${hy.build}" />
+        <copy todir="${hy.build}" includeemptydirs="false">
+            <fileset dir="${hy.luni.src.main.java}">
+                <exclude name="**/*.java" />
+            </fileset>
+        </copy>
+    </target>
+
+    <target name="copy-test-resources">
+        <mkdir dir="${hy.luni.bin.test}" />
+        <copy todir="${hy.luni.bin.test}" includeemptydirs="false">
+            <fileset dir="${hy.luni.src.test.resources}">
+                <exclude name="**/*.java" />
+            </fileset>
+        </copy>
+    </target>
+
+    <macrodef name="compile-tests">
+        <attribute name="description" default="" />
+        <attribute name="destdir"  />
+        <element name="javac-elements" />
+        <sequential>
+            <echo message="Compiling LUNI @{description}" />
+
+            <mkdir dir="@{destdir}" />
+
+            <javac destdir="@{destdir}"
+               compiler="${hy.javac.compiler}"
+               memoryMaximumSize="${hy.javac.maxmem}"
+               source="${hy.javac.source}" 
+               target="${hy.javac.target}"
+               debug="${hy.javac.debug}">
+
+                <compilerarg line="${build.compilerarg}" />
+
+                <javac-elements />
+
+                <bootclasspath>
+                    <fileset dir="${hy.jdk}/jre/lib/boot">
+                        <include name="**/*.jar" />
+                    </fileset>
+                </bootclasspath>
+                <classpath location="../../build/tests" />
+                <classpath location="${hy.hdk}/build/test/support.jar" />
+            </javac>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="run-tests">
+        <attribute name="description" default="" />
+        <element name="junit-elements" />
+        <sequential>
+            <echo message="Running LUNI @{description}" />
+
+            <mkdir dir="${hy.tests.reports}" />
+
+            <property name="test.jre.home" value="${hy.jdk}/jre" />
+
+            <junit fork="yes"
+                   forkmode="${hy.test.forkmode}"
+                   timeout="${hy.test.timeout}"
+                   printsummary="withOutAndErr"
+                   errorproperty="test.errors"
+                   failureproperty="test.failures"
+                   showoutput="on"
+                   dir="${basedir}"
+                   jvm="${test.jre.home}/bin/java">
+
+                <junit-elements />
+
+                <formatter type="xml" />
+
+                <test name="${test.case}" todir="${hy.tests.reports}" if="test.case" />
+            </junit>
+        </sequential>
+    </macrodef>
+</project>

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



Mime
View raw message