langtools/make/build.xml
author andrew
Wed, 19 Aug 2009 20:44:22 +0100
changeset 3658 8ee720a52b7d
parent 3655 f9ee66e780f4
child 3996 dc676a9093b3
permissions -rw-r--r--
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk Summary: Set source and target explicitly in pcompile task Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
06bc494ca11e Initial load
duke
parents:
diff changeset
     2
<!--
2212
1d3dc0e0ba0c 6814575: Update copyright year
xdono
parents: 1873
diff changeset
     3
 Copyright 2007-2009 Sun Microsystems, Inc.  All Rights Reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
 under the terms of the GNU General Public License version 2 only, as
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 published by the Free Software Foundation.  Sun designates this
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
 particular file as subject to the "Classpath" exception as provided
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 by Sun in the LICENSE file that accompanied this code.
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
06bc494ca11e Initial load
duke
parents:
diff changeset
    23
 CA 95054 USA or visit www.sun.com if you need additional information or
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 have any questions.
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
-->
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
<!--
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
 This is the main build file for the complete langtools workspace.
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
 It is used both when working on the tools in NetBeans, and when building
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
 JDK itself, in which case it is invoked from the wrapper Makefile.
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
 -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
<project name="langtools" default="build" basedir="..">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    34
2850
307d7719ccb7 6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents: 2212
diff changeset
    35
    <!-- Force full debuginfo for javac if the debug.classfiles
307d7719ccb7 6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents: 2212
diff changeset
    36
    property is set.  This must be BEFORE the include of
307d7719ccb7 6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents: 2212
diff changeset
    37
    build.properties because it sets javac.debuglevel.  -->
307d7719ccb7 6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents: 2212
diff changeset
    38
    <condition property="javac.debuglevel" value="source,lines,vars">
307d7719ccb7 6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents: 2212
diff changeset
    39
        <equals arg1="${debug.classfiles}" arg2="true"/>
307d7719ccb7 6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents: 2212
diff changeset
    40
    </condition>
307d7719ccb7 6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents: 2212
diff changeset
    41
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
    <!-- The following locations can be used to override default property values. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
    <!-- Use this location for customizations specific to this instance of this workspace -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
    <property file="build.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
    <!-- Use this location for customizations common to all OpenJDK langtools workspaces -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
    <property file="${user.home}/.openjdk/${ant.project.name}-build.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
    <!-- Use this location for customizations common to all OpenJDK workspaces -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
    <property file="${user.home}/.openjdk/build.properties"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    52
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    53
    <!-- Convenient shorthands for standard locations within the workspace. -->
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
    <property name="build.dir" location="build"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
    <property name="build.bootstrap.dir" location="${build.dir}/bootstrap"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
    <property name="build.coverage.dir" location="${build.dir}/coverage"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
    <property name="build.classes.dir" location="${build.dir}/classes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
    <property name="build.gensrc.dir" location="${build.dir}/gensrc"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
    <property name="build.javadoc.dir" location="${build.dir}/javadoc"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
    <property name="build.jtreg.dir" location="${build.dir}/jtreg"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
    <property name="build.toolclasses.dir" location="${build.dir}/toolclasses"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
    <property name="dist.dir" location="dist"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
    <property name="dist.bin.dir" location="${dist.dir}/bin"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
    <property name="dist.coverage.dir" location="${dist.dir}/coverage"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
    <property name="dist.findbugs.dir" location="${dist.dir}/findbugs"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
    <property name="dist.lib.dir" location="${dist.dir}/lib"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
    <property name="make.dir" location="make"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
    <property name="make.tools.dir" location="${make.dir}/tools"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
    <property name="src.dir" location="src"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
    <property name="src.bin.dir" location="${src.dir}/share/bin"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
    <property name="src.classes.dir" location="${src.dir}/share/classes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
    <property name="test.dir" location="test"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
    <!-- java.marker is set to a marker file to check for within a Java install dir.
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
         The best file to check for across Solaris/Linux/Windows/MacOS is one of the
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
         executables; regrettably, that is OS-specific. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
    <condition property="java.marker" value="bin/java">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    78
        <os family="unix"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
    </condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
    <condition property="java.marker" value="bin/java.exe">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    81
        <os family="windows"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
    </condition>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    83
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
    <!-- Standard property values, if not overriden by earlier settings. -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    85
    <property file="${make.dir}/build.properties"/>
3654
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
    86
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
    87
    <!-- launcher.java is used in the launcher scripts provided to run
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    88
        the tools' jar files.  If it has not already been set, then
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    89
        default it to use ${target.java.home}, if available, otherwise
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    90
        quietly default to simply use "java". -->
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    91
    <condition property="launcher.java"
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    92
        value="${target.java.home}/bin/java" else="java">
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    93
        <isset property="target.java.home"/>
