build.xml revision 577
0N/A<?
xml version="1.0" encoding="UTF-8"?>
553N/A Copyright (c) 2007, 2009, Oracle and/or its affiliates. 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 553N/A published by the Free Software Foundation. Oracle designates this 0N/A particular file as subject to the "Classpath" exception as provided 553N/A by Oracle 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. 553N/A Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 578N/A This is the main build file for the complete langtools workspace. 578N/A It is used both when working on the tools in NetBeans, and when building 578N/A JDK itself, in which case it is invoked from the wrapper Makefile. 578N/A<
project name="langtools" default="build" basedir="..">
578N/A property is set. This must be BEFORE the include of 578N/A <!-- The following locations can be used to override default property values. --> 578N/A <!-- Use this location for customizations specific to this instance of this workspace --> 578N/A <!-- Use this location for customizations common to all OpenJDK langtools workspaces --> 578N/A <!-- Use this location for customizations common to all OpenJDK workspaces --> 578N/A <!-- Convenient shorthands for standard locations within the workspace. --> 578N/A <!-- java.marker is set to a marker file to check for within a Java install dir. 578N/A executables; regrettably, that is OS-specific. --> 578N/A <!-- Standard property values, if not overriden by earlier settings. --> 578N/A the tools' jar files. If it has not already been set, then 578N/A quietly default to simply use "java". --> 0N/A <!-- Logic for handling access import jdk classes, if available. 578N/A Based on the value, if any, set up default values for javac's sourcepath, 370N/A classpath and bootclasspath. Note: the default values are overridden 272N/A in the build-bootstrap-classes macro. --> 272N/A ignoresystemclasses="true" 0N/A <!-- Set the default value of the sourcepath used for javac. --> 0N/A <!-- Set the default value of the classpath used for javac. --> 0N/A <!-- Set the default bootclasspath option used for javac. 370N/A Note that different variants of the option are used, meaning we can't just 370N/A define the value for the option. 0N/A This is because Ant is not clever enough to handle direct use of : or ; --> 0N/A <!-- for debugging --> 0N/A <
target name="vizant" depends="-def-vizant">
0N/A <
exec executable="${dot}" >
370N/A <!-- Standard target to build deliverables for JDK build. --> 369N/A <
target name="build" depends="build-bootstrap-tools,build-all-classes">
440N/A <
target name="build-bootstrap-tools" 449N/A depends="build-bootstrap-javac,build-bootstrap-javadoc,build-bootstrap-doclets,build-bootstrap-javah" 440N/A <
target name="build-all-tools" 440N/A depends="build-javac,build-javadoc,build-doclets,build-javah,build-javap,build-apt" 440N/A <
target name="build-all-classes" depends="build-bootstrap-javac,-create-import-jdk-stubs">
578N/A <
target name="clean" description="Delete all generated files">
440N/A <!-- Additional targets for running tools on the build --> 578N/A <
target name="jtreg" depends="build-all-tools,-def-jtreg">
578N/A <
target name="findbugs" depends="-def-findbugs,build-all-tools">
578N/A <
arg value="-longBugCodes"/>
578N/A <
target name="coverage" depends="-def-cobertura,build-all-classes,instrument-classes,jtreg,coverage-report"/>
578N/A <
target name="instrument-classes" depends="-def-cobertura">
578N/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 <
target name="build-bootstrap-javac" 0N/A depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool">
0N/A <
build-
bootstrap-
tool name="javac"/>
0N/A <
target name="build-classes-javac" depends="build-bootstrap-javac,-create-import-jdk-stubs">
370N/A <
target name="build-javac" depends="build-classes-javac">
0N/A <
build-
tool name="javac"/>
0N/A <
target name="javadoc-javac" depends="build-javac,-def-javadoc-tool">
0N/A <
target name="jtreg-javac" depends="build-javac,build-javap,-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,build-classes-javadoc">
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">
370N/A <
target name="findbugs-javadoc" depends="build-javadoc,-def-findbugs">
0N/A <
findbugs-
tool name="javadoc"/>
370N/A <
target name="javadoc" depends="build-javadoc,jtreg-javadoc,findbugs-javadoc"/>
0N/A <!-- doclets targets --> 370N/A <
target name="build-bootstrap-doclets" depends="build-bootstrap-javadoc,-def-build-bootstrap-jar">
578N/A <
target name="build-classes-doclets" depends="build-classes-javadoc">
578N/A <
target name="build-doclets" depends="build-javadoc,build-classes-doclets">
578N/A <!-- just jar, no bin for doclets --> 578N/A <!-- (no javadoc for doclets) --> 578N/A <
target name="jtreg-doclets" depends="build-doclets,-def-jtreg">
578N/A <
target name="findbugs-doclets" depends="build-doclets,-def-findbugs">
578N/A <
findbugs-
tool name="doclets"/>
578N/A <
target name="doclets" depends="build-doclets,jtreg-doclets,findbugs-doclets"/>
578N/A <
target name="build-bootstrap-javah" depends="build-bootstrap-javadoc">
578N/A <
build-
bootstrap-
tool name="javah"/>
578N/A <
target name="build-javah" depends="build-javac,build-classes-javah">
578N/A <
build-
tool name="javah"/>
578N/A <
target name="build-classes-javah" depends="build-classes-javadoc">
578N/A <!-- (no javadoc for javah) --> 578N/A <
target name="jtreg-javah" depends="build-javah,-def-jtreg">
578N/A <
target name="findbugs-javah" depends="build-javah,-def-findbugs">
578N/A <
findbugs-
tool name="javah"/>
578N/A <
target name="javah" depends="build-javah,jtreg-javah,findbugs-javah"/>
578N/A <
target name="build-bootstrap-javap" 578N/A depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool">
435N/A <
build-
bootstrap-
tool name="javap"/>
0N/A <
target name="build-classes-javap" depends="build-classes-javac">
0N/A <
target name="build-javap" depends="build-javac,build-classes-javap">
435N/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">
370N/A <
findbugs-
tool name="javap"/>
0N/A <
target name="javap" depends="build-javap,jtreg-javap,findbugs-javap"/>
0N/A <!-- apt targets --> 578N/A <
target name="build-bootstrap-apt" depends="build-bootstrap-javac">
0N/A <
build-
bootstrap-
tool name="apt"/>
435N/A <
target name="build-apt" depends="build-javac,build-classes-apt">
435N/A <
build-
tool name="apt"/>
0N/A <
target name="build-classes-apt" depends="build-classes-javac">
435N/A <
target name="javadoc-apt" depends="build-apt,-def-javadoc-tool">
370N/A <
target name="jtreg-apt" depends="build-apt,-def-jtreg">
370N/A <
target name="findbugs-apt" depends="build-apt,-def-findbugs">
0N/A <
findbugs-
tool name="apt"/>
370N/A <
target name="apt" depends="build-apt,jtreg-apt,findbugs-apt"/>
0N/A <!-- Create import JDK stubs --> 0N/A <
target name="-check-vizant" depends="-def-check">
370N/A <
check name="dot" property="dot"/>
578N/A <!-- Ant macro and preset defs --> 578N/A <
target name="-def-build-tool">
578N/A <
macrodef name="build-tool">
0N/A <
attribute name="name"/>
0N/A <
filterset begintoken="#" endtoken="#">
370N/A <
filter token="PROGRAM" value="@{name}"/>
435N/A <
filter token="TARGET_JAVA" value="@{java}"/>
370N/A <
target name="-def-build-jar">
0N/A <
macrodef name="build-jar">
0N/A <
attribute name="name"/>
0N/A <
attribute name="includes"/>
0N/A <
attribute name="jarclasspath" default=""/>
370N/A includes="@{includes}">
578N/A <
attribute name="Main-Class" value="@{jarmainclass}"/>
578N/A <
attribute name="Class-Path" value="@{jarclasspath}"/>
435N/A <
target name="-def-build-classes" depends="-def-pcompile">
435N/A <
macrodef name="build-classes">
0N/A <
attribute name="includes"/>
0N/A <
attribute name="release" default="${release}"/>
0N/A <
echo level="verbose" message="build-classes: excludes=@{excludes}"/>
370N/A <
echo level="verbose" message="build-classes: classpath=@{classpath}"/>
0N/A <
echo level="verbose" message="build-classes: sourcepath=@{sourcepath}"/>
370N/A includes="@{includes}"/>
578N/A <
globmapper from="*.properties-template" to="*.properties"/>
578N/A <
filterset begintoken="$(" endtoken=")">
578N/A <
filter token="RELEASE" value="@{release}"/>
435N/A includes="**/*.properties"/>
0N/A excludes="@{excludes}" 370N/A sourcepath="@{sourcepath}" 0N/A classpath="@{classpath}" 0N/A <
compilerarg value="-implicit:none"/>
370N/A <
compilerarg value="-Xprefer:source"/>
370N/A <
exclude name="**/*.java"/>
0N/A <
exclude name="**/*.properties"/>
0N/A <
exclude name="**/*-template"/>
440N/A <
presetdef name="build-bootstrap-tool">
578N/A <
target name="-def-build-bootstrap-jar" depends="-def-build-jar">
578N/A <
presetdef name="build-bootstrap-jar">
0N/A <
target name="-def-build-bootstrap-classes" depends="-def-build-classes">
370N/A <
presetdef name="build-bootstrap-classes">
0N/A <
target name="-def-pcompile">
578N/A <
taskdef name="pcompile" 578N/A classname="CompilePropertiesTask" 0N/A <
target name="-def-genstubs" depends="build-bootstrap-javac">
0N/A <
taskdef name="genstubs" 0N/A classname="GenStubs$$Ant" 0N/A <
macrodef name="javadoc-tool">
435N/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 370N/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}"/>
440N/A <!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> --> 440N/A <!-- (It correctly skips excluded single classes, but not if packageset is also included, --> 440N/A <!-- which also causes duplicates in the class index for included files.) --> 435N/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="true"/>
0N/A <
attribute name="verbose" default="summary"/>
0N/A <
attribute name="options" default=""/>
435N/A <
attribute name="keywords" default="-keywords:!ignore"/>
370N/A samevm="@{samevm}" verbose="@{verbose}" 0N/A failonerror="false" resultproperty="jtreg.@{name}.result" 440N/A <
arg line="@{keywords}"/>
440N/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. --> 449N/A <
equals arg1="${jtreg.@{name}.result}" arg2="0"/>
0N/A <
include name="lib/**/*.jar"/>
435N/A <
macrodef name="findbugs-tool">
435N/A <
attribute name="name"/>
435N/A <
attribute name="output" default="emacs"/>
435N/A <
attribute name="outputFile" default=""/>
435N/A <
attribute name="reportLevel" default="high"/>
0N/A outputFile="@{outputFile}" 440N/A reportLevel="@{reportLevel}" 440N/A errorProperty="findbugs.@{name}.errors" 0N/A warningsProperty="findbugs.@{name}.warnings" 578N/A <
target name="-def-check">
440N/A <
macrodef name="check">
440N/A <
attribute name="name"/>
440N/A <
attribute name="property"/>
440N/A <
attribute name="marker" default=""/>
440N/A <
fail message="Cannot locate @{name}: please set @{property} to its location">
440N/A <
isset property="@{property}"/>
440N/A <
fail message="@{name} is not installed in ${@{property}}">
0N/A <
equals arg1="@{marker}" arg2=""/>
0N/A <
available file="${@{property}}/@{marker}"/>
370N/A <!-- standard JDK target --> 0N/A description="display settings of configuration 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">