blob: 62d030bcdcb7382cf564c6baf7164fb8a0d58943 [file] [log] [blame]
<?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="build-harmony" default="build" basedir=".">
<!-- name of the target directory to use for building and final assembly -->
<property name="hy.target" value="target" />
<!-- release property file which is added to source release -->
<property file="release.properties" />
<!-- debug or release version -->
<property name="hy.cfg" value="release" />
<property name="hy.select" value="false" />
<property name="hy.hdk" location="${hy.target}/hdk" />
<!-- property to identify when components are being built by the
federated build -->
<property name="is.federated.build" value="true" />
<property name="vm.dir" value="drlvm" />
<property name="vm.dir.loc" location="${vm.dir}" />
<!-- import some vm-specific properties -->
<property file="${vm.dir.loc}/make/build.properties" />
<import file="common_resources/make/properties.xml" />
<description>
Apache Harmony project federation script
</description>
<target name="help">
<echo>
Apache Harmony Ant Build
Usage:
ant build
Compiles the java and native code to produce a jdk in
"${hy.target}/hdk".
ant clean
Removes all the files generated by a build.
ant rebuild
Performs a full build - that is 'clean' then 'build'.
ant snapshot
Produces a archive (tar/zip) of a build.
ant fetch-depends
Fetches dependencies. Note: Some of Harmony's dependencies are
licensed under terms other than the Apache License v2.
ant properties
Display the common build properties.
</echo>
</target>
<!-- ============================================================== -->
<!-- main target - should checkout, build and package hdk,
jdk and jre -->
<!-- ============================================================== -->
<target name="all"
description="setup and build complete implementation"
depends="setup,
clean,
build,
bundle-hdk,
bundle-jdk,
bundle-jre"/>
<target name="snapshot"
description="setup and build complete src + binaries set"
depends="bundle-src,
clean,
build,
bundle-hdk,
bundle-jdk,
bundle-jre"/>
<target name="build"
description="build complete implementation"
depends="properties,
build-classlib,
build-vm,
build-jdktools,
assemble-artifacts"/>
<target name="bundle-src"
description="assemble source snapshot"
depends="setup,
copy-src,
bundle-src-tgz,
bundle-src-zip" />
<target name="rat" depends="setup,copy-src">
<fail
message="Set rat.home property to directory containing rat build">
<condition><not><available file="${rat.home}" /></not></condition>
</fail>
<typedef resource="org/apache/rat/anttasks/antlib.xml"
uri="antlib:org.apache.rat.anttasks">
<classpath path="${rat.home}/apache-rat-tasks/target/apache-rat-tasks-0.7-SNAPSHOT.jar" />
<classpath path="${rat.home}/apache-rat-core/target/apache-rat-core-0.7-SNAPSHOT.jar" />
<classpath path="${rat.home}/apache-rat/target/apache-rat-0.7-SNAPSHOT.jar" />
</typedef>
<delete file="${hy.target}/rat.report.txt" />
<rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
reportFile="${hy.target}/rat.report.txt" >
<fileset dir="${hy.target}/src" excludesfile="rat.excludes" />
</rat:report>
</target>
<!-- ============================================================== -->
<!-- creates the HDK bundle appropriate for the platform -->
<!-- ============================================================== -->
<target name="bundle-hdk"
depends="assemble-artifacts,
bundle-hdk-tgz,
bundle-hdk-zip" />
<!-- ============================================================== -->
<!-- builds with a clean first -->
<!-- ============================================================== -->
<target name="rebuild" depends="clean, build"
description="Performs a full build - that is 'clean' then 'build'" />
<!-- ============================================================== -->
<!-- fetches external dependencies -->
<!-- ============================================================== -->
<target name="fetch-depends"
description="Fetches dependencies. Note: Some of Harmony dependencies are licensed under terms other than the Apache License v2."
depends="fetch-classlib-libs,
fetch-vm-libs,
fetch-jdktools-libs"/>
<target name="check-depends"
description="Checks dependencies."
depends="check-classlib-libs,
check-vm-libs,
check-jdktools-libs"/>
<target name="bundle-hdk-tgz" depends="init" if="is.unix">
<!-- create the tar file and then md5 checksum using harmony-hdk-rev as the root,
and setting exec bits as needed -->
<tar tarfile="${hy.target}/${deploy.hdk.tar}" compression="gzip">
<tarfileset dir="${hy.target}/hdk"
prefix="${archive.dir.prefix}hdk-${harmony.version}"
mode="755">
<include name="jdk/jre/bin/java"/>
<include name="jdk/jre/bin/keytool"/>
<include name="jdk/jre/bin/pack200"/>
<include name="jdk/jre/bin/policytool"/>
<include name="jdk/jre/bin/unpack200"/>
<include name="jdk/bin/*"/>
</tarfileset>
<tarfileset dir="${hy.target}/hdk"
prefix="${archive.dir.prefix}hdk-${harmony.version}">
<include name="**"/>
<exclude name="jdk/jre/bin/java"/>
<exclude name="jdk/jre/bin/keytool"/>
<exclude name="jdk/jre/bin/pack200"/>
<exclude name="jdk/jre/bin/policytool"/>
<exclude name="jdk/jre/bin/unpack200"/>
<exclude name="jdk/bin/*"/>
<exclude name="jdk/jre/README"/>
</tarfileset>
<tarfileset dir="${hy.target}/hdk/jdk/jre"
prefix="${archive.dir.prefix}hdk-${harmony.version}">
<include name="README"/>
</tarfileset>
</tar>
<chksum dir="${hy.target}" file="${deploy.hdk.tar}" />
<chksum dir="${hy.target}" file="${deploy.hdk.tar}" type="sha" />
</target>
<target name="bundle-hdk-zip" depends="init" unless="is.unix">
<!-- create the tar file and then md5 checksum using harmony-hdk-rev as the root,
and setting exec bits as needed -->
<zip destfile="${hy.target}/${deploy.hdk.zip}" >
<zipfileset dir="${hy.target}/hdk"
prefix="${archive.dir.prefix}hdk-${harmony.version}"
filemode="755">
<include name="jdk/jre/bin/java.exe"/>
<include name="jdk/jre/bin/javaw.exe"/>
<include name="jdk/jre/bin/keytool.exe"/>
<include name="jdk/jre/bin/pack200.exe"/>
<include name="jdk/jre/bin/policytool.exe"/>
<include name="jdk/jre/bin/unpack200.exe"/>
<include name="jdk/bin/*"/>
</zipfileset>
<zipfileset dir="${hy.target}/hdk"
prefix="${archive.dir.prefix}hdk-${harmony.version}">
<include name="**"/>
<exclude name="jdk/jre/bin/java.exe"/>
<exclude name="jdk/jre/bin/javaw.exe"/>
<exclude name="jdk/jre/bin/keytool.exe"/>
<exclude name="jdk/jre/bin/pack200.exe"/>
<exclude name="jdk/jre/bin/policytool.exe"/>
<exclude name="jdk/jre/bin/unpack200.exe"/>
<exclude name="jdk/bin/*"/>
<exclude name="jdk/jre/README"/>
</zipfileset>
<zipfileset dir="${hy.target}/hdk/jdk/jre"
prefix="${archive.dir.prefix}hdk-${harmony.version}">
<include name="README"/>
</zipfileset>
</zip>
<chksum dir="${hy.target}" file="${deploy.hdk.zip}" />
<chksum dir="${hy.target}" file="${deploy.hdk.zip}" type="sha" />
</target>
<!-- ============================================================== -->
<!-- creates the JDK bundle appropriate for the platform -->
<!-- ============================================================== -->
<target name="bundle-jdk"
depends="assemble-jdk-doc,
bundle-jdk-tgz,
bundle-jdk-zip" />
<target name="bundle-jdk-tgz" depends="init" if="is.unix">
<tar tarfile="${hy.target}/${deploy.jdk.tar}" compression="gzip" >
<tarfileset dir="${hy.target}/hdk/jdk"
prefix="${archive.dir.prefix}jdk-${harmony.version}"
mode="755">
<include name="jre/bin/java"/>
<include name="jre/bin/keytool"/>
<include name="jre/bin/pack200"/>
<include name="jre/bin/policytool"/>
<include name="jre/bin/unpack200"/>
<include name="bin/*"/>
</tarfileset>
<tarfileset dir="${hy.target}/hdk/jdk"
prefix="${archive.dir.prefix}jdk-${harmony.version}">
<include name="**"/>
<exclude name="jre/bin/java"/>
<exclude name="jre/bin/keytool"/>
<exclude name="jre/bin/pack200"/>
<exclude name="jre/bin/policytool"/>
<exclude name="jre/bin/unpack200"/>
<exclude name="bin/*"/>
<exclude name="jre/README"/>
</tarfileset>
<tarfileset dir="${hy.target}/hdk/jdk/jre"
prefix="${archive.dir.prefix}jdk-${harmony.version}">
<include name="README"/>
</tarfileset>
</tar>
<chksum dir="${hy.target}" file="${deploy.jdk.tar}" />
<chksum dir="${hy.target}" file="${deploy.jdk.tar}" type="sha" />
</target>
<target name="bundle-jdk-zip" depends="init" unless="is.unix">
<zip destfile="${hy.target}/${deploy.jdk.zip}">
<zipfileset dir="${hy.target}/hdk/jdk"
prefix="${archive.dir.prefix}jdk-${harmony.version}"
filemode="755">
<include name="jre/bin/java.exe"/>
<include name="jre/bin/javaw.exe"/>
<include name="jre/bin/keytool.exe"/>
<include name="jre/bin/pack200.exe"/>
<include name="jre/bin/policytool.exe"/>
<include name="jre/bin/unpack200.exe"/>
<include name="bin/*"/>
</zipfileset>
<zipfileset dir="${hy.target}/hdk/jdk"
prefix="${archive.dir.prefix}jdk-${harmony.version}">
<include name="**"/>
<exclude name="jre/bin/java.exe"/>
<exclude name="jre/bin/javaw.exe"/>
<exclude name="jre/bin/keytool.exe"/>
<exclude name="jre/bin/pack200.exe"/>
<exclude name="jre/bin/policytool.exe"/>
<exclude name="jre/bin/unpack200.exe"/>
<exclude name="bin/*"/>
<exclude name="jre/README"/>
</zipfileset>
<zipfileset dir="${hy.target}/hdk/jdk/jre"
prefix="${archive.dir.prefix}jdk-${harmony.version}">
<include name="README"/>
</zipfileset>
</zip>
<chksum dir="${hy.target}" file="${deploy.jdk.zip}" />
<chksum dir="${hy.target}" file="${deploy.jdk.zip}" type="sha" />
</target>
<!-- ============================================================== -->
<!-- creates the JRE bundle appropriate for the platform -->
<!-- ============================================================== -->
<target name="bundle-jre"
depends="assemble-jre-doc,
bundle-jre-tgz,
bundle-jre-zip" />
<target name="bundle-jre-tgz" depends="init" if="is.unix">
<tar tarfile="${hy.target}/${deploy.jre.tar}" compression="gzip" >
<tarfileset dir="${hy.target}/hdk/jdk/jre"
prefix="${archive.dir.prefix}jre-${harmony.version}"
mode="755">
<include name="bin/java"/>
<include name="bin/keytool"/>
<include name="bin/pack200"/>
<include name="bin/policytool"/>
<include name="bin/unpack200"/>
</tarfileset>
<tarfileset dir="${hy.target}/hdk/jdk/jre"
prefix="${archive.dir.prefix}jre-${harmony.version}">
<include name="**"/>
<exclude name="bin/java"/>
<exclude name="bin/keytool"/>
<exclude name="bin/pack200"/>
<exclude name="bin/policytool"/>
<exclude name="bin/unpack200"/>
<exclude name="**/*-src.jar"/>
</tarfileset>
</tar>
<chksum dir="${hy.target}" file="${deploy.jre.tar}" />
<chksum dir="${hy.target}" file="${deploy.jre.tar}" type="sha" />
</target>
<target name="bundle-jre-zip" depends="init" unless="is.unix">
<zip destfile="${hy.target}/${deploy.jre.zip}">
<zipfileset dir="${hy.target}/hdk/jdk/jre"
prefix="${archive.dir.prefix}jre-${harmony.version}"
filemode="755">
<include name="bin/java.exe"/>
<include name="bin/javaw.exe"/>
<include name="bin/keytool.exe"/>
<include name="bin/pack200.exe"/>
<include name="bin/policytool.exe"/>
<include name="bin/unpack200.exe"/>
</zipfileset>
<zipfileset dir="${hy.target}/hdk/jdk/jre"
prefix="${archive.dir.prefix}jre-${harmony.version}">
<include name="**"/>
<exclude name="bin/java.exe"/>
<exclude name="bin/javaw.exe"/>
<exclude name="bin/keytool.exe"/>
<exclude name="bin/pack200.exe"/>
<exclude name="bin/policytool.exe"/>
<exclude name="bin/unpack200.exe"/>
<exclude name="**/*-src.jar"/>
</zipfileset>
</zip>
<chksum dir="${hy.target}" file="${deploy.jre.zip}" />
<chksum dir="${hy.target}" file="${deploy.jre.zip}" type="sha" />
</target>
<!-- ============================================================== -->
<!-- from the classlib and vm builds, creates the hdk and jre -->
<!-- ============================================================== -->
<target name="assemble-artifacts"
depends="init,
assemble-hdk-doc,
chmod-stuff"/>
<target name="chmod-stuff" if="is.unix">
<chmod file="${hy.target}/hdk/jdk/bin/*" perm="ugo+x" />
<chmod file="${hy.target}/hdk/jdk/jre/bin/java*" perm="ugo+x" />
<chmod file="${hy.target}/hdk/jdk/jre/bin/keytool*" perm="ugo+x" />
<chmod file="${hy.target}/hdk/jdk/jre/bin/policytool*" perm="ugo+x" />
<chmod file="${hy.target}/hdk/jdk/jre/bin/unpack200*" perm="ugo+x" />
<chmod file="${hy.target}/hdk/jdk/jre/bin/pack200*" perm="ugo+x" />
</target>
<!-- ============================================================== -->
<!-- copies a license and notices into the root of the hdk -->
<!-- ============================================================== -->
<target name="assemble-hdk-doc">
<copy todir="${hy.target}/hdk" overwrite="true">
<fileset dir=".">
<include name="LICENSE" />
<include name="NOTICE" />
</fileset>
</copy>
</target>
<!-- ============================================================== -->
<!-- copies a license and notices into the root of the JDK and JRE -->
<!-- ============================================================== -->
<target name="assemble-jre-doc">
<copy todir="${hy.target}/hdk/jdk/jre" overwrite="true">
<fileset dir=".">
<include name="LICENSE" />
<include name="NOTICE" />
</fileset>
</copy>
</target>
<target name="assemble-jdk-doc">
<copy todir="${hy.target}/hdk/jdk/" overwrite="true">
<fileset dir=".">
<include name="LICENSE" />
<include name="NOTICE" />
</fileset>
</copy>
</target>
<!-- ============================================================== -->
<!-- ensures dependencies are up to date, then builds classlib -->
<!-- ============================================================== -->
<propertyset id="required.props">
<propertyref name="hy.cfg" />
<propertyref name="hy.select" />
<propertyref name="hy.hdk" />
<propertyref name="hy.local.zlib" />
<propertyref name="use.libstdc++5" />
<propertyref name="harmony.java.version" />
<propertyref name="is.federated.build" />
<propertyref name="hy.no.thr" />
<propertyref name="hy.zip.api" />
</propertyset>
<target name="build-classlib"
depends="init,-build-classlib,assemble-hdk-doc"/>
<target name="-build-classlib" depends="auto-fetch-classlib-libs">
<ant antfile="classlib/build.xml" target="build" inheritAll="false" >
<propertyset refid="required.props" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
<property name="keep.working" value="true" />
</ant>
<!-- hack to make sure the federated build doesn't use the classlib
LICENSE/NOTICE files as they don't cover ICU4C
-->
<delete>
<fileset dir="${hy.hdk}">
<include name="LICENSE" />
<include name="NOTICE" />
</fileset>
</delete>
</target>
<target name="auto-fetch-classlib-libs" if="auto.fetch">
<ant target="fetch-classlib-libs">
<propertyset refid="required.props" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
</ant>
</target>
<target name="fetch-classlib-libs">
<ant antfile="classlib/build.xml" target="fetch-depends"
inheritall="false" >
<propertyset refid="required.props" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
</ant>
</target>
<target name="check-classlib-libs">
<ant antfile="classlib/build.xml" target="check-depends"
inheritall="false" >
<propertyset refid="required.props" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
</ant>
</target>
<target name="clean-classlib">
<ant antfile="classlib/build.xml" target="clean" inheritAll="false" >
<propertyset refid="required.props" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
<property name="keep.working" value="true" />
</ant>
</target>
<target name="-init-classlib-hdk-for-clean">
<ant antfile="classlib/build.xml"
target="-init-hdk-for-clean" inheritAll="false" >
<propertyset refid="required.props" />
<property name="keep.working" value="true" />
</ant>
</target>
<!-- ============================================================== -->
<!-- ensures that dependencies are up to date and then builds a vm -->
<!-- ============================================================== -->
<target name="build-vm" depends="init,auto-fetch-vm-libs">
<ant antfile="${vm.dir.loc}/build.xml"
target="build" inheritAll="false" >
<propertyset refid="required.props" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
<property name="deploy.canonical.flag" value="false"/>
<property name="drlvm.deploy.dir" location="${hy.hdk}"/>
<property name="import.hdk" value="false"/>
</ant>
</target>
<target name="auto-fetch-vm-libs" if="auto.fetch">
<ant target="fetch-vm-libs">
<propertyset refid="required.props" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
</ant>
</target>
<target name="fetch-vm-libs">
<ant antfile="${vm.dir.loc}/build.xml"
target="fetch-depends" inheritall="false" >
<propertyset refid="required.props" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
</ant>
</target>
<target name="check-vm-libs">
<ant antfile="${vm.dir.loc}/build.xml"
target="check-depends" inheritall="false" >
<propertyset refid="required.props" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
</ant>
</target>
<target name="clean-vm">
<ant antfile="${vm.dir.loc}/build.xml"
target="clean" inheritall="false" >
<propertyset refid="required.props" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
<property name="deploy.canonical.flag" value="false"/>
<property name="drlvm.deploy.dir" location="${hy.hdk}"/>
<property name="import.hdk" value="false"/>
</ant>
</target>
<!-- ============================================================== -->
<!-- ensures dependencies are up to date, then builds jdktools -->
<!-- ============================================================== -->
<target name="build-jdktools"
depends="init,auto-fetch-jdktools-libs">
<ant antfile="jdktools/build.xml" target="build" inheritall="false" >
<propertyset refid="required.props" />
<property name="common.resources" location="common_resources" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
</ant>
</target>
<target name="auto-fetch-jdktools-libs" if="auto.fetch">
<ant target="fetch-jdktools-libs" inheritall="false" >
<propertyset refid="required.props" />
<property name="common.resources" location="common_resources" />
</ant>
</target>
<target name="fetch-jdktools-libs">
<ant antfile="jdktools/build.xml" target="fetch-depends"
inheritall="false" >
<propertyset refid="required.props" />
<property name="common.resources" location="common_resources" />
</ant>
</target>
<target name="check-jdktools-libs">
<ant antfile="jdktools/build.xml" target="check-depends"
inheritall="false" >
<propertyset refid="required.props" />
<property name="common.resources" location="common_resources" />
</ant>
</target>
<target name="clean-jdktools">
<ant antfile="jdktools/build.xml" target="clean" inheritall="false" >
<propertyset refid="required.props" />
<property name="common.resources" location="common_resources" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
</ant>
</target>
<!-- ============================================================== -->
<!-- recreates distribution dir -->
<!-- ============================================================== -->
<target name="setup" depends="init, properties">
<delete dir="${hy.target}"/>
<mkdir dir="${hy.target}"/>
</target>
<target name="clean"
depends="-init-classlib-hdk-for-clean,
clean-jdktools,
clean-classlib,
clean-vm,
clean-tests" >
<delete dir="${hy.target}" failonerror="false" />
</target>
<!-- ============================================================== -->
<!-- sets up a platform -->
<!-- ============================================================== -->
<target name="init" depends="-svn-info">
<property name="harmony.version" value="${svn.revision}" />
<property name="harmony.long.version" value="${svn.info}" />
<condition property="version.prefix" value="select-">
<istrue value="${hy.select}" />
</condition>
<property name="version.prefix" value="" />
<condition property="vm.prefix" value="">
<equals arg1="drlvm" arg2="${vm.dir}" />
</condition>
<property name="vm.prefix" value="${vm.dir}-" />
<property name="harmony.deploy.suffix" value="-snapshot" />
<property name="harmony.java.version" value="5.0" />
<property name="deploy.file.prefix"
value="apache-harmony-${version.prefix}${harmony.java.version}-${vm.prefix}" />
<property name="archive.dir.prefix"
value="harmony-${version.prefix}${harmony.java.version}-${vm.prefix}" />
<property name="deploy.hdk.file.prefix"
value="${deploy.file.prefix}hdk-r${harmony.version}" />
<property name="deploy.hdk.tar"
value="${deploy.hdk.file.prefix}-${hy.os}-${hy.arch}${harmony.deploy.suffix}.tar.gz" />
<property name="deploy.hdk.zip"
value="${deploy.hdk.file.prefix}-${hy.os}-${hy.arch}${harmony.deploy.suffix}.zip" />
<property name="deploy.jdk.file.prefix"
value="${deploy.file.prefix}jdk-r${harmony.version}" />
<property name="deploy.jdk.tar"
value="${deploy.jdk.file.prefix}-${hy.os}-${hy.arch}${harmony.deploy.suffix}.tar.gz" />
<property name="deploy.jdk.zip"
value="${deploy.jdk.file.prefix}-${hy.os}-${hy.arch}${harmony.deploy.suffix}.zip" />
<property name="deploy.jre.file.prefix"
value="${deploy.file.prefix}jre-r${harmony.version}" />
<property name="deploy.jre.tar"
value="${deploy.jre.file.prefix}-${hy.os}-${hy.arch}${harmony.deploy.suffix}.tar.gz" />
<property name="deploy.jre.zip"
value="${deploy.jre.file.prefix}-${hy.os}-${hy.arch}${harmony.deploy.suffix}.zip" />
<property name="deploy.src.file.prefix"
value="${deploy.file.prefix}src-r${harmony.version}" />
<property name="deploy.src.tar"
value="${deploy.src.file.prefix}${harmony.deploy.suffix}.tar.gz" />
<property name="deploy.src.zip"
value="${deploy.src.file.prefix}${harmony.deploy.suffix}.zip" />
<!-- 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>
<target name="properties" depends="init">
<echo>
Apache Harmony Federated Build
==========================================
svn rev : ${harmony.version}
operating system : ${hy.os}
CPU architecture : ${hy.arch}
ant os name/arch : ${os.name}/${os.arch}
hosting Java : ${java.version} (${java.vendor})
build mode : ${hy.cfg}
output location : ${hy.target}
SVN root : ${svn.root}
archive.dir : ${archive.dir.prefix}
archive.name : ${deploy.file.prefix}
</echo>
</target>
<target name="bundle-src-tgz" depends="init" if="is.unix">
<tar tarfile="${hy.target}/${deploy.src.tar}" compression="gzip"
longfile="gnu" >
<tarfileset dir="${hy.target}/src" prefix="${deploy.file.prefix}src-r${harmony.version}" mode="755">
<include name="debian/rules"/>
</tarfileset>
<tarfileset dir="${hy.target}/src" prefix="${deploy.file.prefix}src-r${harmony.version}">
<include name="**"/>
<exclude name="debian/rules"/>
</tarfileset>
</tar>
<chksum dir="${hy.target}" file="${deploy.src.tar}" />
<chksum dir="${hy.target}" file="${deploy.src.tar}" type="sha" />
</target>
<target name="bundle-src-zip" depends="init" unless="is.unix">
<zip destfile="${hy.target}/${deploy.src.zip}">
<zipfileset dir="${hy.target}/src"
prefix="${deploy.file.prefix}src-r${harmony.version}"
filemode="755">
<include name="debian/rules"/>
</zipfileset>
<zipfileset dir="${hy.target}/src"
prefix="${deploy.file.prefix}src-r${harmony.version}">
<include name="**"/>
<exclude name="debian/rules"/>
</zipfileset>
</zip>
<chksum dir="${hy.target}" file="${deploy.src.zip}" />
<chksum dir="${hy.target}" file="${deploy.src.zip}" type="sha" />
</target>
<target name="copy-src" depends="init">
<exec executable="svn">
<arg value="export" />
<arg value="." />
<arg value="${hy.target}/src" />
</exec>
<echo file="${hy.target}/src/release.properties">
harmony.version=${harmony.version}
harmony.long.version=${harmony.long.version}
harmony.deploy.suffix=${harmony.deploy.suffix}
harmony.java.version=${harmony.java.version}
</echo>
<chmod file="${hy.target}/src/debian/rules" perm="ugo+x" />
</target>
<target name="test" depends="clean-tests">
<ant antfile="${hy.target}/hdk/build/test/build.xml"
target="test" inheritAll="false" >
<propertyset refid="required.props" />
<property name="svn.info" value="${harmony.long.version}"/>
<property name="svn.revision" value="${harmony.version}"/>
<property name="keep.working" value="true" />
<property name="tests.output" location="${hy.target}/test_report" />
<property name="test.jre.home" location="${hy.target}/hdk/jdk/jre" />
</ant>
</target>
<target name="clean-tests">
<delete dir="${hy.target}/test_report" />
</target>
<!-- ============================================================== -->
<!-- produces a nice looking checksum -->
<!-- ============================================================== -->
<macrodef name="chksum">
<attribute name="dir" />
<attribute name="file" />
<attribute name="type" default="md5" />
<sequential>
<checksum property="@{file}.@{type}"
file="@{dir}/@{file}"
algorithm="@{type}" />
<echo file="@{dir}/@{file}.@{type}"
message="${@{file}.@{type}} @{file}${line.separator}" />
</sequential>
</macrodef>
</project>