3654
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
    94
    </condition>
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
    95
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    96
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
    <!-- Standard target to build deliverables for JDK build. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
    <target name="build" depends="build-bootstrap-tools,build-all-classes">
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
        <copy todir="${dist.dir}/bootstrap">
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
            <fileset dir="${build.bootstrap.dir}" includes="bin/,lib/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
        </copy>
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
        <chmod dir="${dist.dir}/bootstrap/bin" perm="ugo+rx">
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
            <include name="*"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
        </chmod>
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
        <mkdir dir="${dist.lib.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
        <jar file="${dist.lib.dir}/classes.jar" basedir="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
        <zip file="${dist.lib.dir}/src.zip" basedir="${src.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   110
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
    <target name="build-bootstrap-tools" depends="build-bootstrap-javac,build-bootstrap-javadoc,build-bootstrap-doclets,build-bootstrap-javah"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   112
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
    <target name="build-all-tools" depends="build-javac,build-javadoc,build-doclets,build-javah,build-javap,build-apt"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   114
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
    <target name="build-all-classes" depends="build-classes-javac,build-classes-javadoc,build-classes-doclets,build-classes-javah,build-classes-javap,build-classes-apt"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   116
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
    <!-- clean -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
    <target name="clean" description="Delete all generated files">
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
        <delete dir="${build.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
        <delete dir="${dist.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
    <!-- Additional targets for running tools on the build -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   126
    <target name="jtreg" depends="build-all-tools,-def-jtreg">
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   127
        <jtreg-tool name="all" tests="${jtreg.tests}"/>
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   128
    </target>
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   129
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
    <target name="findbugs" depends="-def-findbugs,build-all-tools">
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
        <property name="findbugs.reportLevel" value="medium"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
        <mkdir dir="${dist.findbugs.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
        <findbugs
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
            home="${findbugs.home}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
            projectName="JDK langtools ${full.version}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
            output="xml"
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
            outputFile="${dist.findbugs.dir}/findbugs.xml"
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
            reportLevel="${findbugs.reportLevel}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
            failOnError="false"
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
            errorProperty="findbugs.all.errors"
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
            warningsProperty="findbugs.all.warnings"
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
            jvmargs="-Xmx512M">
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
            <class location="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
            <sourcePath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
                <pathelement location="${src.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
            </sourcePath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
        </findbugs>
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
        <exec executable="sh">
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
            <arg value="${findbugs.home}/bin/convertXmlToText"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
            <arg value="-longBugCodes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
            <arg value="-html:${findbugs.home}/src/xsl/fancy.xsl"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
            <arg value="${dist.findbugs.dir}/findbugs.xml"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
            <redirector output="${dist.findbugs.dir}/findbugs.html"/>
727
cb50c1ae7bab 4075303: Use javap to enquire aboput a specific inner class
jjg
parents: 10
diff changeset
   154
        </exec>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   155
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
    <target name="coverage" depends="-def-cobertura,build-all-classes,instrument-classes,jtreg,coverage-report"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
    <target name="instrument-classes" depends="-def-cobertura">
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
        <!-- only define the following property when we want coverage info -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
        <path id="coverage.classpath">
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
            <pathelement location="${build.coverage.dir}/classes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
            <path refid="cobertura.classpath"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
        </path>
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
        <property name="coverage.options" value="-Dnet.sourceforge.cobertura.datafile=${build.coverage.dir}/cobertura.ser"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
        <property name="coverage.classpath" refid="coverage.classpath"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
        <mkdir dir="${build.coverage.dir}/classes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
        <delete file="${build.coverage.dir}/cobertura.ser"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
        <cobertura-instrument todir="${build.coverage.dir}/classes"
06bc494ca11e Initial load
duke
parents:
diff changeset
   170
            datafile="${build.coverage.dir}/cobertura.ser">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   171
            <fileset dir="${build.classes.dir}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
               includes="**/*.class" excludes="**/resources/*.class"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
        </cobertura-instrument>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   174
    </target>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
    <target name="coverage-report" depends="-def-cobertura">
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
        <mkdir dir="${dist.coverage.dir}"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   178
        <cobertura-report
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
            srcdir="${src.classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
            destdir="${dist.coverage.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
            datafile="${build.coverage.dir}/cobertura.ser"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   182
        <cobertura-report
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   183
            format="xml"
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   184
            srcdir="${src.classes.dir}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
            destdir="${dist.coverage.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
            datafile="${build.coverage.dir}/cobertura.ser"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   188
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
    <!-- javac targets -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
    <target name="build-bootstrap-javac" depends="-def-build-bootstrap-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
        <build-bootstrap-tool name="javac" includes="${javac.includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   194
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
    <target name="build-classes-javac" depends="build-bootstrap-javac">
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
        <build-classes name="javac" includes="${javac.includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   198
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
    <target name="build-javac" depends="build-bootstrap-javac">
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
        <build-tool name="javac" includes="${javac.includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   202
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   203
    <target name="javadoc-javac" depends="build-javac,-def-javadoc-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
        <javadoc-tool name="javac" includes="${javac.includes}" options="${javadoc.jls3.option}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   206
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
    <target name="jtreg-javac" depends="build-javac,-def-jtreg">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   208
        <jtreg-tool name="javac" tests="${javac.tests}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   210
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   211
    <target name="findbugs-javac" depends="build-javac,-def-findbugs">
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
        <findbugs-tool name="javac"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   213
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   214
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   215
    <target name="javac" depends="build-javac,jtreg-javac,findbugs-javac"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   216
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
    <!-- javadoc targets -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
    <target name="build-bootstrap-javadoc" depends="build-bootstrap-javac">
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
        <build-bootstrap-tool name="javadoc"
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
                              includes="${javadoc.includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
                              jarclasspath="javac.jar doclets.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   224
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
    <target name="build-classes-javadoc" depends="build-classes-javac">
06bc494ca11e Initial load
duke
parents:
diff changeset
   226
        <build-classes name="javadoc" includes="${javadoc.includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   228
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
    <target name="build-javadoc" depends="build-javac">
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
        <build-tool name="javadoc"
