2007-12-01 00:00:00 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
2015-10-19 17:15:16 +00:00
|
|
|
Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
|
2007-12-01 00:00:00 +00:00
|
|
|
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
|
|
|
|
This code is free software; you can redistribute it and/or modify it
|
|
|
|
under the terms of the GNU General Public License version 2 only, as
|
2010-05-25 22:54:51 +00:00
|
|
|
published by the Free Software Foundation. Oracle designates this
|
2007-12-01 00:00:00 +00:00
|
|
|
particular file as subject to the "Classpath" exception as provided
|
2010-05-25 22:54:51 +00:00
|
|
|
by Oracle in the LICENSE file that accompanied this code.
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
accompanied this code).
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License version
|
|
|
|
2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
|
2010-05-25 22:54:51 +00:00
|
|
|
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
or visit www.oracle.com if you need additional information or have any
|
|
|
|
questions.
|
2007-12-01 00:00:00 +00:00
|
|
|
-->
|
|
|
|
|
|
|
|
<!--
|
2014-11-07 17:22:36 +00:00
|
|
|
This is a convenience build file supporting development in the langtools
|
|
|
|
repository. It can be run either standalone, or from IDEs. This build script
|
|
|
|
is for a developer use only, it is not used to build the production version
|
|
|
|
of javac or other langtools tools.
|
2010-06-05 00:33:25 +00:00
|
|
|
|
|
|
|
External dependencies are specified via properties. These can be given
|
|
|
|
on the command line, or by providing a local build.properties file.
|
|
|
|
(They can also be edited into make/build.properties, although that is not
|
|
|
|
recommended.) At a minimum, boot.java.home must be set to the installed
|
|
|
|
location of the version of JDK used to build this repository. Additional
|
|
|
|
properties may be required, depending on the targets that are built.
|
|
|
|
For example, to run any of the jtreg tests you must set jtreg.home,
|
|
|
|
to run findbugs on the code you must set findbugs.home, and so on.
|
|
|
|
|
|
|
|
The main build happens in two phases:
|
2014-11-07 17:22:36 +00:00
|
|
|
- First, javac is built using ${boot.java.home}. (This implies a constraint
|
|
|
|
on the source code that they can be compiled with the previous version of JDK.
|
2010-06-05 00:33:25 +00:00
|
|
|
- Second, all required classes are compiled with the latest javac, created
|
|
|
|
in the previous step.
|
2014-11-07 17:22:36 +00:00
|
|
|
The build generally builds one module at time.
|
2010-06-05 00:33:25 +00:00
|
|
|
|
|
|
|
For more details on the stub generator, see
|
|
|
|
http://blogs.sun.com/jjg/entry/building_javac_for_jdk7
|
|
|
|
|
|
|
|
Internal details ...
|
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
Bootstrap classes are built into the build/bootstrap/<module-name>/classes directory.
|
|
|
|
Final classes are built into the build/<module-name>/classes directory.
|
|
|
|
Final runnable javac is in dist/bin and dist/lib. Bootstrap javac (if requested by
|
|
|
|
using the build-bootstrap-javac target) is built into dist/bootstrap.
|
2010-06-05 00:33:25 +00:00
|
|
|
|
|
|
|
This file is organized into sections as follows:
|
|
|
|
- global property definitions
|
2014-11-07 17:22:36 +00:00
|
|
|
- primary top level targets (cleaning, building, testing, producing javac)
|
|
|
|
- secondary top level targets (code analysis, diagnostics, extra documentation, etc.)
|
2010-06-05 00:33:25 +00:00
|
|
|
- utility definitions
|
2007-12-01 00:00:00 +00:00
|
|
|
-->
|
|
|
|
|
|
|
|
<project name="langtools" default="build" basedir="..">
|
2010-06-05 00:33:25 +00:00
|
|
|
<!--
|
|
|
|
**** Global property definitions.
|
|
|
|
-->
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
<!-- The following locations can be used to override default property values. -->
|
|
|
|
|
|
|
|
<!-- Use this location for customizations specific to this instance of this workspace -->
|
|
|
|
<property file="build.properties"/>
|
|
|
|
|
|
|
|
<!-- Use this location for customizations common to all OpenJDK langtools workspaces -->
|
|
|
|
<property file="${user.home}/.openjdk/${ant.project.name}-build.properties"/>
|
|
|
|
|
|
|
|
<!-- Use this location for customizations common to all OpenJDK workspaces -->
|
|
|
|
<property file="${user.home}/.openjdk/build.properties"/>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
|
|
|
<!-- Convenient shorthands for standard locations within the workspace. -->
|
2007-12-01 00:00:00 +00:00
|
|
|
<property name="build.dir" location="build"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
<property name="build.crules.dir" location="${build.dir}/crules"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<property name="build.jtreg.dir" location="${build.dir}/jtreg"/>
|
|
|
|
<property name="build.toolclasses.dir" location="${build.dir}/toolclasses"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
<property name="build.javadoc.dir" location="${build.dir}/javadoc"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<property name="dist.dir" location="dist"/>
|
|
|
|
<property name="dist.bin.dir" location="${dist.dir}/bin"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
<property name="dist.lib.dir" location="${dist.dir}/lib"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<property name="dist.findbugs.dir" location="${dist.dir}/findbugs"/>
|
2011-11-14 16:09:47 +00:00
|
|
|
<property name="dist.checkstyle.dir" location="${dist.dir}/checkstyle"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<property name="make.dir" location="make"/>
|
2011-11-14 16:09:47 +00:00
|
|
|
<property name="make.conf.dir" location="${make.dir}/conf"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<property name="make.tools.dir" location="${make.dir}/tools"/>
|
|
|
|
<property name="test.dir" location="test"/>
|
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<property name="boot.build.dir" location="${build.dir}/bootstrap"/>
|
|
|
|
<property name="boot.dist.dir" location="${dist.dir}/bootstrap"/>
|
|
|
|
<property name="boot.dist.bin.dir" location="${boot.dist.dir}/bin"/>
|
|
|
|
<property name="boot.dist.lib.dir" location="${boot.dist.dir}/lib"/>
|
2014-08-17 14:52:32 +00:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
<!-- java.marker is set to a marker file to check for within a Java install dir.
|
|
|
|
The best file to check for across Solaris/Linux/Windows/MacOS is one of the
|
|
|
|
executables; regrettably, that is OS-specific. -->
|
|
|
|
<condition property="java.marker" value="bin/java">
|
2009-08-12 14:54:30 +00:00
|
|
|
<os family="unix"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
</condition>
|
|
|
|
<condition property="java.marker" value="bin/java.exe">
|
2009-08-12 14:54:30 +00:00
|
|
|
<os family="windows"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
</condition>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
<!-- Standard property values, if not overriden by earlier settings. -->
|
2009-08-12 14:54:30 +00:00
|
|
|
<property file="${make.dir}/build.properties"/>
|
2009-08-12 14:14:02 +00:00
|
|
|
|
|
|
|
<!-- launcher.java is used in the launcher scripts provided to run
|
2009-08-12 14:54:30 +00:00
|
|
|
the tools' jar files. If it has not already been set, then
|
|
|
|
default it to use ${target.java.home}, if available, otherwise
|
|
|
|
quietly default to simply use "java". -->
|
|
|
|
<condition property="launcher.java"
|
|
|
|
value="${target.java.home}/bin/java" else="java">
|
|
|
|
<isset property="target.java.home"/>
|
2009-08-12 14:14:02 +00:00
|
|
|
</condition>
|
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<!-- setup basic properties holding paths to all sources, generated source and class directories
|
|
|
|
(both boot and non-boot) -->
|
|
|
|
<pathconvert property="langtools.sources">
|
|
|
|
<path>
|
|
|
|
<pathelement path="${langtools.modules}" />
|
|
|
|
</path>
|
|
|
|
<map from="${basedir}/" to="${basedir}/src/" />
|
|
|
|
<mapper type="glob" from="*" to="*/share/classes"/>
|
|
|
|
</pathconvert>
|
|
|
|
<pathconvert property="langtools.gensrc">
|
|
|
|
<path>
|
|
|
|
<pathelement path="${langtools.modules}" />
|
|
|
|
</path>
|
|
|
|
<map from="${basedir}/" to="${build.dir}/" />
|
|
|
|
<mapper type="glob" from="*" to="*/gensrc"/>
|
|
|
|
</pathconvert>
|
|
|
|
<pathconvert property="langtools.boot.classes">
|
|
|
|
<path>
|
|
|
|
<pathelement path="${langtools.modules}" />
|
|
|
|
</path>
|
|
|
|
<map from="${basedir}/" to="${boot.build.dir}/" />
|
|
|
|
<mapper type="glob" from="*" to="*/classes"/>
|
|
|
|
</pathconvert>
|
|
|
|
<pathconvert property="langtools.classes">
|
|
|
|
<path>
|
|
|
|
<pathelement path="${langtools.modules}" />
|
|
|
|
</path>
|
|
|
|
<map from="${basedir}/" to="${build.dir}/" />
|
|
|
|
<mapper type="glob" from="*" to="*/classes"/>
|
|
|
|
</pathconvert>
|
2010-06-05 00:33:25 +00:00
|
|
|
|
|
|
|
<!--
|
2014-11-07 17:22:36 +00:00
|
|
|
**** Primary targets
|
2010-06-05 00:33:25 +00:00
|
|
|
-->
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="clean" description="Delete all generated files">
|
|
|
|
<delete dir="${build.dir}"/>
|
|
|
|
<delete dir="${dist.dir}"/>
|
|
|
|
</target>
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="build" depends="build-all-tools">
|
2007-12-01 00:00:00 +00:00
|
|
|
</target>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="build-all-tools" depends="build-all-classes,-def-build-all-module-jars,-def-build-tool">
|
|
|
|
<build-all-module-jars />
|
|
|
|
<build-tool name="javac"/>
|
|
|
|
<build-tool name="javadoc"/>
|
|
|
|
<build-tool name="javap"/>
|
|
|
|
<build-tool name="javah"/>
|
|
|
|
<build-tool name="sjavac"/>
|
2015-10-19 17:15:16 +00:00
|
|
|
<build-tool name="jshell"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
</target>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="build-all-classes" depends="-def-build-all-module-classes,build-bootstrap-javac-classes">
|
|
|
|
<build-all-module-classes />
|
|
|
|
</target>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="jtreg" depends="build-all-tools,-def-jtreg">
|
|
|
|
<jtreg-tool name="all" tests="${jtreg.tests}"/>
|
2009-11-18 00:45:19 +00:00
|
|
|
</target>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="javadoc" depends="build-all-classes,-def-javadoc-tool">
|
|
|
|
<javadoc-tool options="${javadoc.jls.option}"/>
|
|
|
|
</target>
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="build-bootstrap-javac-classes" depends="-check-boot.java.home,-def-build-all-module-classes">
|
|
|
|
<build-all-module-classes compilation.kind="boot." />
|
2007-12-01 00:00:00 +00:00
|
|
|
</target>
|
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<!--
|
|
|
|
**** Extra targets
|
|
|
|
-->
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="build-bootstrap-javac" depends="build-bootstrap-javac-classes,-def-build-all-module-jars,-def-build-tool">
|
|
|
|
<build-all-module-jars compilation.kind="boot." />
|
|
|
|
<build-tool name="javac" compilation.kind="boot." />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="jtreg-bootstrap-javac" depends="build-bootstrap-javac,-def-jtreg">
|
|
|
|
<jtreg-tool name="bootstrap-javac"
|
|
|
|
tests="${boot.javac.tests}"
|
|
|
|
langtools.classes="${langtools.boot.classes}"/>
|
2009-08-12 14:54:30 +00:00
|
|
|
</target>
|
|
|
|
|
2011-11-14 16:09:47 +00:00
|
|
|
<target name="checkstyle" depends="-def-checkstyle"
|
|
|
|
description="Generates reports for code convention violations.">
|
|
|
|
<mkdir dir="${dist.checkstyle.dir}"/>
|
|
|
|
<checkstyle config="${make.conf.dir}/checkstyle-langtools.xml"
|
|
|
|
failureProperty="checkstyle.failure"
|
|
|
|
failOnViolation="false">
|
|
|
|
<formatter type="xml" tofile="${dist.checkstyle.dir}/checkstyle_report.xml"/>
|
|
|
|
<fileset dir="src" includes="**/*.java, **/*.properties"/>
|
|
|
|
</checkstyle>
|
|
|
|
<!-- transform the output to a simple html -->
|
|
|
|
<xslt in="${dist.checkstyle.dir}/checkstyle_report.xml"
|
|
|
|
out="${dist.checkstyle.dir}/checkstyle_report.html"
|
2012-11-15 01:23:10 +00:00
|
|
|
style="${checkstyle.home}/contrib/checkstyle-simple.xsl"/>
|
2011-11-14 16:09:47 +00:00
|
|
|
<!-- transform the output to a very simple emacs friendly text file -->
|
|
|
|
<xslt in="${dist.checkstyle.dir}/checkstyle_report.xml"
|
|
|
|
out="${dist.checkstyle.dir}/checkstyle_report.tmp"
|
|
|
|
style="${make.conf.dir}/checkstyle-emacs.xsl"/>
|
|
|
|
<!-- beautify remove extra lines -->
|
|
|
|
<move file="${dist.checkstyle.dir}/checkstyle_report.tmp"
|
|
|
|
toFile="${dist.checkstyle.dir}/checkstyle_report.emacs.txt">
|
|
|
|
<filterchain>
|
|
|
|
<ignoreblank/>
|
|
|
|
<replaceregex byline="true" pattern="^File:" replace="${line.separator}File:"/>
|
|
|
|
</filterchain>
|
|
|
|
</move>
|
|
|
|
</target>
|
|
|
|
<!-- target can be invoked from an ide, the output of which can be used
|
|
|
|
to access and fix the errors directly.
|
|
|
|
-->
|
|
|
|
<target name="checkstyle-ide" depends="checkstyle">
|
|
|
|
<concat>
|
|
|
|
<fileset file="${dist.checkstyle.dir}/checkstyle_report.emacs.txt"/>
|
2012-11-15 01:23:10 +00:00
|
|
|
</concat>
|
2011-11-14 16:09:47 +00:00
|
|
|
</target>
|
2012-11-15 01:23:10 +00:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
<target name="findbugs" depends="-def-findbugs,build-all-tools">
|
|
|
|
<property name="findbugs.reportLevel" value="medium"/>
|
|
|
|
<mkdir dir="${dist.findbugs.dir}"/>
|
|
|
|
<findbugs
|
|
|
|
home="${findbugs.home}"
|
|
|
|
projectName="JDK langtools ${full.version}"
|
|
|
|
output="xml"
|
|
|
|
outputFile="${dist.findbugs.dir}/findbugs.xml"
|
|
|
|
reportLevel="${findbugs.reportLevel}"
|
|
|
|
failOnError="false"
|
|
|
|
errorProperty="findbugs.all.errors"
|
|
|
|
warningsProperty="findbugs.all.warnings"
|
2010-09-13 18:40:58 +00:00
|
|
|
jvm="${target.java.home}/bin/java"
|
2007-12-01 00:00:00 +00:00
|
|
|
jvmargs="-Xmx512M">
|
2014-11-07 17:22:36 +00:00
|
|
|
<class location="${build.dir}/java.compiler/classes"/>
|
|
|
|
<class location="${build.dir}/jdk.compiler/classes"/>
|
|
|
|
<class location="${build.dir}/jdk.javadoc/classes"/>
|
2015-05-27 20:25:18 +00:00
|
|
|
<class location="${build.dir}/jdk.jdeps/classes"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<sourcePath>
|
2014-11-07 17:22:36 +00:00
|
|
|
<pathelement path="${langtools.sources}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
</sourcePath>
|
|
|
|
</findbugs>
|
|
|
|
<exec executable="sh">
|
|
|
|
<arg value="${findbugs.home}/bin/convertXmlToText"/>
|
|
|
|
<arg value="-longBugCodes"/>
|
|
|
|
<arg value="-html:${findbugs.home}/src/xsl/fancy.xsl"/>
|
|
|
|
<arg value="${dist.findbugs.dir}/findbugs.xml"/>
|
|
|
|
<redirector output="${dist.findbugs.dir}/findbugs.html"/>
|
2008-06-03 20:26:47 +00:00
|
|
|
</exec>
|
2007-12-01 00:00:00 +00:00
|
|
|
</target>
|
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="diags-examples" depends="build-all-tools">
|
2010-07-22 18:02:54 +00:00
|
|
|
<!-- can override the following on the command line if desired. -->
|
|
|
|
<property name="diags.examples.out" location="${build.dir}/diag-examples/diags-examples.html"/>
|
|
|
|
<mkdir dir="${build.dir}/diag-examples/classes"/>
|
|
|
|
<javac fork="true"
|
|
|
|
executable="${dist.bin.dir}/javac"
|
|
|
|
srcdir="test/tools/javac/diags"
|
|
|
|
destdir="${build.dir}/diag-examples/classes"
|
2012-11-15 01:23:10 +00:00
|
|
|
includes="ArgTypeCompilerFactory.java,Example.java,FileManager.java,HTMLWriter.java,RunExamples.java,DocCommentProcessor.java"
|
2010-07-22 18:02:54 +00:00
|
|
|
sourcepath=""
|
2014-11-07 17:22:36 +00:00
|
|
|
classpath="${langtools.classes}"
|
2010-07-22 18:02:54 +00:00
|
|
|
includeAntRuntime="no"
|
|
|
|
debug="${javac.debug}"
|
2011-06-23 18:49:27 +00:00
|
|
|
debuglevel="${javac.debuglevel}">
|
|
|
|
<compilerarg line="${javac.lint.opts}"/>
|
|
|
|
</javac>
|
2010-07-22 18:02:54 +00:00
|
|
|
<java fork="true"
|
|
|
|
jvm="${target.java.home}/bin/java"
|
|
|
|
dir="test/tools/javac/diags"
|
2014-11-07 17:22:36 +00:00
|
|
|
classpath="${build.dir}/diag-examples/classes;${langtools.classes}"
|
2010-07-22 18:02:54 +00:00
|
|
|
classname="RunExamples">
|
2012-11-15 01:23:10 +00:00
|
|
|
<jvmarg value="-Dtest.classes=${build.dir}/diag-examples/classes"/>
|
2010-07-22 18:02:54 +00:00
|
|
|
<arg value="-examples"/>
|
|
|
|
<arg value="examples"/>
|
|
|
|
<arg value="-o"/>
|
|
|
|
<arg file="${diags.examples.out}"/>
|
|
|
|
<arg value="-showFiles"/>
|
|
|
|
<arg value="-title"/>
|
|
|
|
<arg value="Examples of javac diagnostics"/>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
2013-03-19 22:13:44 +00:00
|
|
|
<target name="doclint-api" depends="build-all-classes">
|
|
|
|
<delete dir="${build.dir}/doclint/classes"/>
|
|
|
|
<mkdir dir="${build.dir}/doclint/classes"/>
|
|
|
|
<javac fork="true"
|
2014-11-07 17:22:36 +00:00
|
|
|
executable="${boot.java.home}/bin/javac"
|
2013-03-19 22:13:44 +00:00
|
|
|
destdir="${build.dir}/doclint/classes"
|
|
|
|
includes="javax/lang/model/** com/sun/javadoc/** com/sun/source/**"
|
|
|
|
excludes=""
|
2014-11-07 17:22:36 +00:00
|
|
|
sourcepath=""
|
|
|
|
classpath="${langtools.classes}"
|
2013-03-19 22:13:44 +00:00
|
|
|
includeAntRuntime="no"
|
|
|
|
source="${javac.source}"
|
|
|
|
target="${javac.target}"
|
|
|
|
debug="${javac.debug}"
|
|
|
|
debuglevel="${javac.debuglevel}">
|
|
|
|
<compilerarg value="-implicit:none"/>
|
|
|
|
<compilerarg value="-Xprefer:source"/>
|
|
|
|
<compilerarg value="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
<compilerarg line="${javac.extra.opts}"/>
|
2013-03-19 22:13:44 +00:00
|
|
|
<compilerarg line="-Xdoclint:all/protected,-missing"/>
|
2014-08-17 14:52:32 +00:00
|
|
|
<src>
|
2014-11-07 17:22:36 +00:00
|
|
|
<pathelement path="${langtools.sources}"/>
|
|
|
|
<pathelement path="${langtools.gensrc}"/>
|
2014-08-17 14:52:32 +00:00
|
|
|
</src>
|
2013-03-19 22:13:44 +00:00
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
2014-07-16 01:17:31 +00:00
|
|
|
<!-- Generate API docs for "important" test classes that are used by
|
|
|
|
multiple tests.
|
|
|
|
-->
|
|
|
|
<target name="test-framework-docs" depends="build-all-classes">
|
|
|
|
<javadoc executable="${target.java.home}/bin/javadoc"
|
|
|
|
destdir="${build.dir}/testframeworkdocs">
|
|
|
|
<!-- disable doclint for now; it might be good to enable -Xdoclint:missing -->
|
|
|
|
<arg value="-Xdoclint:none"/>
|
|
|
|
<!-- source files to be documented -->
|
|
|
|
<sourcefiles>
|
|
|
|
<fileset dir="${test.dir}">
|
|
|
|
<include name="**/ToolBox.java"/>
|
|
|
|
<include name="**/*Tester.java"/>
|
|
|
|
<include name="**/*TestBase.java"/>
|
|
|
|
<include name="**/*Testing*.java"/>
|
|
|
|
</fileset>
|
|
|
|
</sourcefiles>
|
|
|
|
<!-- source path used for documentation -->
|
|
|
|
<sourcepath>
|
|
|
|
<pathelement path="${test.dir}/lib"/>
|
|
|
|
<pathelement path="${test.dir}/lib/combo"/>
|
|
|
|
<pathelement path="${test.dir}/tools/javac/lib"/>
|
|
|
|
<pathelement path="${test.dir}/tools/javac/classfiles/attributes/LocalVariableTable"/>
|
|
|
|
</sourcepath>
|
|
|
|
<!-- exclude the following "packages" found by <javadoc>
|
|
|
|
on the sourcepath -->
|
|
|
|
<excludepackage name="combo.tools.javac.combo"/>
|
|
|
|
<excludepackage name="tools.javac.combo"/>
|
|
|
|
<!-- library classes used for documentation -->
|
|
|
|
<classpath>
|
|
|
|
<pathelement path="${jtreg.home}/lib/testng.jar"/>
|
|
|
|
</classpath>
|
|
|
|
<!-- platform classes used for documentation -->
|
|
|
|
<bootclasspath>
|
2014-11-07 17:22:36 +00:00
|
|
|
<pathelement path="${langtools.classes}"/>
|
2014-07-16 01:17:31 +00:00
|
|
|
<pathelement path="${target.java.home}/jre/lib/rt.jar"/>
|
|
|
|
</bootclasspath>
|
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
2010-06-05 00:33:25 +00:00
|
|
|
<target name="sanity"
|
|
|
|
description="display settings of configuration values">
|
|
|
|
<echo level="info">ant.home = ${ant.home}</echo>
|
|
|
|
<echo level="info">boot.java.home = ${boot.java.home}</echo>
|
|
|
|
<echo level="info">target.java.home = ${target.java.home}</echo>
|
|
|
|
<echo level="info">jtreg.home = ${jtreg.home}</echo>
|
|
|
|
<echo level="info">findbugs.home = ${findbugs.home}</echo>
|
2011-11-14 16:09:47 +00:00
|
|
|
<echo level="info">checkstyle.home = ${checkstyle.home}</echo>
|
2010-06-05 00:33:25 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="diagnostics">
|
|
|
|
<diagnostics/>
|
|
|
|
</target>
|
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="jtreg-crules" depends="build-all-classes,-def-jtreg">
|
|
|
|
<mkdir dir="${build.crules.dir}/classes"/>
|
|
|
|
<javac fork="true"
|
|
|
|
source="${boot.javac.source}"
|
|
|
|
target="${boot.javac.target}"
|
|
|
|
executable="${boot.java.home}/bin/javac"
|
|
|
|
srcdir="${make.tools.dir}"
|
|
|
|
includes="crules/*"
|
|
|
|
destdir="${build.crules.dir}/classes"
|
|
|
|
includeantruntime="false">
|
|
|
|
<compilerarg value="-Xbootclasspath/p:${langtools.classes}"/>
|
|
|
|
<compilerarg line="${javac.lint.opts}"/>
|
|
|
|
</javac>
|
|
|
|
<copy todir="${build.crules.dir}/classes" includeemptydirs="false">
|
|
|
|
<fileset dir="${make.tools.dir}">
|
|
|
|
<include name="**/*.properties"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
<echo file="${build.crules.dir}/classes/META-INF/services/com.sun.source.util.Plugin">crules.CodingRulesAnalyzerPlugin</echo>
|
2014-08-01 18:09:40 +00:00
|
|
|
<jtreg-tool name="crules"
|
|
|
|
tests="${crules.tests}"
|
2014-11-07 17:22:36 +00:00
|
|
|
extra.jvmargs="-Xbootclasspath/a:${build.crules.dir}/classes" />
|
2009-11-20 19:18:43 +00:00
|
|
|
</target>
|
|
|
|
|
2014-06-24 15:04:46 +00:00
|
|
|
<!--
|
|
|
|
**** IDE support
|
|
|
|
-->
|
|
|
|
|
|
|
|
<target name="idea">
|
|
|
|
<mkdir dir=".idea"/>
|
|
|
|
<copy todir=".idea" >
|
2014-07-22 16:47:45 +00:00
|
|
|
<fileset dir="make/intellij" excludes="**/src/**"/>
|
2014-06-24 15:04:46 +00:00
|
|
|
</copy>
|
2014-07-22 16:47:45 +00:00
|
|
|
<condition property="jtreg.idea.home" value="${jtreg.home}" else = "[jtreg.home]">
|
|
|
|
<isset property="jtreg.home"/>
|
|
|
|
</condition>
|
|
|
|
<replace file=".idea/ant.xml" token="@@@" value="${jtreg.idea.home}"/>
|
2014-12-08 16:30:43 +00:00
|
|
|
<replace file=".idea/workspace.xml" token="@FILE_SEP@" value="${file.separator}"/>
|
|
|
|
<replace file=".idea/workspace.xml" token="@PATH_SEP@" value="${path.separator}"/>
|
2014-07-22 16:47:45 +00:00
|
|
|
<mkdir dir=".idea/classes"/>
|
|
|
|
<javac srcdir="make/intellij/src"
|
|
|
|
destdir=".idea/classes"/>
|
2014-06-24 15:04:46 +00:00
|
|
|
</target>
|
2010-06-05 00:33:25 +00:00
|
|
|
|
|
|
|
<!--
|
|
|
|
**** Check targets.
|
|
|
|
**** "-check-*" targets check that a required property is set, and set to a reasonable value.
|
|
|
|
**** A user friendly message is generated if not, and the build exits.
|
|
|
|
-->
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
<target name="-check-boot.java.home" depends="-def-check">
|
|
|
|
<check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/>
|
|
|
|
</target>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
<target name="-check-target.java.home" depends="-def-check">
|
|
|
|
<check name="target java" property="target.java.home" marker="${java.marker}"/>
|
|
|
|
</target>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="-check-jtreg.home" depends="-def-check">
|
|
|
|
<check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
</target>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
<target name="-check-findbugs.home" depends="-def-check">
|
|
|
|
<check name="findbugs" property="findbugs.home" marker="lib/findbugs.jar"/>
|
|
|
|
</target>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2011-11-14 16:09:47 +00:00
|
|
|
<target name="-check-checkstyle.home" depends="-def-check">
|
2014-11-07 17:22:36 +00:00
|
|
|
<check name="checkstyle" property="checkstyle.home" marker=""/> <!--TODO: better checkstyle verification-->
|
2011-11-14 16:09:47 +00:00
|
|
|
</target>
|
2012-11-15 01:23:10 +00:00
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<!-- Definitions -->
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="-def-build-all-module-jars" depends="-def-build-module-jar">
|
|
|
|
<macrodef name="build-all-module-jars">
|
|
|
|
<attribute name="compilation.kind" default=""/>
|
|
|
|
<sequential>
|
|
|
|
<build-module-jar module.name="java.compiler" compilation.kind="@{compilation.kind}" />
|
|
|
|
<build-module-jar module.name="jdk.compiler" compilation.kind="@{compilation.kind}" />
|
|
|
|
<build-module-jar module.name="jdk.javadoc" compilation.kind="@{compilation.kind}" />
|
2015-05-27 20:25:18 +00:00
|
|
|
<build-module-jar module.name="jdk.jdeps" compilation.kind="@{compilation.kind}" />
|
2015-10-19 17:15:16 +00:00
|
|
|
<build-module-jar module.name="jdk.internal.le" compilation.kind="@{compilation.kind}" />
|
|
|
|
<build-module-jar module.name="jdk.jdi" compilation.kind="@{compilation.kind}" />
|
|
|
|
<build-module-jar module.name="jdk.jshell" compilation.kind="@{compilation.kind}" />
|
2014-11-07 17:22:36 +00:00
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2010-06-04 21:54:54 +00:00
|
|
|
</target>
|
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="-def-build-module-jar">
|
|
|
|
<macrodef name="build-module-jar">
|
|
|
|
<attribute name="module.name"/>
|
|
|
|
<attribute name="compilation.kind"/>
|
|
|
|
<attribute name="dependencies" default="${@{compilation.kind}@{module.name}.dependencies}"/>
|
|
|
|
<attribute name="build.dir" default="${@{compilation.kind}build.dir}"/>
|
|
|
|
<attribute name="lib.dir" default="${@{compilation.kind}dist.lib.dir}"/>
|
|
|
|
<attribute name="classes.dir" default="@{build.dir}/@{module.name}/classes"/>
|
|
|
|
<sequential>
|
|
|
|
<mkdir dir="@{lib.dir}"/>
|
|
|
|
<local name="jarclasspath" />
|
|
|
|
<pathconvert property="jarclasspath">
|
|
|
|
<path>
|
|
|
|
<pathelement path="@{dependencies}" />
|
|
|
|
</path>
|
|
|
|
<map from="${basedir}/" to="" />
|
|
|
|
<mapper type="glob" from="*" to="*.jar"/>
|
|
|
|
</pathconvert>
|
|
|
|
<jar destfile="@{lib.dir}/@{module.name}.jar"
|
|
|
|
basedir="@{classes.dir}">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Class-Path" value="@{jarclasspath}"/>
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
</target>
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2009-11-18 00:45:19 +00:00
|
|
|
<target name="-def-build-tool">
|
2007-12-01 00:00:00 +00:00
|
|
|
<macrodef name="build-tool">
|
|
|
|
<attribute name="name"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
<attribute name="compilation.kind" default=""/>
|
|
|
|
<attribute name="bin.dir" default="${@{compilation.kind}dist.bin.dir}"/>
|
2009-08-12 14:14:02 +00:00
|
|
|
<attribute name="java" default="${launcher.java}"/>
|
2015-10-19 17:15:16 +00:00
|
|
|
<attribute name="main.class" default="${tool.@{name}.main.class}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<sequential>
|
|
|
|
<mkdir dir="@{bin.dir}"/>
|
2014-08-17 14:52:32 +00:00
|
|
|
<copy file="${make.dir}/launcher.sh-template" tofile="@{bin.dir}/@{name}">
|
2007-12-01 00:00:00 +00:00
|
|
|
<filterset begintoken="#" endtoken="#">
|
2015-10-19 17:15:16 +00:00
|
|
|
<filter token="PROGRAM" value="@{main.class}"/>
|
2009-08-12 14:54:30 +00:00
|
|
|
<filter token="TARGET_JAVA" value="@{java}"/>
|
2010-08-25 18:24:30 +00:00
|
|
|
<filter token="PS" value="${path.separator}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
</filterset>
|
|
|
|
</copy>
|
|
|
|
<chmod file="@{bin.dir}/@{name}" perm="ugo+rx"/>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
</target>
|
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="-def-build-all-module-classes" depends="-def-build-module-classes">
|
|
|
|
<macrodef name="build-all-module-classes">
|
|
|
|
<attribute name="compilation.kind" default=""/>
|
2013-04-26 14:59:39 +00:00
|
|
|
<sequential>
|
2014-11-07 17:22:36 +00:00
|
|
|
<build-module-classes module.name="java.compiler"
|
|
|
|
compilation.kind="@{compilation.kind}" />
|
|
|
|
<build-module-classes module.name="jdk.compiler"
|
2015-01-08 14:43:05 +00:00
|
|
|
compilation.kind="@{compilation.kind}"
|
|
|
|
resource.includes="${javac.resource.includes}" />
|
2014-11-07 17:22:36 +00:00
|
|
|
<build-module-classes module.name="jdk.javadoc"
|
|
|
|
compilation.kind="@{compilation.kind}" />
|
2015-05-27 20:25:18 +00:00
|
|
|
<build-module-classes module.name="jdk.jdeps"
|
2014-11-07 17:22:36 +00:00
|
|
|
compilation.kind="@{compilation.kind}" />
|
2015-10-19 17:15:16 +00:00
|
|
|
<copy-module-classes module.name="jdk.internal.le"
|
|
|
|
compilation.kind="@{compilation.kind}" />
|
|
|
|
<copy-module-classes module.name="jdk.jdi"
|
|
|
|
compilation.kind="@{compilation.kind}" />
|
|
|
|
<build-module-classes module.name="jdk.jshell"
|
|
|
|
compilation.kind="@{compilation.kind}" />
|
2013-04-26 14:59:39 +00:00
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
</target>
|
|
|
|
|
2015-10-19 17:15:16 +00:00
|
|
|
<target name="-def-build-module-classes" depends="-def-pcompile,-def-pparse,-def-cdumper">
|
2014-11-07 17:22:36 +00:00
|
|
|
<macrodef name="build-module-classes">
|
|
|
|
<attribute name="module.name"/>
|
|
|
|
<attribute name="compilation.kind" default=""/>
|
2015-01-08 14:43:05 +00:00
|
|
|
<attribute name="resource.includes" default="nonExistent" />
|
2014-11-07 17:22:36 +00:00
|
|
|
<attribute name="dependencies" default="${@{module.name}.dependencies}"/>
|
|
|
|
<attribute name="includes" default="${@{compilation.kind}javac.includes}"/>
|
|
|
|
<attribute name="javac.lint.opts" default="${@{compilation.kind}javac.lint.opts}"/>
|
|
|
|
<attribute name="javac.extra.opts" default="${@{compilation.kind}javac.extra.opts}"/>
|
|
|
|
<attribute name="build.dir" default="${@{compilation.kind}build.dir}"/>
|
2009-11-20 19:18:43 +00:00
|
|
|
<attribute name="excludes" default="${exclude.files} **/package-info.java"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
<attribute name="classes.dir" default="@{build.dir}/@{module.name}/classes"/>
|
|
|
|
<attribute name="gensrc.dir" default="@{build.dir}/@{module.name}/gensrc"/>
|
|
|
|
<attribute name="depcache.dir" default="@{build.dir}/@{module.name}/depcache"/>
|
2009-11-18 00:45:19 +00:00
|
|
|
<attribute name="java.home" default="${boot.java.home}"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
<attribute name="source" default="${@{compilation.kind}javac.source}"/>
|
|
|
|
<attribute name="target" default="${@{compilation.kind}javac.target}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<attribute name="release" default="${release}"/>
|
|
|
|
<attribute name="full.version" default="${full.version}"/>
|
2013-04-26 14:59:39 +00:00
|
|
|
<attribute name="plugin.options" default=""/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<sequential>
|
2009-11-20 19:18:43 +00:00
|
|
|
<echo level="verbose" message="build-classes: excludes=@{excludes}"/>
|
|
|
|
<echo level="verbose" message="build-classes: classpath=@{classpath}"/>
|
|
|
|
<echo level="verbose" message="build-classes: sourcepath=@{sourcepath}"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
<echo level="verbose" message="build-classes: dependencies=@{dependencies}"/>
|
|
|
|
<local name="src.dir" />
|
|
|
|
<property name="src.dir" location="${basedir}/src/@{module.name}/share/classes"/>
|
|
|
|
<local name="classpath" />
|
|
|
|
<pathconvert property="classpath">
|
|
|
|
<path>
|
|
|
|
<pathelement path="@{dependencies}" />
|
|
|
|
</path>
|
|
|
|
<map from="${basedir}/" to="@{build.dir}/" />
|
|
|
|
<mapper type="glob" from="*" to="*/classes"/>
|
|
|
|
</pathconvert>
|
|
|
|
<local name="bootclasspath.prepend"/>
|
|
|
|
<condition property="bootclasspath.prepend" value="" else="${langtools.boot.classes}">
|
|
|
|
<equals arg1="@{compilation.kind}" arg2="boot."/>
|
|
|
|
</condition>
|
2007-12-01 00:00:00 +00:00
|
|
|
<mkdir dir="@{classes.dir}"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
<mkdir dir="@{gensrc.dir}"/>
|
|
|
|
<mkdir dir="@{depcache.dir}"/>
|
2014-08-17 14:52:32 +00:00
|
|
|
<pcompile destdir="@{gensrc.dir}"
|
|
|
|
includes="@{includes}">
|
|
|
|
<src>
|
2014-11-07 17:22:36 +00:00
|
|
|
<path location="${src.dir}"/>
|
2014-08-17 14:52:32 +00:00
|
|
|
</src>
|
|
|
|
</pcompile>
|
2015-01-08 14:43:05 +00:00
|
|
|
<pparse destdir="@{gensrc.dir}"
|
|
|
|
includes="@{resource.includes}">
|
|
|
|
<src>
|
|
|
|
<path location="${src.dir}"/>
|
|
|
|
</src>
|
|
|
|
</pparse>
|
2007-12-01 00:00:00 +00:00
|
|
|
<copy todir="@{gensrc.dir}">
|
2014-11-07 17:22:36 +00:00
|
|
|
<fileset dir="${src.dir}" includes="@{includes}" />
|
2007-12-01 00:00:00 +00:00
|
|
|
<globmapper from="*.properties-template" to="*.properties"/>
|
|
|
|
<filterset begintoken="$(" endtoken=")">
|
|
|
|
<filter token="JDK_VERSION" value="${jdk.version}"/>
|
|
|
|
<filter token="RELEASE" value="@{release}"/>
|
|
|
|
<filter token="FULL_VERSION" value="@{full.version}"/>
|
|
|
|
</filterset>
|
|
|
|
</copy>
|
2014-08-17 14:52:32 +00:00
|
|
|
<pcompile destdir="@{gensrc.dir}"
|
|
|
|
includes="**/*.properties">
|
|
|
|
<src>
|
|
|
|
<pathelement location="@{gensrc.dir}"/>
|
|
|
|
</src>
|
|
|
|
</pcompile>
|
2014-11-07 17:22:36 +00:00
|
|
|
<antcall target="-do-depend">
|
|
|
|
<param name="src.dir" value="${src.dir}" />
|
|
|
|
<param name="classes.dir" value="@{classes.dir}" />
|
|
|
|
<param name="gensrc.dir" value="@{gensrc.dir}" />
|
|
|
|
<param name="depcache.dir" value="@{depcache.dir}" />
|
|
|
|
<param name="classpath" value="${classpath}" />
|
|
|
|
</antcall>
|
2007-12-01 00:00:00 +00:00
|
|
|
<javac fork="true"
|
2009-11-18 00:45:19 +00:00
|
|
|
executable="@{java.home}/bin/javac"
|
2007-12-01 00:00:00 +00:00
|
|
|
destdir="@{classes.dir}"
|
|
|
|
includes="@{includes}"
|
|
|
|
excludes="@{excludes}"
|
2014-11-07 17:22:36 +00:00
|
|
|
sourcepath="${src.dir}:@{gensrc.dir}"
|
|
|
|
classpath="${classpath}"
|
2007-12-01 00:00:00 +00:00
|
|
|
includeAntRuntime="no"
|
2009-11-18 00:45:19 +00:00
|
|
|
source="@{source}"
|
|
|
|
target="@{target}"
|
2009-08-12 14:54:30 +00:00
|
|
|
debug="${javac.debug}"
|
2007-12-01 00:00:00 +00:00
|
|
|
debuglevel="${javac.debuglevel}">
|
2009-11-20 19:18:43 +00:00
|
|
|
<compilerarg value="-implicit:none"/>
|
|
|
|
<compilerarg value="-Xprefer:source"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
<compilerarg value="-J-Xbootclasspath/p:${bootclasspath.prepend}"/>
|
|
|
|
<compilerarg value="-Xbootclasspath/p:${classpath}"/>
|
|
|
|
<compilerarg line="@{javac.extra.opts}"/>
|
|
|
|
<compilerarg line="@{javac.lint.opts}"/>
|
2013-04-26 14:59:39 +00:00
|
|
|
<compilerarg line="@{plugin.options}"/>
|
2014-08-17 14:52:32 +00:00
|
|
|
<src>
|
2014-11-07 17:22:36 +00:00
|
|
|
<path location="${src.dir}"/>
|
2014-08-17 14:52:32 +00:00
|
|
|
<path location="@{gensrc.dir}"/>
|
|
|
|
</src>
|
2007-12-01 00:00:00 +00:00
|
|
|
</javac>
|
2009-12-11 22:26:27 +00:00
|
|
|
<copy todir="@{classes.dir}" includeemptydirs="false">
|
2014-11-07 17:22:36 +00:00
|
|
|
<fileset dir="${src.dir}" includes="@{includes}" excludes="@{excludes}">
|
2007-12-01 00:00:00 +00:00
|
|
|
<exclude name="**/*.java"/>
|
|
|
|
<exclude name="**/*.properties"/>
|
|
|
|
<exclude name="**/*-template"/>
|
2011-03-25 14:39:30 +00:00
|
|
|
<exclude name="**/*.rej"/>
|
|
|
|
<exclude name="**/*.orig"/>
|
|
|
|
<exclude name="**/overview.html"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<exclude name="**/package.html"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
</fileset>
|
2007-12-01 00:00:00 +00:00
|
|
|
</copy>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2015-10-19 17:15:16 +00:00
|
|
|
<macrodef name="copy-module-classes">
|
|
|
|
<attribute name="module.name"/>
|
|
|
|
<attribute name="compilation.kind" default=""/>
|
|
|
|
<attribute name="build.dir" default="${@{compilation.kind}build.dir}"/>
|
|
|
|
<attribute name="classes.dir" default="@{build.dir}/@{module.name}/classes"/>
|
|
|
|
<attribute name="java.home" default="${boot.java.home}"/>
|
|
|
|
<sequential>
|
|
|
|
<property name="classes.origin.dir" location="${target.java.home}/../../jdk/modules/@{module.name}"/>
|
|
|
|
<mkdir dir="@{classes.dir}"/>
|
|
|
|
<dumpclasses moduleName="@{module.name}" destDir="@{classes.dir}" />
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2007-12-01 00:00:00 +00:00
|
|
|
</target>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2015-01-08 14:43:05 +00:00
|
|
|
<target name="-def-pparse">
|
|
|
|
<mkdir dir="${build.toolclasses.dir}"/>
|
|
|
|
<copy todir="${build.toolclasses.dir}/propertiesparser" >
|
|
|
|
<fileset dir="make/tools/propertiesparser" includes="**/resources/**"/>
|
|
|
|
</copy>
|
|
|
|
<javac fork="true"
|
|
|
|
source="${boot.javac.source}"
|
|
|
|
target="${boot.javac.target}"
|
|
|
|
executable="${boot.java.home}/bin/javac"
|
|
|
|
srcdir="${make.tools.dir}"
|
|
|
|
includes="propertiesparser/* anttasks/PropertiesParser* anttasks/PathFileSet*"
|
|
|
|
destdir="${build.toolclasses.dir}/"
|
|
|
|
classpath="${ant.core.lib}"
|
|
|
|
bootclasspath="${boot.java.home}/jre/lib/rt.jar"
|
|
|
|
includeantruntime="false">
|
|
|
|
<compilerarg line="${javac.lint.opts}"/>
|
|
|
|
</javac>
|
|
|
|
<taskdef name="pparse"
|
|
|
|
classname="anttasks.PropertiesParserTask"
|
|
|
|
classpath="${build.toolclasses.dir}/"/>
|
|
|
|
</target>
|
|
|
|
|
2015-10-19 17:15:16 +00:00
|
|
|
<target name="-def-cdumper">
|
|
|
|
<mkdir dir="${build.toolclasses.dir}"/>
|
|
|
|
<javac fork="true"
|
|
|
|
source="${boot.javac.source}"
|
|
|
|
target="${boot.javac.target}"
|
|
|
|
executable="${boot.java.home}/bin/javac"
|
|
|
|
srcdir="${make.tools.dir}"
|
|
|
|
includes="anttasks/DumpClass*"
|
|
|
|
destdir="${build.toolclasses.dir}/"
|
|
|
|
classpath="${ant.core.lib}"
|
|
|
|
bootclasspath="${boot.java.home}/jre/lib/rt.jar"
|
|
|
|
includeantruntime="false">
|
|
|
|
<compilerarg line="${javac.lint.opts}"/>
|
|
|
|
</javac>
|
|
|
|
<taskdef name="dumpclasses"
|
|
|
|
classname="anttasks.DumpClassesTask"
|
|
|
|
classpath="${build.toolclasses.dir}/:${target.java.home}/jrt-fs.jar"/>
|
|
|
|
</target>
|
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="-do-depend" if="do.depend">
|
|
|
|
<depend srcdir="${src.dir}:${gensrc.dir}" destdir="${classes.dir}" classpath="${classpath}"
|
|
|
|
cache="${depcache.dir}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
</target>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
<target name="-def-pcompile">
|
|
|
|
<mkdir dir="${build.toolclasses.dir}"/>
|
2009-01-21 16:21:41 +00:00
|
|
|
<javac fork="true"
|
2009-08-19 19:44:22 +00:00
|
|
|
source="${boot.javac.source}"
|
|
|
|
target="${boot.javac.target}"
|
2009-01-21 16:21:41 +00:00
|
|
|
executable="${boot.java.home}/bin/javac"
|
2012-03-07 12:11:27 +00:00
|
|
|
srcdir="${make.tools.dir}"
|
2014-08-17 14:52:32 +00:00
|
|
|
includes="compileproperties/* anttasks/CompileProperties* anttasks/PathFileSet*"
|
2007-12-01 00:00:00 +00:00
|
|
|
destdir="${build.toolclasses.dir}/"
|
2010-09-13 18:35:27 +00:00
|
|
|
classpath="${ant.core.lib}"
|
2011-06-23 18:49:27 +00:00
|
|
|
bootclasspath="${boot.java.home}/jre/lib/rt.jar"
|
|
|
|
includeantruntime="false">
|
|
|
|
<compilerarg line="${javac.lint.opts}"/>
|
|
|
|
</javac>
|
2007-12-01 00:00:00 +00:00
|
|
|
<taskdef name="pcompile"
|
2012-03-07 12:11:27 +00:00
|
|
|
classname="anttasks.CompilePropertiesTask"
|
2007-12-01 00:00:00 +00:00
|
|
|
classpath="${build.toolclasses.dir}/"/>
|
|
|
|
</target>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
<target name="-def-javadoc-tool" depends="-check-target.java.home">
|
|
|
|
<macrodef name="javadoc-tool">
|
2014-11-07 17:22:36 +00:00
|
|
|
<attribute name="includes" default="${javac.includes}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<attribute name="options" default=""/>
|
2014-08-17 14:52:32 +00:00
|
|
|
<attribute name="source" default="${javac.source}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<sequential>
|
|
|
|
<property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project -->
|
|
|
|
<!-- Note: even with this default value, includes
|
2014-08-17 14:52:32 +00:00
|
|
|
from source directories get javadoc'd; see packageset below -->
|
2007-12-01 00:00:00 +00:00
|
|
|
<property name="javadoc.packagenames" value="none"/> <!-- default, can be overridden per user or per project -->
|
2009-08-12 14:54:30 +00:00
|
|
|
<javadoc
|
2007-12-01 00:00:00 +00:00
|
|
|
executable="${target.java.home}/bin/javadoc"
|
2014-11-07 17:22:36 +00:00
|
|
|
destdir="${build.javadoc.dir}"
|
2007-12-01 00:00:00 +00:00
|
|
|
source="@{source}"
|
2009-08-12 14:54:30 +00:00
|
|
|
windowtitle="UNOFFICIAL"
|
|
|
|
failonerror="true"
|
2007-12-01 00:00:00 +00:00
|
|
|
use="true"
|
2009-08-12 14:54:30 +00:00
|
|
|
author="false"
|
2007-12-01 00:00:00 +00:00
|
|
|
version="false"
|
|
|
|
packagenames="${javadoc.packagenames}" >
|
|
|
|
<header><![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></header>
|
|
|
|
<arg line="@{options}"/>
|
|
|
|
<bootclasspath>
|
2014-11-07 17:22:36 +00:00
|
|
|
<pathelement path="${langtools.classes}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<path location="${target.java.home}/jre/lib/rt.jar"/>
|
|
|
|
</bootclasspath>
|
|
|
|
<sourcepath>
|
2014-11-07 17:22:36 +00:00
|
|
|
<pathelement path="${langtools.sources}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
</sourcepath>
|
|
|
|
<!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> -->
|
|
|
|
<!-- means that {@link some.package} will not work, which is no good. -->
|
|
|
|
<!-- (It correctly skips excluded single classes, but not if packageset is also included, -->
|
|
|
|
<!-- which also causes duplicates in the class index for included files.) -->
|
2014-11-07 17:22:36 +00:00
|
|
|
<packageset dir="${basedir}/src/java.compiler/share/classes" includes="@{includes}">
|
2014-08-17 14:52:32 +00:00
|
|
|
<or>
|
|
|
|
<filename name="javax/"/>
|
|
|
|
</or>
|
|
|
|
</packageset>
|
2014-11-07 17:22:36 +00:00
|
|
|
<packageset dir="${basedir}/src/jdk.compiler/share/classes" includes="@{includes}">
|
2014-08-17 14:52:32 +00:00
|
|
|
<or>
|
|
|
|
<filename name="com/sun/source/"/>
|
|
|
|
</or>
|
|
|
|
</packageset>
|
2014-11-07 17:22:36 +00:00
|
|
|
<packageset dir="${basedir}/src/jdk.javadoc/share/classes" includes="@{includes}">
|
2007-12-01 00:00:00 +00:00
|
|
|
<or>
|
|
|
|
<filename name="com/sun/javadoc/"/>
|
|
|
|
</or>
|
|
|
|
</packageset>
|
|
|
|
</javadoc>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
</target>
|
2009-08-12 14:54:30 +00:00
|
|
|
|
|
|
|
<target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home,-check-target.java.home">
|
2007-12-01 00:00:00 +00:00
|
|
|
<taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${jtreg.home}/lib/jtreg.jar"/>
|
|
|
|
<pathelement location="${jtreg.home}/lib/javatest.jar"/>
|
|
|
|
</classpath>
|
|
|
|
</taskdef>
|
|
|
|
<macrodef name="jtreg-tool">
|
|
|
|
<attribute name="name"/>
|
|
|
|
<attribute name="tests"/>
|
2014-11-07 17:22:36 +00:00
|
|
|
<attribute name="langtools.classes" default="${langtools.classes}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<attribute name="jdk" default="${target.java.home}"/>
|
2009-08-12 14:54:30 +00:00
|
|
|
<attribute name="samevm" default="true"/>
|
2010-06-11 14:12:07 +00:00
|
|
|
<attribute name="verbose" default="${default.jtreg.verbose}"/>
|
|
|
|
<attribute name="options" default="${other.jtreg.options}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<attribute name="keywords" default="-keywords:!ignore"/>
|
|
|
|
<attribute name="jpda.jvmargs" default=""/>
|
2014-08-01 18:09:40 +00:00
|
|
|
<attribute name="extra.jvmargs" default=""/>
|
2014-11-07 17:22:36 +00:00
|
|
|
<attribute name="build.dir" default="${build.dir}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<sequential>
|
2010-06-11 14:12:07 +00:00
|
|
|
<property name="coverage.options" value=""/> <!-- default -->
|
|
|
|
<property name="coverage.classpath" value=""/> <!-- default -->
|
|
|
|
<property name="default.jtreg.verbose" value="summary"/> <!-- default -->
|
|
|
|
<property name="other.jtreg.options" value=""/> <!-- default -->
|
2009-08-12 14:54:30 +00:00
|
|
|
<jtreg
|
2007-12-01 00:00:00 +00:00
|
|
|
dir="${test.dir}"
|
2009-08-12 14:54:30 +00:00
|
|
|
workDir="${build.jtreg.dir}/@{name}/work"
|
2007-12-01 00:00:00 +00:00
|
|
|
reportDir="${build.jtreg.dir}/@{name}/report"
|
|
|
|
jdk="@{jdk}"
|
|
|
|
samevm="@{samevm}" verbose="@{verbose}"
|
|
|
|
failonerror="false" resultproperty="jtreg.@{name}.result"
|
|
|
|
javacoptions="-g"
|
2014-11-07 17:22:36 +00:00
|
|
|
vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}${path.separator}@{langtools.classes} @{jpda.jvmargs} @{extra.jvmargs}">
|
2007-12-01 00:00:00 +00:00
|
|
|
<arg line="@{keywords}"/>
|
|
|
|
<arg line="@{options}"/>
|
|
|
|
<arg line="@{tests}"/>
|
|
|
|
</jtreg>
|
2009-08-12 14:54:30 +00:00
|
|
|
<!-- the next two properties are for convenience, when only
|
2007-12-01 00:00:00 +00:00
|
|
|
a single instance of jtreg will be invoked. -->
|
|
|
|
<condition property="jtreg.passed">
|
2009-01-23 19:23:10 +00:00
|
|
|
<equals arg1="${jtreg.@{name}.result}" arg2="0"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
</condition>
|
|
|
|
<property name="jtreg.report" value="${build.jtreg.dir}/@{name}/report"/>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
<property name="jtreg.defined" value="true"/>
|
|
|
|
</target>
|
|
|
|
|
2014-11-07 17:22:36 +00:00
|
|
|
<target name="-def-checkstyle" unless="checkstyle.defined" depends="-check-checkstyle.home">
|
2011-11-14 16:09:47 +00:00
|
|
|
<taskdef resource="checkstyletask.properties">
|
|
|
|
<classpath>
|
2014-11-07 17:22:36 +00:00
|
|
|
<fileset dir="${checkstyle.home}">
|
|
|
|
<include name="checkstyle-*-all.jar"/>
|
|
|
|
</fileset>
|
2011-11-14 16:09:47 +00:00
|
|
|
</classpath>
|
|
|
|
</taskdef>
|
|
|
|
<property name="checkstyle.defined" value="true"/>
|
|
|
|
</target>
|
2012-11-15 01:23:10 +00:00
|
|
|
|
2010-09-13 18:40:58 +00:00
|
|
|
<target name="-def-findbugs" unless="findbugs.defined"
|
|
|
|
depends="-check-findbugs.home,-check-target.java.home">
|
2007-12-01 00:00:00 +00:00
|
|
|
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${findbugs.home}/lib/findbugs.jar"/>
|
|
|
|
</classpath>
|
|
|
|
</taskdef>
|
|
|
|
<macrodef name="findbugs-tool">
|
|
|
|
<attribute name="name"/>
|
|
|
|
<attribute name="output" default="emacs"/>
|
|
|
|
<attribute name="outputFile" default=""/>
|
|
|
|
<attribute name="reportLevel" default="high"/>
|
|
|
|
<sequential>
|
2009-08-12 14:54:30 +00:00
|
|
|
<findbugs
|
2007-12-01 00:00:00 +00:00
|
|
|
home="${findbugs.home}"
|
|
|
|
output="@{output}"
|
|
|
|
outputFile="@{outputFile}"
|
|
|
|
reportLevel="@{reportLevel}"
|
|
|
|
failOnError="false"
|
|
|
|
errorProperty="findbugs.@{name}.errors"
|
|
|
|
warningsProperty="findbugs.@{name}.warnings"
|
2010-09-13 18:40:58 +00:00
|
|
|
jvm="${target.java.home}/bin/java"
|
2007-12-01 00:00:00 +00:00
|
|
|
jvmargs="-Xmx512M" >
|
|
|
|
<class location="${dist.dir}/lib/@{name}.jar"/>
|
|
|
|
<auxClasspath>
|
2014-11-07 17:22:36 +00:00
|
|
|
<pathelement location="${langtools.classes}"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
</auxClasspath>
|
|
|
|
<sourcePath>
|
2014-08-17 14:52:32 +00:00
|
|
|
<path refid="src.dirs"/>
|
2007-12-01 00:00:00 +00:00
|
|
|
</sourcePath>
|
|
|
|
</findbugs>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
<property name="findbugs.defined" value="true"/>
|
|
|
|
</target>
|
2010-06-05 00:33:25 +00:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
<target name="-def-check">
|
|
|
|
<macrodef name="check">
|
|
|
|
<attribute name="name"/>
|
|
|
|
<attribute name="property"/>
|
2010-06-04 21:54:54 +00:00
|
|
|
<attribute name="marker" default=""/>
|
2007-12-01 00:00:00 +00:00
|
|
|
<sequential>
|
|
|
|
<fail message="Cannot locate @{name}: please set @{property} to its location">
|
|
|
|
<condition>
|
|
|
|
<not>
|
|
|
|
<isset property="@{property}"/>
|
|
|
|
</not>
|
|
|
|
</condition>
|
|
|
|
</fail>
|
|
|
|
<fail message="@{name} is not installed in ${@{property}}">
|
|
|
|
<condition>
|
2010-06-05 00:33:25 +00:00
|
|
|
<and>
|
|
|
|
<not>
|
|
|
|
<equals arg1="@{marker}" arg2=""/>
|
|
|
|
</not>
|
2010-06-04 21:54:54 +00:00
|
|
|
<not>
|
|
|
|
<available file="${@{property}}/@{marker}"/>
|
|
|
|
</not>
|
2010-06-05 00:33:25 +00:00
|
|
|
</and>
|
2007-12-01 00:00:00 +00:00
|
|
|
</condition>
|
|
|
|
</fail>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|
|
|
|
|