build.xml revision 45
0N/A<?
xml version="1.0" encoding="UTF-8"?>
0N/A Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. 0N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 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 0N/A published by the Free Software Foundation. Sun designates this 0N/A particular file as subject to the "Classpath" exception as provided 0N/A by Sun in the LICENSE file that accompanied this code. 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 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 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A CA 95054 USA or visit www.sun.com if you need additional information or 0N/A This is the main build file for the complete langtools workspace. 0N/A It is used both when working on the tools in NetBeans, and when building 0N/A JDK itself, in which case it is invoked from the wrapper Makefile. 0N/A<
project name="langtools" default="build" basedir="..">
0N/A <!-- The following locations can be used to override default property values. --> 0N/A <!-- Use this location for customizations specific to this instance of this workspace --> 0N/A <!-- Use this location for customizations common to all OpenJDK langtools workspaces --> 0N/A <!-- Use this location for customizations common to all OpenJDK workspaces --> 0N/A <!-- Convenient shorthands for standard locations within the workspace. --> 0N/A <!-- java.marker is set to a marker file to check for within a Java install dir. 0N/A executables; regrettably, that is OS-specific. --> 0N/A <
os family="windows"/>
0N/A <!-- Standard property values, if not overriden by earlier settings. --> 0N/A <!-- Standard target to build deliverables for JDK build. --> 0N/A <
target name="build" depends="build-bootstrap-tools,build-all-classes">
0N/A <
target name="build-bootstrap-tools" depends="build-bootstrap-javac,build-bootstrap-javadoc,build-bootstrap-doclets,build-bootstrap-javah"/>
0N/A <
target name="build-all-tools" depends="build-javac,build-javadoc,build-doclets,build-javah,build-javap,build-apt"/>
0N/A <
target name="build-all-classes" depends="build-classes-javac,build-classes-javadoc,build-classes-doclets,build-classes-javah,build-classes-javap,build-classes-apt"/>
0N/A <
target name="clean" description="Delete all generated files">
0N/A <!-- Additional targets for running tools on the build --> 0N/A <!-- An alternative for the following would be to do a single jtreg run for all tests. 0N/A However, that would currently be slower, since we would have to run all the tests 0N/A with samevm="false", since not all test directories currently support samevm="true". --> 0N/A <
target name="jtreg" depends="jtreg-javac,jtreg-javadoc,jtreg-doclets,jtreg-javah,jtreg-javap,jtreg-apt"/>
0N/A <
target name="findbugs" depends="-def-findbugs,build-all-tools">
0N/A <
exec executable="sh">
0N/A <
arg value="-longBugCodes"/>
0N/A <
target name="coverage" depends="-def-cobertura,build-all-classes,instrument-classes,jtreg,coverage-report"/>
0N/A <
target name="instrument-classes" depends="-def-cobertura">
0N/A <!-- only define the following property when we want coverage info --> 0N/A includes="**/*.class" excludes="**/resources/*.class"/>
0N/A </
cobertura-
instrument>
0N/A <
target name="coverage-report" depends="-def-cobertura">
0N/A <!-- javac targets --> 0N/A <
target name="build-bootstrap-javac" depends="-def-build-bootstrap-tool">
0N/A <
target name="build-classes-javac" depends="build-bootstrap-javac">
0N/A <
target name="build-javac" depends="build-bootstrap-javac">
0N/A <
target name="javadoc-javac" depends="build-javac,-def-javadoc-tool">
0N/A <
target name="jtreg-javac" depends="build-javac,-def-jtreg">
0N/A <
target name="findbugs-javac" depends="build-javac,-def-findbugs">
0N/A <
findbugs-
tool name="javac"/>
0N/A <
target name="javac" depends="build-javac,jtreg-javac,findbugs-javac"/>
0N/A <!-- javadoc targets --> 0N/A <
target name="build-bootstrap-javadoc" depends="build-bootstrap-javac">
0N/A <
build-
bootstrap-
tool name="javadoc" 0N/A <
target name="build-classes-javadoc" depends="build-classes-javac">
0N/A <
target name="build-javadoc" depends="build-javac">
0N/A <
build-
tool name="javadoc" 0N/A <
target name="javadoc-javadoc" depends="build-javadoc,-def-javadoc-tool">
0N/A <
target name="jtreg-javadoc" depends="build-javadoc,-def-jtreg">
0N/A <
target name="findbugs-javadoc" depends="build-javadoc,-def-findbugs">
0N/A <
findbugs-
tool name="javadoc"/>
0N/A <
target name="javadoc" depends="build-javadoc,jtreg-javadoc,findbugs-javadoc"/>
0N/A <!-- doclets targets --> 0N/A <
target name="build-bootstrap-doclets" depends="build-bootstrap-javadoc,-def-build-bootstrap-jar">
0N/A <
build-
bootstrap-
jar name="doclets" 0N/A <
target name="build-classes-doclets" depends="build-classes-javadoc">
0N/A <
target name="build-doclets" depends="build-javadoc">
0N/A <!-- just jar, no bin for doclets --> 0N/A <
build-
jar name="doclets" 0N/A <!-- (no javadoc for doclets) --> 0N/A <
target name="jtreg-doclets" depends="build-doclets,-def-jtreg">
0N/A <
target name="findbugs-doclets" depends="build-doclets,-def-findbugs">
0N/A <
findbugs-
tool name="doclets"/>
0N/A <
target name="doclets" depends="build-doclets,jtreg-doclets,findbugs-doclets"/>
0N/A <!-- javah targets --> 0N/A <
target name="build-bootstrap-javah" depends="build-bootstrap-javadoc">
0N/A <
build-
bootstrap-
tool name="javah" 0N/A <
target name="build-javah" depends="build-javadoc">
0N/A <
build-
tool name="javah" 0N/A <
target name="build-classes-javah" depends="build-classes-javadoc">
0N/A <!-- (no javadoc for javah) --> 0N/A <
target name="jtreg-javah" depends="build-javah,-def-jtreg">
0N/A <
target name="findbugs-javah" depends="build-javah,-def-findbugs">
0N/A <
findbugs-
tool name="javah"/>
0N/A <
target name="javah" depends="build-javah,jtreg-javah,findbugs-javah"/>
0N/A <!-- javap targets --> 0N/A <
target name="build-bootstrap-javap" depends="-def-build-bootstrap-tool">
0N/A <
build-
bootstrap-
tool name="javap" 45N/A <
target name="build-classes-javap" depends="build-classes-javac">
45N/A <
target name="build-javap" depends="build-javac">
0N/A <
build-
tool name="javap" 0N/A <!-- (no javadoc for javap) --> 0N/A <
target name="jtreg-javap" depends="build-javap,-def-jtreg">
0N/A <
target name="findbugs-javap" depends="build-javap,-def-findbugs">
0N/A <
findbugs-
tool name="javap"/>
0N/A <
target name="javap" depends="build-javap,jtreg-javap,findbugs-javap"/>
0N/A <!-- apt targets --> 0N/A <
target name="build-bootstrap-apt" depends="build-bootstrap-javac">
0N/A <
build-
bootstrap-
tool name="apt" 0N/A <
target name="build-apt" depends="build-javac">
0N/A <
build-
tool name="apt" 0N/A <
target name="build-classes-apt" depends="build-classes-javac">
0N/A <
target name="javadoc-apt" depends="build-apt,-def-javadoc-tool">
0N/A <
target name="jtreg-apt" depends="build-apt,-def-jtreg">
0N/A <
target name="findbugs-apt" depends="build-apt,-def-findbugs">
0N/A <
findbugs-
tool name="apt"/>
0N/A <
target name="apt" depends="build-apt,jtreg-apt,findbugs-apt"/>
0N/A <!-- Check targets --> 0N/A <!-- Ant macro and preset defs --> 0N/A <
target name="-def-build-tool" depends="-def-build-jar">
0N/A <
macrodef name="build-tool">
0N/A <
attribute name="name"/>
0N/A <
attribute name="includes"/>
0N/A <
attribute name="java" default="java"/>
0N/A <
attribute name="jarclasspath" default=""/>
0N/A <
attribute name="release" default="${release}"/>
0N/A includes="@{includes}" 0N/A excludes="@{excludes}" 0N/A jarmainclass="@{jarmainclass}" 0N/A jarclasspath="@{jarclasspath}" 0N/A release="@{release}" 0N/A <
filterset begintoken="#" endtoken="#">
0N/A <
filter token="PROGRAM" value="@{name}"/>
0N/A <
filter token="TARGET_JAVA" value="@{java}"/>
0N/A <
target name="-def-build-jar" depends="-def-build-classes">
0N/A <
macrodef name="build-jar">
0N/A <
attribute name="name"/>
0N/A <
attribute name="includes"/>
0N/A <
attribute name="jarclasspath" default=""/>
0N/A <
attribute name="release" default="${release}"/>
0N/A includes="@{includes}" 0N/A excludes="@{excludes}" 0N/A release="@{release}" 0N/A includes="@{includes}">
0N/A <
attribute name="Main-Class" value="@{jarmainclass}"/>
0N/A <
attribute name="Class-Path" value="@{jarclasspath}"/>
0N/A <
target name="-def-build-classes" depends="-def-pcompile">
0N/A <
macrodef name="build-classes">
0N/A <
attribute name="name"/>
0N/A <
attribute name="includes"/>
0N/A <
attribute name="release" default="${release}"/>
0N/A includes="@{includes}"/>
0N/A <
globmapper from="*.properties-template" to="*.properties"/>
0N/A <
filterset begintoken="$(" endtoken=")">
0N/A <
filter token="RELEASE" value="@{release}"/>
0N/A includes="**/*.properties"/>
0N/A includes="@{includes}" 0N/A includeAntRuntime="no" 0N/A <
compilerarg line="-Xlint"/>
0N/A includes="@{includes}" 0N/A excludes="@{excludes}" 0N/A includeAntRuntime="no" 0N/A <
include name="@{includes}"/>
0N/A <
exclude name="**/*.java"/>
0N/A <
exclude name="**/*.properties"/>
0N/A <
exclude name="**/*-template"/>
0N/A <
presetdef name="build-bootstrap-tool">
0N/A <
target name="-def-build-bootstrap-jar" depends="-def-build-jar">
0N/A <
presetdef name="build-bootstrap-jar">
0N/A <
target name="-def-pcompile">
0N/A <
taskdef name="pcompile" 0N/A classname="CompilePropertiesTask" 0N/A <
macrodef name="javadoc-tool">
0N/A <
attribute name="name"/>
0N/A <
attribute name="includes"/>
0N/A <
attribute name="options" default=""/>
0N/A <
attribute name="source" default="1.5"/>
<!-- FIXME --> 0N/A <
property name="javadoc.options" value=""/>
<!-- default, can be overridden per user or per project --> 0N/A <!-- Note: even with this default value, includes 0N/A windowtitle="UNOFFICIAL" 0N/A <
header><
![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></
header>
0N/A <
arg line="@{options}"/>
0N/A <!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> --> 0N/A <!-- (It correctly skips excluded single classes, but not if packageset is also included, --> 0N/A <!-- which also causes duplicates in the class index for included files.) --> 0N/A <
filename name="java/"/>
0N/A <
filename name="javax/"/>
0N/A <
macrodef name="jtreg-tool">
0N/A <
attribute name="name"/>
0N/A <
attribute name="tests"/>
0N/A <
attribute name="samevm" default="false"/>
0N/A <
attribute name="verbose" default="summary"/>
0N/A <
attribute name="options" default=""/>
0N/A <
attribute name="keywords" default="-keywords:!ignore"/>
0N/A samevm="@{samevm}" verbose="@{verbose}" 0N/A failonerror="false" resultproperty="jtreg.@{name}.result" 0N/A <
arg line="@{keywords}"/>
0N/A <
arg line="@{options}"/>
0N/A <
arg line="@{tests}"/>
0N/A <!-- the next two properties are for convenience, when only 0N/A a single instance of jtreg will be invoked. --> 0N/A <
include name="lib/**/*.jar"/>
0N/A <
macrodef name="findbugs-tool">
0N/A <
attribute name="name"/>
0N/A <
attribute name="output" default="emacs"/>
0N/A <
attribute name="outputFile" default=""/>
0N/A <
attribute name="reportLevel" default="high"/>
0N/A outputFile="@{outputFile}" 0N/A reportLevel="@{reportLevel}" 0N/A errorProperty="findbugs.@{name}.errors" 0N/A warningsProperty="findbugs.@{name}.warnings" 0N/A jvmargs="-Xmx512M" >
0N/A <
target name="-def-check">
0N/A <
macrodef name="check">
0N/A <
attribute name="name"/>
0N/A <
attribute name="property"/>
0N/A <
attribute name="marker"/>
0N/A <
fail message="Cannot locate @{name}: please set @{property} to its location">
0N/A <
isset property="@{property}"/>
0N/A <
fail message="@{name} is not installed in ${@{property}}">
0N/A <
available file="${@{property}}/@{marker}"/>
0N/A <!-- standard JDK target --> 0N/A <
target name="sanity" 0N/A description="display settings of congiguration values">
0N/A <!-- useful debugging targets --> 0N/A <
target name="diagnostics">
0N/A <
target name="post-sanity" depends="-def-jtreg,sanity,build" 0N/A description="perform basic validation after a standard build">