06bc494ca11e Initial load
duke
parents:
diff changeset
   231
                    includes="${javadoc.includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
                    jarclasspath="javac.jar doclets.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   234
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
    <target name="javadoc-javadoc" depends="build-javadoc,-def-javadoc-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
        <javadoc-tool name="javadoc" includes="${javadoc.includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   238
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
    <target name="jtreg-javadoc" depends="build-javadoc,-def-jtreg">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   240
        <jtreg-tool name="javadoc" tests="${javadoc.tests}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   242
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
    <target name="findbugs-javadoc" depends="build-javadoc,-def-findbugs">
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
        <findbugs-tool name="javadoc"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   246
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
    <target name="javadoc" depends="build-javadoc,jtreg-javadoc,findbugs-javadoc"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   248
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
    <!-- doclets targets -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
    <target name="build-bootstrap-doclets" depends="build-bootstrap-javadoc,-def-build-bootstrap-jar">
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
        <build-bootstrap-jar name="doclets"
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
                              includes="${doclets.includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
                              jarmainclass="com.sun.tools.javadoc.Main"
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
                              jarclasspath="javadoc.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   257
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
    <target name="build-classes-doclets" depends="build-classes-javadoc">
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
        <build-classes name="doclets" includes="${doclets.includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   260
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   261
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   262
    <target name="build-doclets" depends="build-javadoc">
06bc494ca11e Initial load
duke
parents:
diff changeset
   263
        <!-- just jar, no bin for doclets -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
        <build-jar name="doclets"
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
                    includes="${doclets.includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
                    jarclasspath="javadoc.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
06bc494ca11e Initial load
duke
parents:
diff changeset
   269
    <!-- (no javadoc for doclets) -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   270
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
    <target name="jtreg-doclets" depends="build-doclets,-def-jtreg">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   272
        <jtreg-tool name="doclets" tests="${doclets.tests}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   273
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   274
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   275
    <target name="findbugs-doclets" depends="build-doclets,-def-findbugs">
06bc494ca11e Initial load
duke
parents:
diff changeset
   276
        <findbugs-tool name="doclets"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   277
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   278
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
    <target name="doclets" depends="build-doclets,jtreg-doclets,findbugs-doclets"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   280
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   281
    <!-- javah targets -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   282
06bc494ca11e Initial load
duke
parents:
diff changeset
   283
    <target name="build-bootstrap-javah" depends="build-bootstrap-javadoc">
06bc494ca11e Initial load
duke
parents:
diff changeset
   284
        <build-bootstrap-tool name="javah"
06bc494ca11e Initial load
duke
parents:
diff changeset
   285
                              includes="${javah.includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   286
                              jarclasspath="javadoc.jar doclets.jar javac.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   287
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   288
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   289
    <target name="build-javah" depends="build-javadoc">
06bc494ca11e Initial load
duke
parents:
diff changeset
   290
        <build-tool name="javah"
06bc494ca11e Initial load
duke
parents:
diff changeset
   291
                    includes="${javah.includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   292
                    jarclasspath="javadoc.jar doclets.jar javac.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   293
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   294
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   295
    <target name="build-classes-javah" depends="build-classes-javadoc">
06bc494ca11e Initial load
duke
parents:
diff changeset
   296
        <build-classes name="javah" includes="${javah.includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   297
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   298
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   299
    <!-- (no javadoc for javah) -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   300
06bc494ca11e Initial load
duke
parents:
diff changeset
   301
    <target name="jtreg-javah" depends="build-javah,-def-jtreg">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   302
        <jtreg-tool name="javah" tests="${javah.tests}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   303
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   304
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   305
    <target name="findbugs-javah" depends="build-javah,-def-findbugs">
06bc494ca11e Initial load
duke
parents:
diff changeset
   306
        <findbugs-tool name="javah"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   307
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   308
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   309
    <target name="javah" depends="build-javah,jtreg-javah,findbugs-javah"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   310
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   311
    <!-- javap targets -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   312
06bc494ca11e Initial load
duke
parents:
diff changeset
   313
    <target name="build-bootstrap-javap" depends="-def-build-bootstrap-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   314
        <build-bootstrap-tool name="javap"
06bc494ca11e Initial load
duke
parents:
diff changeset
   315
                              includes="${javap.includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   316
                              jarmainclass="sun.tools.javap.Main"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   317
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   318
727
cb50c1ae7bab 4075303: Use javap to enquire aboput a specific inner class
jjg
parents: 10
diff changeset
   319
    <target name="build-classes-javap" depends="build-classes-javac">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   320
        <build-classes name="javap" includes="${javap.includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   321
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   322
727
cb50c1ae7bab 4075303: Use javap to enquire aboput a specific inner class
jjg
parents: 10
diff changeset
   323
    <target name="build-javap" depends="build-javac">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   324
        <build-tool name="javap"
06bc494ca11e Initial load
duke
parents:
diff changeset
   325
                    includes="${javap.includes}"
2987
2e0ca9f4893d 6838199: remove support for old javap
jjg
parents: 2982
diff changeset
   326
                    jarmainclass="com.sun.tools.javap.Main"
727
cb50c1ae7bab 4075303: Use javap to enquire aboput a specific inner class
jjg
parents: 10
diff changeset
   327
                    jarclasspath="javac.jar"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   328
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   329
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   330
    <!-- (no javadoc for javap) -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   331
