build.xml revision 462
fa9e4066f08beec538e775443c5be79dd423fcabahrens Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrens DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock This code is free software; you can redistribute it and/or modify it
fa9e4066f08beec538e775443c5be79dd423fcabahrens under the terms of the GNU General Public License version 2 only, as
fa9e4066f08beec538e775443c5be79dd423fcabahrens published by the Free Software Foundation. Sun designates this
fa9e4066f08beec538e775443c5be79dd423fcabahrens particular file as subject to the "Classpath" exception as provided
fa9e4066f08beec538e775443c5be79dd423fcabahrens by Sun in the LICENSE file that accompanied this code.
fa9e4066f08beec538e775443c5be79dd423fcabahrens This code is distributed in the hope that it will be useful, but WITHOUT
fa9e4066f08beec538e775443c5be79dd423fcabahrens ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fa9e4066f08beec538e775443c5be79dd423fcabahrens FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
fa9e4066f08beec538e775443c5be79dd423fcabahrens version 2 for more details (a copy is included in the LICENSE file that
fa9e4066f08beec538e775443c5be79dd423fcabahrens accompanied this code).
fa9e4066f08beec538e775443c5be79dd423fcabahrens You should have received a copy of the GNU General Public License version
fa9e4066f08beec538e775443c5be79dd423fcabahrens 2 along with this work; if not, write to the Free Software Foundation,
fa9e4066f08beec538e775443c5be79dd423fcabahrens Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e6032be1b8a5a1d03081e0d62b624db95c4cf8b7marks Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
fa9e4066f08beec538e775443c5be79dd423fcabahrens CA 95054 USA or visit www.sun.com if you need additional information or
fa9e4066f08beec538e775443c5be79dd423fcabahrens have any questions.
fa9e4066f08beec538e775443c5be79dd423fcabahrens This is the main build file for the complete langtools workspace.
fa9e4066f08beec538e775443c5be79dd423fcabahrens It is used both when working on the tools in NetBeans, and when building
fa9e4066f08beec538e775443c5be79dd423fcabahrens JDK itself, in which case it is invoked from the wrapper Makefile.
fa9e4066f08beec538e775443c5be79dd423fcabahrens<project name="langtools" default="build" basedir="..">
fa9e4066f08beec538e775443c5be79dd423fcabahrens <!-- Force full debuginfo for javac if the debug.classfiles
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw property is set. This must be BEFORE the include of
fa9e4066f08beec538e775443c5be79dd423fcabahrens build.properties because it sets javac.debuglevel. -->
fa9e4066f08beec538e775443c5be79dd423fcabahrens <condition property="javac.debuglevel" value="source,lines,vars">
fa9e4066f08beec538e775443c5be79dd423fcabahrens </condition>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <!-- The following locations can be used to override default property values. -->
fa9e4066f08beec538e775443c5be79dd423fcabahrens <!-- Use this location for customizations specific to this instance of this workspace -->
fa9e4066f08beec538e775443c5be79dd423fcabahrens <!-- Use this location for customizations common to all OpenJDK langtools workspaces -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <property file="${user.home}/.openjdk/${ant.project.name}-build.properties"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <!-- Use this location for customizations common to all OpenJDK workspaces -->
fa9e4066f08beec538e775443c5be79dd423fcabahrens <property file="${user.home}/.openjdk/build.properties"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- Convenient shorthands for standard locations within the workspace. -->
fa9e4066f08beec538e775443c5be79dd423fcabahrens <property name="build.bootstrap.dir" location="${build.dir}/bootstrap"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <property name="build.coverage.dir" location="${build.dir}/coverage"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <property name="build.classes.dir" location="${build.dir}/classes"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <property name="build.gensrc.dir" location="${build.dir}/gensrc"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <property name="build.genstubs.dir" location="${build.dir}/genstubs"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <property name="build.javadoc.dir" location="${build.dir}/javadoc"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <property name="build.jtreg.dir" location="${build.dir}/jtreg"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <property name="build.toolclasses.dir" location="${build.dir}/toolclasses"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <property name="dist.bin.dir" location="${dist.dir}/bin"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <property name="dist.coverage.dir" location="${dist.dir}/coverage"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <property name="dist.findbugs.dir" location="${dist.dir}/findbugs"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <property name="dist.lib.dir" location="${dist.dir}/lib"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <property name="make.tools.dir" location="${make.dir}/tools"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <property name="src.bin.dir" location="${src.dir}/share/bin"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <property name="src.classes.dir" location="${src.dir}/share/classes"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- java.marker is set to a marker file to check for within a Java install dir.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw The best file to check for across Solaris/Linux/Windows/MacOS is one of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw executables; regrettably, that is OS-specific. -->
fa9e4066f08beec538e775443c5be79dd423fcabahrens </condition>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <condition property="java.marker" value="bin/java.exe">
fa9e4066f08beec538e775443c5be79dd423fcabahrens </condition>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <!-- Standard property values, if not overriden by earlier settings. -->
169cdae232f15e542d6af0a9ce30c3f84222bc0fmarks <!-- launcher.java is used in the launcher scripts provided to run
fa9e4066f08beec538e775443c5be79dd423fcabahrens the tools' jar files. If it has not already been set, then
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw default it to use ${target.java.home}, if available, otherwise
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw quietly default to simply use "java". -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </condition>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- Logic for handling access import jdk classes, if available.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw import.jdk should be unset, or set to jdk home (to use rt.jar)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw or to jdk repo (to use src/share/classes).
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw Based on the value, if any, set up default values for javac's sourcepath,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw classpath and bootclasspath. Note: the default values are overridden
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw in the build-bootstrap-classes macro. -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <available property="import.jdk.src.dir" value="${import.jdk}/src/share/classes"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw filepath="${import.jdk}/src/share/classes" file="java/nio/file/Path.java"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <available property="import.jdk.jar" value="${import.jdk}/jre/lib/rt.jar"
fa9e4066f08beec538e775443c5be79dd423fcabahrens ignoresystemclasses="true"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw classpath="${import.jdk}/jre/lib/rt.jar" classname="java.nio.file.Path"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- Set the default value of the sourcepath used for javac. -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <condition property="javac.sourcepath" value="${build.genstubs.dir}" else="">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </condition>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- Set the default value of the classpath used for javac. -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- Set the default bootclasspath option used for javac.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw Note that different variants of the option are used, meaning we can't just
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw define the value for the option.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw Note the explicit use of the standard property ${path.separator} in the following.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw This is because Ant is not clever enough to handle direct use of : or ; -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw value="-Xbootclasspath:${build.classes.dir}${path.separator}${import.jdk.jar}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw else="-Xbootclasspath/p:${build.classes.dir}">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </condition>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <condition property="exclude.files" value="" else="${require.import.jdk.files}">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </condition>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- for debugging -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <echo message="import.jdk.src.dir: ${import.jdk.src.dir}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- Standard target to build deliverables for JDK build. -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build" depends="build-bootstrap-tools,build-all-classes">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <fileset dir="${build.bootstrap.dir}" includes="bin/,lib/"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <jar file="${dist.lib.dir}/classes.jar" basedir="${build.classes.dir}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <zip file="${dist.lib.dir}/src.zip" basedir="${src.classes.dir}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw depends="build-bootstrap-javac,build-bootstrap-javadoc,build-bootstrap-doclets,build-bootstrap-javah"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw depends="build-javac,build-javadoc,build-doclets,build-javah,build-javap,build-apt"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-all-classes" depends="build-bootstrap-javac,-create-import-jdk-stubs">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <build-classes includes="${javac.includes} ${javadoc.includes} ${doclets.includes} ${javah.includes} ${javap.includes} ${apt.includes}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- clean -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="clean" description="Delete all generated files">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- Additional targets for running tools on the build -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="jtreg" depends="build-all-tools,-def-jtreg">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="findbugs" depends="-def-findbugs,build-all-tools">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw projectName="JDK langtools ${full.version}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw output="xml"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw outputFile="${dist.findbugs.dir}/findbugs.xml"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw reportLevel="${findbugs.reportLevel}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw failOnError="false"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw errorProperty="findbugs.all.errors"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw warningsProperty="findbugs.all.warnings"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw jvmargs="-Xmx512M">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <sourcePath>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </sourcePath>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </findbugs>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <redirector output="${dist.findbugs.dir}/findbugs.html"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="coverage" depends="-def-cobertura,build-all-classes,instrument-classes,jtreg,coverage-report"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="instrument-classes" depends="-def-cobertura">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- only define the following property when we want coverage info -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <property name="coverage.options" value="-Dnet.sourceforge.cobertura.datafile=${build.coverage.dir}/cobertura.ser"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <property name="coverage.classpath" refid="coverage.classpath"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <cobertura-instrument todir="${build.coverage.dir}/classes"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="coverage-report" depends="-def-cobertura">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw format="xml"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- javac targets -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <build-bootstrap-jar name="javac" includes="${javac.includes}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-classes-javac" depends="build-bootstrap-javac,-create-import-jdk-stubs">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-javac" depends="build-classes-javac">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="javadoc-javac" depends="build-javac,-def-javadoc-tool">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <javadoc-tool name="javac" includes="${javac.includes}" options="${javadoc.jls3.option}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="jtreg-javac" depends="build-javac,build-javap,-def-jtreg">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="findbugs-javac" depends="build-javac,-def-findbugs">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="javac" depends="build-javac,jtreg-javac,findbugs-javac"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- javadoc targets -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-bootstrap-javadoc" depends="build-bootstrap-javac">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <build-bootstrap-classes includes="${javadoc.includes}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <build-bootstrap-jar name="javadoc" includes="${javadoc.includes}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw jarclasspath="javac.jar doclets.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-classes-javadoc" depends="build-classes-javac">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-javadoc" depends="build-javac,build-classes-javadoc">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <build-jar name="javadoc" includes="${javadoc.includes}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw jarclasspath="javac.jar doclets.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="javadoc-javadoc" depends="build-javadoc,-def-javadoc-tool">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <javadoc-tool name="javadoc" includes="${javadoc.includes}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="jtreg-javadoc" depends="build-javadoc,-def-jtreg">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="findbugs-javadoc" depends="build-javadoc,-def-findbugs">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="javadoc" depends="build-javadoc,jtreg-javadoc,findbugs-javadoc"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- doclets targets -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-bootstrap-doclets" depends="build-bootstrap-javadoc,-def-build-bootstrap-jar">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <build-bootstrap-classes includes="${doclets.includes}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <build-bootstrap-jar name="doclets" includes="${doclets.includes}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw jarclasspath="javadoc.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-classes-doclets" depends="build-classes-javadoc">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-doclets" depends="build-javadoc,build-classes-doclets">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- just jar, no bin for doclets -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <build-jar name="doclets" includes="${doclets.includes}" jarclasspath="javadoc.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- (no javadoc for doclets) -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="jtreg-doclets" depends="build-doclets,-def-jtreg">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="findbugs-doclets" depends="build-doclets,-def-findbugs">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="doclets" depends="build-doclets,jtreg-doclets,findbugs-doclets"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- javah targets -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-bootstrap-javah" depends="build-bootstrap-javadoc">
fa9e4066f08beec538e775443c5be79dd423fcabahrens <build-bootstrap-classes includes="${javah.includes}"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <build-bootstrap-jar name="javah" includes="${javah.includes}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw jarclasspath="javadoc.jar doclets.jar javac.jar"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <target name="build-javah" depends="build-javac,build-classes-javah">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <build-jar name="javah" includes="${javah.includes}" jarclasspath="javac.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-classes-javah" depends="build-classes-javadoc">
fa9e4066f08beec538e775443c5be79dd423fcabahrens <!-- (no javadoc for javah) -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="jtreg-javah" depends="build-javah,-def-jtreg">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="findbugs-javah" depends="build-javah,-def-findbugs">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="javah" depends="build-javah,jtreg-javah,findbugs-javah"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- javap targets -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <build-bootstrap-jar name="javap" includes="${javap.includes}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-classes-javap" depends="build-classes-javac">
2459a9eaca6b6525c76289d22ffe4c96be1956d6marks <target name="build-javap" depends="build-javac,build-classes-javap">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw jarclasspath="javac.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- (no javadoc for javap) -->
2459a9eaca6b6525c76289d22ffe4c96be1956d6marks <target name="jtreg-javap" depends="build-javap,-def-jtreg">
2459a9eaca6b6525c76289d22ffe4c96be1956d6marks <target name="findbugs-javap" depends="build-javap,-def-findbugs">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="javap" depends="build-javap,jtreg-javap,findbugs-javap"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <!-- apt targets -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-bootstrap-apt" depends="build-bootstrap-javac">
fa9e4066f08beec538e775443c5be79dd423fcabahrens <build-bootstrap-jar name="apt" includes="${apt.includes}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw jarclasspath="javac.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-apt" depends="build-javac,build-classes-apt">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <build-jar name="apt" includes="${apt.includes}" jarclasspath="javac.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="build-classes-apt" depends="build-classes-javac">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="javadoc-apt" depends="build-apt,-def-javadoc-tool">
169cdae232f15e542d6af0a9ce30c3f84222bc0fmarks <target name="jtreg-apt" depends="build-apt,-def-jtreg">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="findbugs-apt" depends="build-apt,-def-findbugs">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="apt" depends="build-apt,jtreg-apt,findbugs-apt"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- Create import JDK stubs -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="-create-import-jdk-stubs" depends="-def-genstubs" if="import.jdk.src.dir">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw srcdir="${import.jdk.src.dir}" destdir="${build.genstubs.dir}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw fork="true" classpath="${build.toolclasses.dir}:${build.bootstrap.dir}/classes:${ant.home}/lib/ant.jar"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- Check targets -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="-check-boot.java.home" depends="-def-check">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="-check-target.java.home" depends="-def-check">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <check name="target java" property="target.java.home" marker="${java.marker}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="-check-cobertura.home" depends="-def-check">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <check name="cobertura" property="cobertura.home" marker="cobertura.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="-check-findbugs.home" depends="-def-check">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <check name="findbugs" property="findbugs.home" marker="lib/findbugs.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- Ant macro and preset defs -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <copy file="${src.bin.dir}/launcher.sh-template" tofile="@{bin.dir}/@{name}">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </filterset>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </macrodef>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <attribute name="classes.dir" default="${build.classes.dir}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw basedir="@{classes.dir}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw includes="@{includes}">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <manifest>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </manifest>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </macrodef>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="-def-build-classes" depends="-def-pcompile">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <attribute name="excludes" default="${exclude.files} **/package-info.java"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <attribute name="classes.dir" default="${build.classes.dir}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <attribute name="gensrc.dir" default="${build.gensrc.dir}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <attribute name="bootclasspath.opt" default="${javac.bootclasspath.opt}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <attribute name="classpath" default="${javac.classpath}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <attribute name="sourcepath" default="${javac.sourcepath}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <attribute name="java.home" default="${boot.java.home}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <attribute name="full.version" default="${full.version}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <echo level="verbose" message="build-classes: excludes=@{excludes}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <echo level="verbose" message="build-classes: bootclasspath.opt=@{bootclasspath.opt}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <echo level="verbose" message="build-classes: classpath=@{classpath}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <echo level="verbose" message="build-classes: sourcepath=@{sourcepath}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw destdir="@{gensrc.dir}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw includes="@{includes}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <fileset dir="${src.classes.dir}" includes="@{includes}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <globmapper from="*.properties-template" to="*.properties"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </filterset>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw destdir="@{gensrc.dir}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw includes="**/*.properties"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw executable="@{java.home}/bin/javac"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw srcdir="${src.classes.dir}:@{gensrc.dir}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw destdir="@{classes.dir}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw includes="@{includes}"
4c841f6070b4f88f9dc008de526b313bbebd4e32marks excludes="@{excludes}"
4c841f6070b4f88f9dc008de526b313bbebd4e32marks sourcepath="@{sourcepath}"
e0d35c4478bf9fd4080951b5b9d1f9a38948ba69marks classpath="@{classpath}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw includeAntRuntime="no"
4c841f6070b4f88f9dc008de526b313bbebd4e32marks source="@{source}"
4c841f6070b4f88f9dc008de526b313bbebd4e32marks target="@{target}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw debuglevel="${javac.debuglevel}">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <fileset dir="${src.classes.dir}" includes="@{includes}" excludes="@{excludes}">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </fileset>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </macrodef>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="-def-build-bootstrap-tool" depends="-check-boot.java.home,-def-build-tool">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw java="${boot.java}"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </presetdef>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="-def-build-bootstrap-jar" depends="-def-build-jar">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </presetdef>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="-def-build-bootstrap-classes" depends="-def-build-classes">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw bootclasspath.opt="-Xbootclasspath/p:${build.bootstrap.dir}/classes"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw sourcepath=""
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw excludes="${require.import.jdk.files} **/package-info.java"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </presetdef>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw executable="${boot.java.home}/bin/javac"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw srcdir="${make.tools.dir}/CompileProperties"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw classpath="${ant.home}/lib/ant.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw classname="CompilePropertiesTask"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw classpath="${build.toolclasses.dir}/"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="-def-genstubs" depends="build-bootstrap-javac">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw executable="${boot.java.home}/bin/javac"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw srcdir="${make.tools.dir}/GenStubs"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw classpath="${build.bootstrap.dir}/classes:${ant.home}/lib/ant.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw classname="GenStubs$$Ant"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw classpath="${build.toolclasses.dir}/"/>
e0d35c4478bf9fd4080951b5b9d1f9a38948ba69marks <target name="-def-javadoc-tool" depends="-check-target.java.home">
e0d35c4478bf9fd4080951b5b9d1f9a38948ba69marks <attribute name="source" default="1.5"/> <!-- FIXME -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- Note: even with this default value, includes
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw from src.classes.dir get javadoc'd; see packageset below -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <property name="javadoc.packagenames" value="none"/> <!-- default, can be overridden per user or per project -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw executable="${target.java.home}/bin/javadoc"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw destdir="${build.javadoc.dir}/@{name}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw source="@{source}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw windowtitle="UNOFFICIAL"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw failonerror="true"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw use="true"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw author="false"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw version="false"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw packagenames="${javadoc.packagenames}" >
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <header><![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></header>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <bootclasspath>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </bootclasspath>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <sourcepath>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </sourcepath>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- means that {@link some.package} will not work, which is no good. -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- (It correctly skips excluded single classes, but not if packageset is also included, -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- which also causes duplicates in the class index for included files.) -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <packageset dir="${src.classes.dir}" includes="@{includes}">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </packageset>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </javadoc>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </macrodef>
2459a9eaca6b6525c76289d22ffe4c96be1956d6marks <target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home,-check-target.java.home">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <classpath>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <pathelement location="${jtreg.home}/lib/javatest.jar"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </classpath>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </taskdef>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <attribute name="keywords" default="-keywords:!ignore"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <property name="coverage.options" value=""/> <!-- default -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <property name="coverage.classpath" value=""/> <!-- default -->
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw workDir="${build.jtreg.dir}/@{name}/work"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw reportDir="${build.jtreg.dir}/@{name}/report"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw jdk="@{jdk}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw failonerror="false" resultproperty="jtreg.@{name}.result"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw javacoptions="-g"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}:${build.classes.dir} @{jpda.jvmargs}">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <!-- the next two properties are for convenience, when only
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw a single instance of jtreg will be invoked. -->
2459a9eaca6b6525c76289d22ffe4c96be1956d6marks </condition>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <property name="jtreg.report" value="${build.jtreg.dir}/@{name}/report"/>
2459a9eaca6b6525c76289d22ffe4c96be1956d6marks </sequential>
2459a9eaca6b6525c76289d22ffe4c96be1956d6marks </macrodef>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <target name="-def-cobertura" depends="-check-cobertura.home">
fa9e4066f08beec538e775443c5be79dd423fcabahrens <taskdef classpathref="cobertura.classpath" resource="tasks.properties"/>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <target name="-def-findbugs" unless="findbugs.defined" depends="-check-findbugs.home">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <classpath>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <pathelement location="${findbugs.home}/lib/findbugs.jar"/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens </classpath>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw output="@{output}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw outputFile="@{outputFile}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw reportLevel="@{reportLevel}"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw failOnError="false"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw errorProperty="findbugs.@{name}.errors"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw warningsProperty="findbugs.@{name}.warnings"
fa9e4066f08beec538e775443c5be79dd423fcabahrens jvmargs="-Xmx512M" >
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <auxClasspath>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </auxClasspath>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <sourcePath>
bda89588bd7667394a834e8a9a34612cce2ae9c3jp </sourcePath>
bda89588bd7667394a834e8a9a34612cce2ae9c3jp </findbugs>
fa9e4066f08beec538e775443c5be79dd423fcabahrens </sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </macrodef>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <fail message="Cannot locate @{name}: please set @{property} to its location">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <condition>
29a0b7379cd3103841d05e3ed04486412049acccmarks </condition>
29a0b7379cd3103841d05e3ed04486412049acccmarks <fail message="@{name} is not installed in ${@{property}}">
29a0b7379cd3103841d05e3ed04486412049acccmarks <condition>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </condition>
fa9e4066f08beec538e775443c5be79dd423fcabahrens </sequential>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw </macrodef>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <!-- standard JDK target -->
fa9e4066f08beec538e775443c5be79dd423fcabahrens description="display settings of configuration values">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <echo level="info">boot.java.home = ${boot.java.home}</echo>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <echo level="info">target.java.home = ${target.java.home}</echo>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <echo level="info">findbugs.home = ${findbugs.home}</echo>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <!-- useful debugging targets -->
fa9e4066f08beec538e775443c5be79dd423fcabahrens <diagnostics/>
fa9e4066f08beec538e775443c5be79dd423fcabahrens <target name="post-sanity" depends="-def-jtreg,sanity,build"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw description="perform basic validation after a standard build">
fa9e4066f08beec538e775443c5be79dd423fcabahrens verbose="summary"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw failonerror="false" resultproperty="jtreg.post-sanity.result">