blob: 12368e476cb738bc76a7910162370f4d3601d7c5 [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. -->
<!-- ======================================================================
build-java-source
Compile the Java source and package in component archives.
====================================================================== -->
<project name="build-java-source" default="build" 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="${external.resources}/depends/jars" />
<property name="depends.manifests" location="depends/manifests" />
<property name="depends.files" location="depends/files" />
<target name="build" depends="-layout, build-modules"
description="Compile Java source in modules and construct deploy directory." />
<target name="clean" depends="clean-modules, -clean-layout"
description="Remove binaries generated by modules and delete the deploy directory."/>
<target name="clean-modules">
<call-modules target="clean-java" />
</target>
<target name="build-modules" depends="-prepare-depends">
<ensure-javac/>
<mkdir dir="${build.output}" />
<call-modules target="build-java" />
</target>
<target name="-layout" depends="-prepare-depends">
<!-- Create the target directory structure -->
<mkdir dir="${jdktools.deploy.dir}/jre/bin" />
<mkdir dir="${jdktools.deploy.dir}/bin" />
<!-- Copy across the jdk/lib dependency jars -->
<copy todir="${jdktools.deploy.dir}/lib" flatten="yes">
<fileset file="${ecj.jar}" />
</copy>
</target>
<target name="-clean-layout">
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${jdktools.deploy.dir}">
<exclude name="jre/bin/default/**" />
<exclude name="jre/bin/**" />
<exclude name="jre/lib/ext/**" />
</fileset>
</delete>
</target>
<target name="-prepare-depends">
<ant antfile="make/depends.xml" inheritall="false" target="check">
<property name="external.resources" value="${external.resources}"/>
</ant>
</target>
</project>