06bc494ca11e Initial load
duke
parents:
diff changeset
   332
    <target name="jtreg-javap" depends="build-javap,-def-jtreg">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   333
        <jtreg-tool name="javap" tests="${javap.tests}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   334
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   335
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   336
    <target name="findbugs-javap" depends="build-javap,-def-findbugs">
06bc494ca11e Initial load
duke
parents:
diff changeset
   337
        <findbugs-tool name="javap"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   338
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   339
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   340
    <target name="javap" depends="build-javap,jtreg-javap,findbugs-javap"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   341
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   342
    <!-- apt targets -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   343
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   344
    <target name="build-bootstrap-apt" depends="build-bootstrap-javac">
06bc494ca11e Initial load
duke
parents:
diff changeset
   345
        <build-bootstrap-tool name="apt"
06bc494ca11e Initial load
duke
parents:
diff changeset
   346
                              includes="${apt.includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   347
                              jarclasspath="javac.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   348
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   349
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   350
    <target name="build-apt" depends="build-javac">
06bc494ca11e Initial load
duke
parents:
diff changeset
   351
        <build-tool name="apt"
06bc494ca11e Initial load
duke
parents:
diff changeset
   352
                    includes="${apt.includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   353
                    jarclasspath="javac.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   354
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   355
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   356
    <target name="build-classes-apt" depends="build-classes-javac">
06bc494ca11e Initial load
duke
parents:
diff changeset
   357
        <build-classes name="apt" includes="${apt.includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   358
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   359
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   360
    <target name="javadoc-apt" depends="build-apt,-def-javadoc-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   361
        <javadoc-tool name="apt" includes="${apt.includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   362
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   363
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   364
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   365
    <target name="jtreg-apt" depends="build-apt,-def-jtreg">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   366
        <jtreg-tool name="apt" tests="${apt.tests}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   367
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   368
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   369
    <target name="findbugs-apt" depends="build-apt,-def-findbugs">
06bc494ca11e Initial load
duke
parents:
diff changeset
   370
        <findbugs-tool name="apt"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   371
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   372
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   373
    <target name="apt" depends="build-apt,jtreg-apt,findbugs-apt"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   374
06bc494ca11e Initial load
duke
parents:
diff changeset
   375
    <!-- Check targets -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   376
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   377
    <target name="-check-boot.java.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   378
        <check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   379
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   380
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   381
    <target name="-check-target.java.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   382
        <check name="target java" property="target.java.home" marker="${java.marker}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   383
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   384
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   385
    <target name="-check-cobertura.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   386
        <check name="cobertura" property="cobertura.home" marker="cobertura.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   387
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   388
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   389
    <target name="-check-findbugs.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   390
        <check name="findbugs" property="findbugs.home" marker="lib/findbugs.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   391
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   392
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   393
    <target name="-check-jtreg.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   394
        <check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   395
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   396
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   397
    <!-- Ant macro and preset defs -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   398
06bc494ca11e Initial load
duke
parents:
diff changeset
   399
    <target name="-def-build-tool" depends="-def-build-jar">
06bc494ca11e Initial load
duke
parents:
diff changeset
   400
        <macrodef name="build-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   401
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   402
            <attribute name="includes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   403
            <attribute name="excludes" default="**/package-info.java"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   404
            <attribute name="bin.dir" default="${dist.bin.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   405
            <attribute name="classes.dir" default="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   406
            <attribute name="gensrc.dir" default="${build.gensrc.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   407
            <attribute name="lib.dir" default="${dist.lib.dir}"/>
3654
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
   408
            <attribute name="java" default="${launcher.java}"/>
3564
2db7ecd6bcd6 6870591: langtools build sets javac.bootclasspath incorrectly
jjg
parents: 2988
diff changeset
   409
            <attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/>
1871
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   410
            <attribute name="javac.java.home" default="${boot.java.home}"/>
2982
090c71af18f6 6827026: Change javac source and target default to 7
jjg
parents: 2212
diff changeset
   411
            <attribute name="javac.source" default="${javac.source}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   412
            <attribute name="javac.target" default="${javac.target}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   413
            <attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   414
            <attribute name="jarclasspath" default=""/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   415
            <attribute name="release" default="${release}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   416
            <attribute name="full.version" default="${full.version}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   417
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   418
                <build-jar
06bc494ca11e Initial load
duke
parents:
diff changeset
   419
                    name="@{name}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   420
                    gensrc.dir="@{gensrc.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   421
                    classes.dir="@{classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   422
                    lib.dir="@{lib.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   423
                    includes="@{includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   424
                    excludes="@{excludes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   425
                    jarmainclass="@{jarmainclass}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   426
                    jarclasspath="@{jarclasspath}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   427
                    release="@{release}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   428
                    full.version="@{full.version}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   429
                    javac.bootclasspath="@{javac.bootclasspath}"
2982
090c71af18f6 6827026: Change javac source and target default to 7
jjg
parents: 2212
diff changeset
   430
                    javac.source="@{javac.source}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   431
                    javac.target="@{javac.target}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   432
                />
06bc494ca11e Initial load
duke
parents:
diff changeset
   433
                <mkdir dir="@{bin.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   434
                <copy file="${src.bin.dir}/launcher.sh-template" tofile="@{bin.dir}/@{name}">
