build.xml revision 206
0N/A<?xml version="1.0"?>
0N/A<!--
206N/A Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A
0N/A This code is free software; you can redistribute it and/or modify it
0N/A under the terms of the GNU General Public License version 2 only, as
123N/A published by the Free Software Foundation. Oracle designates this
0N/A particular file as subject to the "Classpath" exception as provided
123N/A by Oracle in the LICENSE file that accompanied this code.
0N/A
0N/A This code is distributed in the hope that it will be useful, but WITHOUT
0N/A ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A version 2 for more details (a copy is included in the LICENSE file that
0N/A accompanied this code).
0N/A
0N/A You should have received a copy of the GNU General Public License version
0N/A 2 along with this work; if not, write to the Free Software Foundation,
0N/A Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A
123N/A Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
123N/A or visit www.oracle.com if you need additional information or have any
123N/A questions.
0N/A-->
0N/A
87N/A<project name="jaxp" default="all" basedir=".">
87N/A
87N/A <!-- For 'ant -p' or 'ant -projecthelp' -->
87N/A
87N/A <description>
87N/A Ant build script for the ${ant.project.name} part of the jdk.
0N/A
87N/A Input Properties: (see build.properties for the ant defaults)
87N/A bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath
87N/A javac.debug - true or false for debug classfiles
87N/A javac.target - classfile version target
87N/A javac.source - source version
131N/A drops.dir - directory that holds source drop bundles
131N/A allow.download - permit downloads from public url (default is false)
131N/A (used if bundles not found in drops.dir)
131N/A
131N/A Run 'make help' for help using the Makefile.
87N/A </description>
0N/A
87N/A <!-- Mac is special, need to downgrade these before build.properties. -->
87N/A <condition property="javac.source" value="1.5">
87N/A <os family="mac"/>
87N/A </condition>
87N/A <condition property="javac.target" value="1.5">
87N/A <os family="mac"/>
87N/A </condition>
87N/A
87N/A <!-- Project build properties. -->
0N/A <property file="build.properties"/>
87N/A
94N/A <!-- See if drop sources were included. -->
94N/A <condition property="drop.dir"
94N/A value="${drop.included.dir}"
94N/A else="${drop.expanded.dir}">
94N/A <available file="${drop.included.dir}" type="dir"/>
94N/A </condition>
94N/A
87N/A <!-- Get shared targets. -->
87N/A <import file="build-defs.xml"/>
0N/A
87N/A <!-- Initialization of directories needed for build. -->
87N/A <target name="init">
87N/A <mkdir dir="${build.dir}"/>
87N/A <mkdir dir="${build.classes.dir}"/>
87N/A <mkdir dir="${dist.dir}"/>
87N/A <mkdir dir="${dist.lib.dir}"/>
87N/A </target>
87N/A
87N/A <!-- Sanity checks and settings -->
87N/A <target name="sanity"
87N/A depends="-javac-jar-exists"
87N/A description="Display settings of configuration values">
87N/A <echo message="${sanity.info}"/>
0N/A </target>
0N/A
87N/A <!-- Check for bootstrap javac.jar file, warn if missing. -->
87N/A <condition property="javac.jar.exists">
87N/A <available file="${javac.jar}" type="file"/>
87N/A </condition>
87N/A <target name="-javac-jar-exists"
87N/A unless="javac.jar.exists">
87N/A <echo message="WARNING: Cannot find ${javac.jar}"/>
0N/A </target>
0N/A
87N/A <!-- Creation of distribution files to jdk build process. -->
87N/A <target name="dist"
87N/A depends="init, -init-src-dirs, build, -dist-classes-jar, -dist-src-zip"
87N/A description="Create all built distribution files.">
87N/A </target>
87N/A <target name="-dist-classes-jar-uptodate"
87N/A depends="init, -init-src-dirs">
87N/A <condition property="dist.classes.jar.uptodate">
87N/A <and>
87N/A <available file="${dist.classes.jar}" type="file"/>
87N/A <uptodate targetfile="${dist.classes.jar}">
87N/A <srcfiles dir="${build.classes.dir}" includes="**"/>
87N/A </uptodate>
87N/A </and>
87N/A </condition>
87N/A </target>
87N/A <target name="-dist-classes-jar"
87N/A depends="init, -init-src-dirs, -dist-classes-jar-uptodate"
87N/A unless="dist.classes.jar.uptodate">
87N/A <delete file="${dist.classes.jar}"/>
87N/A <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
0N/A </target>
0N/A
131N/A <target name="-build-setup"
131N/A depends="init, -init-src-dirs, -drop-build-setup">
87N/A </target>
87N/A
87N/A <!-- Build (compilation) of sources to class files. -->
87N/A <target name="build"
131N/A depends="compile, -build-setup">
131N/A </target>
131N/A <target name="compile"
131N/A depends="init, -init-src-dirs">
131N/A <mkdir dir="${build.classes.dir}"/>
99N/A <javac
131N/A includeAntRuntime="false"
131N/A classpath="${build.classes.dir}:${tools.jar}"
99N/A fork="true"
0N/A destdir="${build.classes.dir}"
0N/A memoryInitialSize="${javac.memoryInitialSize}"
0N/A memoryMaximumSize="${javac.memoryMaximumSize}"
87N/A source="${javac.source}"
50N/A debug="${javac.debug}"
0N/A target="${javac.target}">
87N/A <compilerarg value="-J-Xbootclasspath/p:${javac.jar}"/>
87N/A <compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/>
87N/A <src refid="src.dir.id"/>
87N/A </javac>
87N/A </target>
87N/A
87N/A <!-- Test. (FIXME: Need to know how to run tests.) -->
87N/A <target name="test"
87N/A depends="init, -init-src-dirs, dist">
87N/A <echo message="FIXME: How do you run the tests"/>
87N/A </target>
87N/A
87N/A <!-- Populate source area if needed. -->
87N/A <target name="source"
87N/A depends="init, -init-src-dirs"
87N/A description="Populate all source file directories">
0N/A </target>
0N/A
94N/A <!-- Populate drop_included area. -->
94N/A <target name="drop_included"
94N/A depends="clobber"
94N/A description="Populate all source file directories">
94N/A <delete dir="${drop.included.dir}"/>
94N/A <antcall target="source"/>
94N/A <move file="${drop.expanded.dir}" tofile="${drop.included.dir}"/>
94N/A <delete dir="${drop.included.dir}/bundles"/>
94N/A </target>
94N/A
87N/A <!-- Clean up compiled files. -->
87N/A <target name="clean"
87N/A description="Delete all generated files">
87N/A <delete dir="${build.dir}"/>
87N/A <delete dir="${dist.dir}"/>
87N/A </target>
87N/A
87N/A <!-- Clean up compiled files and all imported source files. -->
87N/A <target name="clobber"
87N/A depends="clean"
87N/A description="Delete all generated files, including imported sources">
94N/A <delete dir="${drop.expanded.dir}"/>
0N/A </target>
0N/A
87N/A <target name="-banner">
87N/A <echo message="+---------------------------------------+"/>
87N/A <echo message="+ Starting ant project ${ant.project.name} +"/>
87N/A <echo message="+---------------------------------------+"/>
87N/A </target>
87N/A
87N/A <!-- Do everything but test. -->
87N/A <target name="all"
87N/A depends="-banner, sanity, dist"
87N/A description="Build everything.">
87N/A <echo message="+---------------------------------------+"/>
87N/A <echo message="+ Finishing ant project ${ant.project.name}"/>
87N/A <echo message="+---------------------------------------+"/>
0N/A </target>
0N/A
0N/A</project>