06bc494ca11e Initial load
duke
parents:
diff changeset
   435
                    <filterset begintoken="#" endtoken="#">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   436
                        <filter token="PROGRAM" value="@{name}"/>
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   437
                        <filter token="TARGET_JAVA" value="@{java}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   438
                    </filterset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   439
                </copy>
06bc494ca11e Initial load
duke
parents:
diff changeset
   440
                <chmod file="@{bin.dir}/@{name}" perm="ugo+rx"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   441
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   442
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   443
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   444
06bc494ca11e Initial load
duke
parents:
diff changeset
   445
    <target name="-def-build-jar" depends="-def-build-classes">
06bc494ca11e Initial load
duke
parents:
diff changeset
   446
        <macrodef name="build-jar">
06bc494ca11e Initial load
duke
parents:
diff changeset
   447
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   448
            <attribute name="includes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   449
            <attribute name="excludes" default="**/package-info.java"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   450
            <attribute name="classes.dir" default="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   451
            <attribute name="gensrc.dir" default="${build.gensrc.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   452
            <attribute name="lib.dir" default="${dist.lib.dir}"/>
3564
2db7ecd6bcd6 6870591: langtools build sets javac.bootclasspath incorrectly
jjg
parents: 2988
diff changeset
   453
            <attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/>
1871
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   454
            <attribute name="javac.java.home" default="${boot.java.home}"/>
2982
090c71af18f6 6827026: Change javac source and target default to 7
jjg
parents: 2212
diff changeset
   455
            <attribute name="javac.source" default="${javac.source}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   456
            <attribute name="javac.target" default="${javac.target}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   457
            <attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   458
            <attribute name="jarclasspath" default=""/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   459
            <attribute name="release" default="${release}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   460
            <attribute name="full.version" default="${full.version}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   461
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   462
                <build-classes
06bc494ca11e Initial load
duke
parents:
diff changeset
   463
                    name="@{name}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   464
                    gensrc.dir="@{gensrc.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   465
                    classes.dir="@{classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   466
                    includes="@{includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   467
                    excludes="@{excludes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   468
                    release="@{release}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   469
                    full.version="@{full.version}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   470
                    javac.bootclasspath="@{javac.bootclasspath}"
2982
090c71af18f6 6827026: Change javac source and target default to 7
jjg
parents: 2212
diff changeset
   471
                    javac.source="@{javac.source}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   472
                    javac.target="@{javac.target}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   473
                />
06bc494ca11e Initial load
duke
parents:
diff changeset
   474
                <mkdir dir="@{lib.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   475
                <jar destfile="@{lib.dir}/@{name}.jar"
06bc494ca11e Initial load
duke
parents:
diff changeset
   476
                     basedir="@{classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   477
                     includes="@{includes}">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   478
                    <manifest>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   479
                        <attribute name="Main-Class" value="@{jarmainclass}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   480
                        <attribute name="Class-Path" value="@{jarclasspath}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   481
                    </manifest>
06bc494ca11e Initial load
duke
parents:
diff changeset
   482
                </jar>
06bc494ca11e Initial load
duke
parents:
diff changeset
   483
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   484
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   485
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   486
06bc494ca11e Initial load
duke
parents:
diff changeset
   487
    <target name="-def-build-classes" depends="-def-pcompile">
06bc494ca11e Initial load
duke
parents:
diff changeset
   488
        <macrodef name="build-classes">
06bc494ca11e Initial load
duke
parents:
diff changeset
   489
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   490
            <attribute name="includes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   491
            <attribute name="excludes" default="**/package-info.java"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   492
            <attribute name="classes.dir" default="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   493
            <attribute name="gensrc.dir" default="${build.gensrc.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   494
            <attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/>
1871
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   495
            <attribute name="javac.java.home" default="${boot.java.home}"/>
2982
090c71af18f6 6827026: Change javac source and target default to 7
jjg
parents: 2212
diff changeset
   496
            <attribute name="javac.source" default="${javac.source}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   497
            <attribute name="javac.target" default="${javac.target}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   498
            <attribute name="release" default="${release}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   499
            <attribute name="full.version" default="${full.version}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   500
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   501
                <mkdir dir="@{gensrc.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   502
                <mkdir dir="@{classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   503
                <pcompile srcdir="${src.classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   504
                          destdir="@{gensrc.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   505
                          includes="@{includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   506
                <copy todir="@{gensrc.dir}">
727
cb50c1ae7bab 4075303: Use javap to enquire aboput a specific inner class
jjg
parents: 10
diff changeset
   507
                    <fileset dir="${src.classes.dir}" includes="@{includes}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   508
                    <globmapper from="*.properties-template" to="*.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   509
                    <filterset begintoken="$(" endtoken=")">
06bc494ca11e Initial load
duke
parents:
diff changeset
   510
                        <filter token="JDK_VERSION" value="${jdk.version}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   511
                        <filter token="RELEASE" value="@{release}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   512
                        <filter token="FULL_VERSION" value="@{full.version}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   513
                    </filterset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   514
                </copy>
06bc494ca11e Initial load
duke
parents:
diff changeset
   515
                <pcompile srcdir="@{gensrc.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   516
                          destdir="@{gensrc.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   517
                          includes="**/*.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   518
                <javac fork="true"
1871
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   519
                       executable="@{javac.java.home}/bin/javac"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   520
                       srcdir="@{gensrc.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   521
                       destdir="@{classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   522
                       includes="@{includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   523
                       sourcepath=""
06bc494ca11e Initial load
duke
parents:
diff changeset
   524
                       includeAntRuntime="no"
2982
090c71af18f6 6827026: Change javac source and target default to 7
jjg
parents: 2212
diff changeset
   525
                       source="@{javac.source}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   526
                       target="@{javac.target}">
06bc494ca11e Initial load
duke
parents:
diff changeset
   527
                    <compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   528
                    <compilerarg line="${javac.version.opt}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   529
                    <compilerarg line="-Xlint"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   530
                </javac>
06bc494ca11e Initial load
duke
parents:
diff changeset
   531
                <javac fork="true"
1871
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   532
                       executable="@{javac.java.home}/bin/javac"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   533
                       srcdir="${src.classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   534
                       destdir="@{classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   535
                       includes="@{includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   536
                       excludes="@{excludes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   537
                       sourcepath=""
06bc494ca11e Initial load
duke
parents:
diff changeset
   538
                       includeAntRuntime="no"
2982
090c71af18f6 6827026: Change javac source and target default to 7
jjg
parents: 2212
diff changeset
   539
                       source="@{javac.source}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   540
                       target="@{javac.target}"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   541
                       debug="${javac.debug}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   542
                       debuglevel="${javac.debuglevel}">
06bc494ca11e Initial load
duke
parents:
diff changeset
   543
                    <compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   544
                    <compilerarg value="-Xbootclasspath/p:@{classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   545
                    <compilerarg line="${javac.no.jdk.warnings}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   546
                    <compilerarg line="${javac.version.opt}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   547
                    <compilerarg line="${javac.lint.opts}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   548
                </javac>
06bc494ca11e Initial load
duke
parents:
diff changeset
   549
                <copy todir="@{classes.dir}">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   550
                    <fileset dir="${src.classes.dir}">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   551
                        <include name="@{includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   552
                        <exclude name="**/*.java"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   553
                        <exclude name="**/*.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   554
                        <exclude name="**/*-template"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   555
                        <exclude name="**/package.html"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   556
                    </fileset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   557
                </copy>
06bc494ca11e Initial load
duke
parents:
diff changeset
   558
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   559
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   560
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   561
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   562
    <target name="-def-build-bootstrap-tool" depends="-check-boot.java.home,-def-build-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   563
        <presetdef name="build-bootstrap-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   564
            <build-tool
2982
090c71af18f6 6827026: Change javac source and target default to 7
jjg
parents: 2212
diff changeset
   565
                javac.source="${boot.javac.source}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   566
                javac.target="${boot.javac.target}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   567
                gensrc.dir="${build.bootstrap.dir}/gensrc"
06bc494ca11e Initial load
duke
parents:
diff changeset
   568
                classes.dir="${build.bootstrap.dir}/classes"
06bc494ca11e Initial load
duke
parents:
diff changeset
   569
                bin.dir="${build.bootstrap.dir}/bin"
06bc494ca11e Initial load
duke
parents:
diff changeset
   570
                lib.dir="${build.bootstrap.dir}/lib"
1872
9820a8bee1e5 6796965: dev-time wrapper script for javac broken
jjg
parents: 1871
diff changeset
   571
                java="${boot.java}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   572
                javac.bootclasspath=""
06bc494ca11e Initial load
duke
parents:
diff changeset
   573
                release="${bootstrap.release}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   574
                full.version="${bootstrap.full.version}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   575
        </presetdef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   576
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   577
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   578
    <target name="-def-build-bootstrap-jar" depends="-def-build-jar">
06bc494ca11e Initial load
duke
parents:
diff changeset
   579
        <presetdef name="build-bootstrap-jar">
06bc494ca11e Initial load
duke
parents:
diff changeset
   580
            <build-jar
2982
090c71af18f6 6827026: Change javac source and target default to 7
jjg
parents: 2212
diff changeset
   581
                javac.source="${boot.javac.source}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   582
                javac.target="${boot.javac.target}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   583
                gensrc.dir="${build.bootstrap.dir}/gensrc"
06bc494ca11e Initial load
duke
parents:
diff changeset
   584
                classes.dir="${build.bootstrap.dir}/classes"
06bc494ca11e Initial load
duke
parents:
diff changeset
   585
                lib.dir="${build.bootstrap.dir}/lib"
06bc494ca11e Initial load
duke
parents:
diff changeset
   586
                javac.bootclasspath=""
06bc494ca11e Initial load
duke
parents:
diff changeset
   587
                release="${bootstrap.release}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   588
                full.version="${bootstrap.full.version}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   589
        </presetdef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   590
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   591
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   592
    <target name="-def-pcompile">
06bc494ca11e Initial load
duke
parents:
diff changeset
   593
        <mkdir dir="${build.toolclasses.dir}"/>
1871
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   594
        <javac fork="true"
3658
8ee720a52b7d 6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents: 3655
diff changeset
   595
               source="${boot.javac.source}"
8ee720a52b7d 6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents: 3655
diff changeset
   596
               target="${boot.javac.target}"
1871
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   597
               executable="${boot.java.home}/bin/javac"
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   598
               srcdir="${make.tools.dir}/CompileProperties"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   599
               destdir="${build.toolclasses.dir}/"
06bc494ca11e Initial load
duke
parents:
diff changeset
   600
               classpath="${ant.home}/lib/ant.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   601
        <taskdef name="pcompile"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   602
                 classname="CompilePropertiesTask"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   603
                 classpath="${build.toolclasses.dir}/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   604
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   605
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   606
    <target name="-def-javadoc-tool" depends="-check-target.java.home">
06bc494ca11e Initial load
duke
parents:
diff changeset
   607
        <macrodef name="javadoc-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   608
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   609
            <attribute name="includes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   610
            <attribute name="options" default=""/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   611
            <attribute name="source" default="1.5"/> <!-- FIXME -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   612
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   613
                <property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   614
                <!-- Note: even with this default value, includes
06bc494ca11e Initial load
duke
parents:
diff changeset
   615
         from src.classes.dir get javadoc'd; see packageset below -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   616
                <property name="javadoc.packagenames" value="none"/> <!-- default, can be overridden per user or per project -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   617
                <javadoc
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   618
                    executable="${target.java.home}/bin/javadoc"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   619
                    destdir="${build.javadoc.dir}/@{name}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   620
                    source="@{source}"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   621
                    windowtitle="UNOFFICIAL"
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   622
                    failonerror="true"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   623
                    use="true"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   624
                    author="false"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   625
                    version="false"
06bc494ca11e Initial load
duke
parents:
diff changeset
   626
                    packagenames="${javadoc.packagenames}" >
06bc494ca11e Initial load
duke
parents:
diff changeset
   627
                    <header><![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></header>
06bc494ca11e Initial load
duke
parents:
diff changeset
   628
                    <arg line="@{options}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   629
                    <bootclasspath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   630
                        <path location="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   631
                        <path location="${target.java.home}/jre/lib/rt.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   632
                    </bootclasspath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   633
                    <sourcepath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   634
                        <pathelement location="${src.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   635
                    </sourcepath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   636
                    <!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   637
                    <!-- means that {@link some.package} will not work, which is no good. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   638
                    <!-- (It correctly skips excluded single classes, but not if packageset is also included, -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   639
                    <!-- which also causes duplicates in the class index for included files.) -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   640
                    <packageset dir="${src.classes.dir}" includes="@{includes}">
06bc494ca11e Initial load
duke
parents:
diff changeset
   641
                        <or>
06bc494ca11e Initial load
duke
parents:
diff changeset
   642
                            <filename name="java/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   643
                            <filename name="javax/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   644
                            <filename name="com/sun/javadoc/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   645
                            <filename name="com/sun/mirror/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   646
                            <filename name="com/sun/source/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   647
                        </or>
06bc494ca11e Initial load
duke
parents:
diff changeset
   648
                    </packageset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   649
                </javadoc>
06bc494ca11e Initial load
duke
parents:
diff changeset
   650
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   651
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   652
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   653
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   654
    <target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home,-check-target.java.home">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   655
        <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant">
06bc494ca11e Initial load
duke
parents:
diff changeset
   656
            <classpath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   657
                <pathelement location="${jtreg.home}/lib/jtreg.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   658
                <pathelement location="${jtreg.home}/lib/javatest.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   659
            </classpath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   660
        </taskdef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   661
        <macrodef name="jtreg-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   662
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   663
            <attribute name="tests"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   664
            <attribute name="jdk" default="${target.java.home}"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   665
            <attribute name="samevm" default="true"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   666
            <attribute name="verbose" default="summary"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   667
            <attribute name="options" default=""/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   668
            <attribute name="keywords" default="-keywords:!ignore"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   669
            <attribute name="jpda.jvmargs" default=""/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   670
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   671
                <property name="coverage.options" value=""/>    <!-- default -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   672
                <property name="coverage.classpath" value=""/>    <!-- default -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   673
                <jtreg
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   674
                    dir="${test.dir}"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   675
                    workDir="${build.jtreg.dir}/@{name}/work"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   676
                    reportDir="${build.jtreg.dir}/@{name}/report"
06bc494ca11e Initial load
duke
parents:
diff changeset
   677
                    jdk="@{jdk}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   678
                    samevm="@{samevm}" verbose="@{verbose}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   679
                    failonerror="false" resultproperty="jtreg.@{name}.result"
06bc494ca11e Initial load
duke
parents:
diff changeset
   680
                    javacoptions="-g"
06bc494ca11e Initial load
duke
parents:
diff changeset
   681
                    vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}:${build.classes.dir} @{jpda.jvmargs}">
06bc494ca11e Initial load
duke
parents:
diff changeset
   682
                    <arg line="@{keywords}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   683
                    <arg line="@{options}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   684
                    <arg line="@{tests}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   685
                </jtreg>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   686
                <!-- the next two properties are for convenience, when only
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   687
                     a single instance of jtreg will be invoked. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   688
                <condition property="jtreg.passed">
1873
658385834998 6795365: NetBeans projects in langtools repository are not NB6.5-friendly
jjg
parents: 1872
diff changeset
   689
                    <equals arg1="${jtreg.@{name}.result}" arg2="0"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   690
                </condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   691
                <property name="jtreg.report" value="${build.jtreg.dir}/@{name}/report"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   692
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   693
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   694
        <property name="jtreg.defined" value="true"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   695
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   696
06bc494ca11e Initial load
duke
parents:
diff changeset
   697
    <target name="-def-cobertura" depends="-check-cobertura.home">
06bc494ca11e Initial load
duke
parents:
diff changeset
   698
        <path id="cobertura.classpath">
06bc494ca11e Initial load
duke
parents:
diff changeset
   699
            <fileset dir="${cobertura.home}">
06bc494ca11e Initial load
duke
parents:
diff changeset
   700
                <include name="cobertura.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   701
                <include name="lib/**/*.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   702
            </fileset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   703
        </path>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   704
        <taskdef classpathref="cobertura.classpath" resource="tasks.properties"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   705
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   706
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   707
    <target name="-def-findbugs" unless="findbugs.defined" depends="-check-findbugs.home">
06bc494ca11e Initial load
duke
parents:
diff changeset
   708
        <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
06bc494ca11e Initial load
duke
parents:
diff changeset
   709
            <classpath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   710
                <pathelement location="${findbugs.home}/lib/findbugs.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   711
            </classpath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   712
        </taskdef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   713
        <macrodef name="findbugs-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   714
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   715
            <attribute name="output" default="emacs"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   716
            <attribute name="outputFile" default=""/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   717
            <attribute name="reportLevel" default="high"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   718
            <sequential>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   719
                <findbugs
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   720
                    home="${findbugs.home}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   721
                    output="@{output}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   722
                    outputFile="@{outputFile}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   723
                    reportLevel="@{reportLevel}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   724
                    failOnError="false"
06bc494ca11e Initial load
duke
parents:
diff changeset
   725
                    errorProperty="findbugs.@{name}.errors"
06bc494ca11e Initial load
duke
parents:
diff changeset
   726
                    warningsProperty="findbugs.@{name}.warnings"
06bc494ca11e Initial load
duke
parents:
diff changeset
   727
                    jvmargs="-Xmx512M" >
06bc494ca11e Initial load
duke
parents:
diff changeset
   728
                    <class location="${dist.dir}/lib/@{name}.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   729
                    <auxClasspath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   730
                        <pathelement location="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   731
                    </auxClasspath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   732
                    <sourcePath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   733
                        <pathelement location="${src.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   734
                    </sourcePath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   735
                </findbugs>
06bc494ca11e Initial load
duke
parents:
diff changeset
   736
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   737
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   738
        <property name="findbugs.defined" value="true"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   739
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   740
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   741
    <target name="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   742
        <macrodef name="check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   743
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   744
            <attribute name="property"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   745
            <attribute name="marker"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   746
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   747
                <fail message="Cannot locate @{name}: please set @{property} to its location">
06bc494ca11e Initial load
duke
parents:
diff changeset
   748
                    <condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   749
                        <not>
06bc494ca11e Initial load
duke
parents:
diff changeset
   750
                            <isset property="@{property}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   751
                        </not>
06bc494ca11e Initial load
duke
parents:
diff changeset
   752
                    </condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   753
                </fail>
06bc494ca11e Initial load
duke
parents:
diff changeset
   754
                <fail message="@{name} is not installed in ${@{property}}">
06bc494ca11e Initial load
duke
parents:
diff changeset
   755
                    <condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   756
                        <not>
06bc494ca11e Initial load
duke
parents:
diff changeset
   757
                            <available file="${@{property}}/@{marker}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   758
                        </not>
06bc494ca11e Initial load
duke
parents:
diff changeset
   759
                    </condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   760
                </fail>
06bc494ca11e Initial load
duke
parents:
diff changeset
   761
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   762
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   763
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   764
06bc494ca11e Initial load
duke
parents:
diff changeset
   765
    <!-- standard JDK target -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   766
    <target name="sanity"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   767
        description="display settings of congiguration values">
06bc494ca11e Initial load
duke
parents:
diff changeset
   768
        <echo level="info">ant.home = ${ant.home}</echo>
06bc494ca11e Initial load
duke
parents:
diff changeset
   769
        <echo level="info">boot.java.home = ${boot.java.home}</echo>
06bc494ca11e Initial load
duke
parents:
diff changeset
   770
        <echo level="info">target.java.home = ${target.java.home}</echo>
06bc494ca11e Initial load
duke
parents:
diff changeset
   771
        <echo level="info">jtreg.home = ${jtreg.home}</echo>
06bc494ca11e Initial load
duke
parents:
diff changeset
   772
        <echo level="info">findbugs.home = ${findbugs.home}</echo>
06bc494ca11e Initial load
duke
parents:
diff changeset
   773
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   774
06bc494ca11e Initial load
duke
parents:
diff changeset
   775
    <!-- useful debugging targets -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   776
    <target name="diagnostics">
06bc494ca11e Initial load
duke
parents:
diff changeset
   777
        <diagnostics/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   778
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   779
06bc494ca11e Initial load
duke
parents:
diff changeset
   780
    <target name="post-sanity" depends="-def-jtreg,sanity,build"
06bc494ca11e Initial load
duke
parents:
diff changeset
   781
        description="perform basic validation after a standard build">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   782
        <jtreg
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   783
            dir="make/test"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   784
            workDir="${build.jtreg.dir}/post-sanity/work"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   785
            reportDir="${build.jtreg.dir}/post-sanity/report"
06bc494ca11e Initial load
duke
parents:
diff changeset
   786
            jdk="${target.java.home}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   787
            verbose="summary"
06bc494ca11e Initial load
duke
parents:
diff changeset
   788
            failonerror="false" resultproperty="jtreg.post-sanity.result">
06bc494ca11e Initial load
duke
parents:
diff changeset
   789
        </jtreg>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   790
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   791
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   792
</project>
06bc494ca11e Initial load
duke
parents:
diff changeset
   793