langtools/make/build.xml
author jjh
Tue, 21 Dec 2010 16:29:10 -0800
changeset 7843 1103fac3fb5a
parent 6599 ec0419c70f24
child 7845 85446adf08d8
permissions -rw-r--r--
7008378: javac bootstrap launcher fails on cygwin when called via an absolute path Summary: Use cygpath if it is cygwin Reviewed-by: ksrini
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
<!--
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 4698
diff changeset
     3
 Copyright (c) 2007, 2009, Oracle and/or its affiliates. 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
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 4698
diff changeset
     8
 published by the Free Software Foundation.  Oracle designates this
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
 particular file as subject to the "Classpath" exception as provided
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 4698
diff changeset
    10
 by Oracle in the LICENSE file that accompanied this code.
10
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
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 4698
diff changeset
    22
 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 4698
diff changeset
    23
 or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 4698
diff changeset
    24
 questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
-->
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
<!--
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    28
 This is the main build file for the complete langtools repository.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    29
 It is used when building JDK (in which case it is invoked from the
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    30
 Makefile), and it can be used when working on the tools themselves,
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    31
 in an IDE such as NetBeans.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    32
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    33
 External dependencies are specified via properties. These can be given
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    34
 on the command line, or by providing a local build.properties file.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    35
 (They can also be edited into make/build.properties, although that is not
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    36
 recommended.)  At a minimum, boot.java.home must be set to the installed
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    37
 location of the version of JDK used to build this repository. Additional
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    38
 properties may be required, depending on the targets that are built.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    39
 For example, to run any of the jtreg tests you must set jtreg.home,
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    40
 to run findbugs on the code you must set findbugs.home, and so on.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    41
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    42
 For the most part, javac can be built using the previous version of JDK.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    43
 However, a small number of javac files require access to the latest JDK,
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    44
 which may not yet have been compiled. To compile these files, you can do
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    45
 one of the following:
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    46
 - Set boot.java.home to a recent build of the latest version of JDK.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    47
 - Set import.jdk to either a recent build (containing jre/lib/rt.jar)
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    48
   or to jdk source repository.  In the latter case, stub files will
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    49
   automatically be generated and used for the required API, to avoid
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    50
   unnecessary compilation of the source repository.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    51
 If you do neither, the relevant files will not be built.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    52
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    53
 The main build happens in two phases:
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    54
 - First, javac and other tools as needed are built using ${boot.java.home}.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    55
   (This implies a constraint on the source code that they can be compiled
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    56
   with the previous version of JDK.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    57
 - Second, all required classes are compiled with the latest javac, created
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    58
   in the previous step.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    59
 The first phase is called the bootstrap phase. All targets, properties and
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    60
 tasks that are specific to that phase have "bootstrap" in their name.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    61
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    62
 For more details on the JDK build, see
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    63
    http://blogs.sun.com/kto/entry/anatomy_of_the_jdk_build
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    64
    http://openjdk.java.net/groups/build/
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    65
 For more details on the stub generator, see
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    66
    http://blogs.sun.com/jjg/entry/building_javac_for_jdk7
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    67
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    68
 Internal details ...
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    69
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    70
 Interim build products are created in the build/ directory.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    71
 Final build products are created in the dist/ directory.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    72
 When building JDK, the dist/directory will contain:
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    73
 - A bootstrap compiler suitable for running with ${boot.java.home}
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    74
   suitable for compiling downstream parts of JDK
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    75
 - Source files and class files for inclusion in the JDK being built
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    76
 When building standalone, the dist/directory will contain:
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    77
 - Separate jar files for each of the separate langtools components
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    78
 - Simple scripts to invoke the tools by executing the corresponding
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    79
   jar files.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    80
 These jar files and scripts are "for developer use only".
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    81
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    82
 This file is organized into sections as follows:
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    83
 - global property definitions
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    84
 - general top level targets
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    85
 - general diagnostic/debugging targets
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    86
 - groups of targets for each tool: javac, javadoc, doclets, javah, javap, apt
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    87
    Within each group, the following targets are provided, where applicable
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    88
      build-bootstrap-TOOL      build the bootstrap version of the tool
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    89
      build-classes-TOOL        build the classes for the tool
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    90
      build-TOOL                build the jar file and script for the tool
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    91
      jtreg-TOOL                build the tool and run the appropriate tests
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    92
      findbugs-TOOL             run findbugs on the tool's source oode
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    93
      TOOL                      build the tool, run the tests, and run findbugs
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    94
 - utility definitions
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
 -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
<project name="langtools" default="build" basedir="..">
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    98
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    99
    **** Global property definitions.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   100
    -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   101
2850
307d7719ccb7 6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents: 2212
diff changeset
   102
    <!-- 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
   103
    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
   104
    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
   105
    <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
   106
        <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
   107
    </condition>
307d7719ccb7 6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents: 2212
diff changeset
   108
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
    <!-- The following locations can be used to override default property values. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
    <!-- Use this location for customizations specific to this instance of this workspace -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
    <property file="build.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
    <!-- Use this location for customizations common to all OpenJDK langtools workspaces -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
    <property file="${user.home}/.openjdk/${ant.project.name}-build.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
    <!-- Use this location for customizations common to all OpenJDK workspaces -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
    <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
   119
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   120
    <!-- Convenient shorthands for standard locations within the workspace. -->
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
    <property name="build.dir" location="build"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
    <property name="build.bootstrap.dir" location="${build.dir}/bootstrap"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
    <property name="build.coverage.dir" location="${build.dir}/coverage"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
    <property name="build.classes.dir" location="${build.dir}/classes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
    <property name="build.gensrc.dir" location="${build.dir}/gensrc"/>
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   126
    <property name="build.genstubs.dir" location="${build.dir}/genstubs"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
    <property name="build.javadoc.dir" location="${build.dir}/javadoc"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
    <property name="build.jtreg.dir" location="${build.dir}/jtreg"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
    <property name="build.toolclasses.dir" location="${build.dir}/toolclasses"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
    <property name="dist.dir" location="dist"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
    <property name="dist.bin.dir" location="${dist.dir}/bin"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
    <property name="dist.coverage.dir" location="${dist.dir}/coverage"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
    <property name="dist.findbugs.dir" location="${dist.dir}/findbugs"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
    <property name="dist.lib.dir" location="${dist.dir}/lib"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
    <property name="make.dir" location="make"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
    <property name="make.tools.dir" location="${make.dir}/tools"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
    <property name="src.dir" location="src"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
    <property name="src.bin.dir" location="${src.dir}/share/bin"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
    <property name="src.classes.dir" location="${src.dir}/share/classes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
    <property name="test.dir" location="test"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
    <!-- java.marker is set to a marker file to check for within a Java install dir.
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
         The best file to check for across Solaris/Linux/Windows/MacOS is one of the
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
         executables; regrettably, that is OS-specific. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
    <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
   146
        <os family="unix"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
    </condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
    <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
   149
        <os family="windows"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
    </condition>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   151
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
    <!-- 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
   153
    <property file="${make.dir}/build.properties"/>
3654
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
   154
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
   155
    <!-- 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
   156
        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
   157
        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
   158
        quietly default to simply use "java". -->
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   159
    <condition property="launcher.java"
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   160
        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
   161
        <isset property="target.java.home"/>
3654
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
   162
    </condition>
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
   163
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   164
    <!-- Logic for handling access import jdk classes, if available.
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   165
        import.jdk should be unset, or set to jdk home (to use rt.jar)
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   166
        or to jdk repo (to use src/share/classes).
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   167
        Based on the value, if any, set up default values for javac's sourcepath,
4548
bc0d5b3c3b2d 6906175: bridge JSR199 and JSR 203 APIs
jjg
parents: 4415
diff changeset
   168
        classpath and bootclasspath. Note: the default values are overridden
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   169
        in the build-bootstrap-classes macro. -->
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   170
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   171
    <available property="import.jdk.src.dir" value="${import.jdk}/src/share/classes"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   172
        filepath="${import.jdk}/src/share/classes" file="java/nio/file/Path.java"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   173
    <available property="import.jdk.jar" value="${import.jdk}/jre/lib/rt.jar"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   174
        ignoresystemclasses="true"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   175
        classpath="${import.jdk}/jre/lib/rt.jar" classname="java.nio.file.Path"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   176
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   177
    <!-- Set the default bootclasspath option used for javac.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   178
        Note that different variants of the option are used, meaning we can't just
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   179
        define the value for the option.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   180
        Note the explicit use of the standard property ${path.separator} in the following.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   181
        This is because Ant is not clever enough to handle direct use of : or ; -->
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   182
    <condition property="javac.bootclasspath.opt"
4698
4ea5b8e20252 6915152: langtools build failures with import.jdk on Windows
jjg
parents: 4548
diff changeset
   183
            value="-Xbootclasspath:${build.classes.dir}${path.separator}${import.jdk.jar}"
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   184
            else="-Xbootclasspath/p:${build.classes.dir}">
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   185
        <isset property="import.jdk.jar"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   186
    </condition>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   187
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   188
    <condition property="boot.java.provides.latest.jdk">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   189
        <available
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   190
            ignoresystemclasses="true"
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   191
            classpath="${boot.java.home}/jre/lib/rt.jar" classname="java.nio.file.Path"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   192
    </condition>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   193
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   194
    <condition property="bootstrap.exclude.files" value="" else="${require.latest.jdk.files}">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   195
        <isset property="boot.java.provides.latest.jdk"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   196
    </condition>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   197
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   198
    <condition property="exclude.files" value="" else="${require.latest.jdk.files}">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   199
        <or>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   200
            <isset property="boot.java.provides.latest.jdk"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   201
            <isset property="import.jdk"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   202
        </or>
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   203
    </condition>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   204
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   205
    <condition property="require.import.jdk.stubs">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   206
        <and>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   207
            <not>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   208
                <isset property="boot.java.provides.latest.jdk"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   209
            </not>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   210
            <isset property="import.jdk.src.dir"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   211
        </and>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   212
    </condition>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   213
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   214
    <!-- Set the default value of the sourcepath used for javac. -->
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   215
    <condition property="javac.sourcepath" value="${build.genstubs.dir}" else="">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   216
        <isset property="require.import.jdk.stubs"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   217
    </condition>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   218
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   219
    <!-- Set the default value of the classpath used for javac. -->
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   220
    <property name="javac.classpath" value=""/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   221
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   222
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   223
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   224
    **** General top level targets.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   225
    -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   226
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
    <!-- Standard target to build deliverables for JDK build. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
    <target name="build" depends="build-bootstrap-tools,build-all-classes">
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
        <copy todir="${dist.dir}/bootstrap">
06bc494ca11e Initial load
duke
parents:
diff changeset
   231
            <fileset dir="${build.bootstrap.dir}" includes="bin/,lib/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
        </copy>
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
        <chmod dir="${dist.dir}/bootstrap/bin" perm="ugo+rx">
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
            <include name="*"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
        </chmod>
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
        <mkdir dir="${dist.lib.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
        <jar file="${dist.lib.dir}/classes.jar" basedir="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
        <zip file="${dist.lib.dir}/src.zip" basedir="${src.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   240
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   241
    <target name="build-bootstrap-tools"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   242
        depends="build-bootstrap-javac,build-bootstrap-javadoc,build-bootstrap-doclets,build-bootstrap-javah"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   243
    />
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   244
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   245
    <target name="build-all-tools"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   246
        depends="build-javac,build-javadoc,build-doclets,build-javah,build-javap,build-apt"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   247
    />
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   248
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   249
    <target name="build-all-classes" depends="build-bootstrap-javac,-create-import-jdk-stubs">
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   250
        <build-classes includes="${javac.includes} ${javadoc.includes} ${doclets.includes} ${javah.includes} ${javap.includes} ${apt.includes}"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   251
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   252
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
    <!-- clean -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
    <target name="clean" description="Delete all generated files">
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
        <delete dir="${build.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
        <delete dir="${dist.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
06bc494ca11e Initial load
duke
parents:
diff changeset
   260
    <!-- Additional targets for running tools on the build -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   261
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   262
    <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
   263
        <jtreg-tool name="all" tests="${jtreg.tests}"/>
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   264
    </target>
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   265
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
    <target name="findbugs" depends="-def-findbugs,build-all-tools">
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
        <property name="findbugs.reportLevel" value="medium"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
        <mkdir dir="${dist.findbugs.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   269
        <findbugs
06bc494ca11e Initial load
duke
parents:
diff changeset
   270
            home="${findbugs.home}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
            projectName="JDK langtools ${full.version}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   272
            output="xml"
06bc494ca11e Initial load
duke
parents:
diff changeset
   273
            outputFile="${dist.findbugs.dir}/findbugs.xml"
06bc494ca11e Initial load
duke
parents:
diff changeset
   274
            reportLevel="${findbugs.reportLevel}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   275
            failOnError="false"
06bc494ca11e Initial load
duke
parents:
diff changeset
   276
            errorProperty="findbugs.all.errors"
06bc494ca11e Initial load
duke
parents:
diff changeset
   277
            warningsProperty="findbugs.all.warnings"
6599
ec0419c70f24 6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents: 6598
diff changeset
   278
            jvm="${target.java.home}/bin/java"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
            jvmargs="-Xmx512M">
06bc494ca11e Initial load
duke
parents:
diff changeset
   280
            <class location="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   281
            <sourcePath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   282
                <pathelement location="${src.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   283
            </sourcePath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   284
        </findbugs>
06bc494ca11e Initial load
duke
parents:
diff changeset
   285
        <exec executable="sh">
06bc494ca11e Initial load
duke
parents:
diff changeset
   286
            <arg value="${findbugs.home}/bin/convertXmlToText"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   287
            <arg value="-longBugCodes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   288
            <arg value="-html:${findbugs.home}/src/xsl/fancy.xsl"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   289
            <arg value="${dist.findbugs.dir}/findbugs.xml"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   290
            <redirector output="${dist.findbugs.dir}/findbugs.html"/>
727
cb50c1ae7bab 4075303: Use javap to enquire aboput a specific inner class
jjg
parents: 10
diff changeset
   291
        </exec>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   292
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   293
06bc494ca11e Initial load
duke
parents:
diff changeset
   294
    <target name="coverage" depends="-def-cobertura,build-all-classes,instrument-classes,jtreg,coverage-report"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   295
06bc494ca11e Initial load
duke
parents:
diff changeset
   296
    <target name="instrument-classes" depends="-def-cobertura">
06bc494ca11e Initial load
duke
parents:
diff changeset
   297
        <!-- only define the following property when we want coverage info -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   298
        <path id="coverage.classpath">
06bc494ca11e Initial load
duke
parents:
diff changeset
   299
            <pathelement location="${build.coverage.dir}/classes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   300
            <path refid="cobertura.classpath"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   301
        </path>
06bc494ca11e Initial load
duke
parents:
diff changeset
   302
        <property name="coverage.options" value="-Dnet.sourceforge.cobertura.datafile=${build.coverage.dir}/cobertura.ser"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   303
        <property name="coverage.classpath" refid="coverage.classpath"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   304
        <mkdir dir="${build.coverage.dir}/classes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   305
        <delete file="${build.coverage.dir}/cobertura.ser"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   306
        <cobertura-instrument todir="${build.coverage.dir}/classes"
06bc494ca11e Initial load
duke
parents:
diff changeset
   307
            datafile="${build.coverage.dir}/cobertura.ser">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   308
            <fileset dir="${build.classes.dir}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   309
               includes="**/*.class" excludes="**/resources/*.class"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   310
        </cobertura-instrument>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   311
    </target>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   312
06bc494ca11e Initial load
duke
parents:
diff changeset
   313
    <target name="coverage-report" depends="-def-cobertura">
06bc494ca11e Initial load
duke
parents:
diff changeset
   314
        <mkdir dir="${dist.coverage.dir}"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   315
        <cobertura-report
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   316
            srcdir="${src.classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   317
            destdir="${dist.coverage.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   318
            datafile="${build.coverage.dir}/cobertura.ser"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   319
        <cobertura-report
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   320
            format="xml"
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   321
            srcdir="${src.classes.dir}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   322
            destdir="${dist.coverage.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   323
            datafile="${build.coverage.dir}/cobertura.ser"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   324
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   325
6149
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   326
    <target name="diags-examples" depends="build-javac">
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   327
        <!-- can override the following on the command line if desired. -->
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   328
        <property name="diags.examples.out" location="${build.dir}/diag-examples/diags-examples.html"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   329
        <mkdir dir="${build.dir}/diag-examples/classes"/>
7843
1103fac3fb5a 7008378: javac bootstrap launcher fails on cygwin when called via an absolute path
jjh
parents: 6599
diff changeset
   330
<echo message="jj: diags-examples dist.bin.dir ${dist.bin.dir}/javac"/>
6149
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   331
        <javac fork="true"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   332
            executable="${dist.bin.dir}/javac"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   333
            srcdir="test/tools/javac/diags"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   334
            destdir="${build.dir}/diag-examples/classes"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   335
            includes="Example.java,FileManager.java,HTMLWriter.java,RunExamples.java"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   336
            sourcepath=""
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   337
            classpath="${dist.lib.dir}/javac.jar"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   338
            includeAntRuntime="no"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   339
            debug="${javac.debug}"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   340
            debuglevel="${javac.debuglevel}"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   341
        <java fork="true"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   342
            jvm="${target.java.home}/bin/java"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   343
            dir="test/tools/javac/diags"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   344
            classpath="${build.dir}/diag-examples/classes;${dist.lib.dir}/javac.jar"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   345
            classname="RunExamples">
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   346
            <arg value="-examples"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   347
            <arg value="examples"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   348
            <arg value="-o"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   349
            <arg file="${diags.examples.out}"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   350
            <arg value="-showFiles"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   351
            <arg value="-title"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   352
            <arg value="Examples of javac diagnostics"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   353
        </java>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   354
    </target>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   355
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   356
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   357
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   358
    **** Debugging/diagnostic targets.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   359
    -->
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   360
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   361
    <!-- standard JDK target -->
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   362
    <target name="sanity"
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   363
        description="display settings of configuration values">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   364
        <echo level="info">ant.home = ${ant.home}</echo>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   365
        <echo level="info">boot.java.home = ${boot.java.home}</echo>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   366
        <echo level="info">target.java.home = ${target.java.home}</echo>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   367
        <echo level="info">jtreg.home = ${jtreg.home}</echo>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   368
        <echo level="info">findbugs.home = ${findbugs.home}</echo>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   369
    </target>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   370
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   371
    <target name="post-sanity" depends="-def-jtreg,sanity,build"
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   372
        description="perform basic validation after a standard build">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   373
        <jtreg
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   374
            dir="make/test"
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   375
            workDir="${build.jtreg.dir}/post-sanity/work"
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   376
            reportDir="${build.jtreg.dir}/post-sanity/report"
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   377
            jdk="${target.java.home}"
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   378
            verbose="summary"
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   379
            failonerror="false" resultproperty="jtreg.post-sanity.result">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   380
        </jtreg>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   381
    </target>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   382
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   383
    <!-- use vizant tool to generate graphical image of this Ant file.-->
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   384
    <target name="vizant" depends="-def-vizant">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   385
        <mkdir dir="${build.dir}"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   386
        <echo message="Generating ${build.dir}/build.dot"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   387
        <vizant antfile="${make.dir}/build.xml" outfile="${build.dir}/build.dot"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   388
        <echo message="Generating ${build.dir}/build.png"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   389
        <exec executable="${dot}" >
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   390
            <arg value="-Tpng"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   391
            <arg value="-o"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   392
            <arg file="${build.dir}/build.png"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   393
            <arg file="${build.dir}/build.dot"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   394
        </exec>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   395
    </target>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   396
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   397
    <target name="check-import.jdk">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   398
        <echo message="import.jdk: ${import.jdk}"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   399
        <echo message="import.jdk.jar: ${import.jdk.jar}"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   400
        <echo message="import.jdk.src.dir: ${import.jdk.src.dir}"/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   401
    </target>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   402
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   403
    <target name="diagnostics">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   404
        <diagnostics/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   405
    </target>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   406
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   407
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   408
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   409
    **** javac targets.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   410
    -->
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   411
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   412
    <target name="build-bootstrap-javac"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   413
            depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool">
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   414
        <build-bootstrap-classes includes="${javac.includes}"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   415
        <build-bootstrap-jar     name="javac" includes="${javac.includes}"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   416
        <build-bootstrap-tool    name="javac"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   417
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   418
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   419
    <target name="build-classes-javac" depends="build-bootstrap-javac,-create-import-jdk-stubs">
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   420
        <build-classes includes="${javac.includes}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   421
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   422
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   423
    <target name="build-javac" depends="build-classes-javac">
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   424
        <build-jar  name="javac" includes="${javac.includes}"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   425
        <build-tool name="javac"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   426
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   427
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   428
    <target name="javadoc-javac" depends="build-javac,-def-javadoc-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   429
        <javadoc-tool name="javac" includes="${javac.includes}" options="${javadoc.jls3.option}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   430
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   431
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   432
    <target name="jtreg-javac" depends="build-javac,build-javap,-def-jtreg">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   433
        <jtreg-tool name="javac" tests="${javac.tests}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   434
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   435
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   436
    <target name="findbugs-javac" depends="build-javac,-def-findbugs">
06bc494ca11e Initial load
duke
parents:
diff changeset
   437
        <findbugs-tool name="javac"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   438
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   439
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   440
    <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
   441
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   442
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   443
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   444
    **** javadoc targets.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   445
    -->
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   446
06bc494ca11e Initial load
duke
parents:
diff changeset
   447
    <target name="build-bootstrap-javadoc" depends="build-bootstrap-javac">
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   448
        <build-bootstrap-classes includes="${javadoc.includes}"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   449
        <build-bootstrap-jar     name="javadoc" includes="${javadoc.includes}"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   450
                                 jarclasspath="javac.jar doclets.jar"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   451
        <build-bootstrap-tool    name="javadoc"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   452
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   453
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   454
    <target name="build-classes-javadoc" depends="build-classes-javac">
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   455
        <build-classes includes="${javadoc.includes}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   456
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   457
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   458
    <target name="build-javadoc" depends="build-javac,build-classes-javadoc">
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   459
        <build-jar  name="javadoc" includes="${javadoc.includes}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   460
                    jarclasspath="javac.jar doclets.jar"/>
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   461
        <build-tool name="javadoc"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   462
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   463
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   464
    <target name="javadoc-javadoc" depends="build-javadoc,-def-javadoc-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   465
        <javadoc-tool name="javadoc" includes="${javadoc.includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   466
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   467
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   468
    <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
   469
        <jtreg-tool name="javadoc" tests="${javadoc.tests}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   470
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   471
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   472
    <target name="findbugs-javadoc" depends="build-javadoc,-def-findbugs">
06bc494ca11e Initial load
duke
parents:
diff changeset
   473
        <findbugs-tool name="javadoc"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   474
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   475
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   476
    <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
   477
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   478
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   479
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   480
    **** doclets targets.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   481
    -->
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   482
06bc494ca11e Initial load
duke
parents:
diff changeset
   483
    <target name="build-bootstrap-doclets" depends="build-bootstrap-javadoc,-def-build-bootstrap-jar">
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   484
        <build-bootstrap-classes includes="${doclets.includes}"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   485
        <build-bootstrap-jar     name="doclets" includes="${doclets.includes}"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   486
                                 jarmainclass="com.sun.tools.javadoc.Main"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   487
                                 jarclasspath="javadoc.jar"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   488
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   489
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   490
    <target name="build-classes-doclets" depends="build-classes-javadoc">
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   491
        <build-classes includes="${doclets.includes}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   492
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   493
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   494
    <target name="build-doclets" depends="build-javadoc,build-classes-doclets">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   495
        <!-- just jar, no bin for doclets -->
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   496
        <build-jar name="doclets" includes="${doclets.includes}" jarclasspath="javadoc.jar"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   497
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   498
06bc494ca11e Initial load
duke
parents:
diff changeset
   499
    <!-- (no javadoc for doclets) -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   500
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   501
    <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
   502
        <jtreg-tool name="doclets" tests="${doclets.tests}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   503
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   504
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   505
    <target name="findbugs-doclets" depends="build-doclets,-def-findbugs">
06bc494ca11e Initial load
duke
parents:
diff changeset
   506
        <findbugs-tool name="doclets"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   507
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   508
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   509
    <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
   510
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   511
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   512
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   513
    **** javah targets.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   514
    -->
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   515
06bc494ca11e Initial load
duke
parents:
diff changeset
   516
    <target name="build-bootstrap-javah" depends="build-bootstrap-javadoc">
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   517
        <build-bootstrap-classes includes="${javah.includes}"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   518
        <build-bootstrap-jar     name="javah" includes="${javah.includes}"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   519
                                 jarclasspath="javadoc.jar doclets.jar javac.jar"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   520
        <build-bootstrap-tool    name="javah"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   521
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   522
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   523
    <target name="build-javah" depends="build-javac,build-classes-javah">
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   524
        <build-jar  name="javah" includes="${javah.includes}" jarclasspath="javac.jar"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   525
        <build-tool name="javah"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   526
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   527
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   528
    <target name="build-classes-javah" depends="build-classes-javadoc">
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   529
        <build-classes includes="${javah.includes}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   530
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   531
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   532
    <!-- (no javadoc for javah) -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   533
06bc494ca11e Initial load
duke
parents:
diff changeset
   534
    <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
   535
        <jtreg-tool name="javah" tests="${javah.tests}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   536
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   537
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   538
    <target name="findbugs-javah" depends="build-javah,-def-findbugs">
06bc494ca11e Initial load
duke
parents:
diff changeset
   539
        <findbugs-tool name="javah"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   540
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   541
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   542
    <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
   543
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   544
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   545
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   546
    **** javap targets.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   547
    -->
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   548
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   549
    <target name="build-bootstrap-javap"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   550
            depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool">
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   551
        <build-bootstrap-classes includes="${javap.includes}"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   552
        <build-bootstrap-jar     name="javap" includes="${javap.includes}"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   553
                                 jarmainclass="sun.tools.javap.Main"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   554
        <build-bootstrap-tool    name="javap"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   555
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   556
727
cb50c1ae7bab 4075303: Use javap to enquire aboput a specific inner class
jjg
parents: 10
diff changeset
   557
    <target name="build-classes-javap" depends="build-classes-javac">
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   558
        <build-classes includes="${javap.includes}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   559
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   560
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   561
    <target name="build-javap" depends="build-javac,build-classes-javap">
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   562
        <build-jar  name="javap" includes="${javap.includes}"
2987
2e0ca9f4893d 6838199: remove support for old javap
jjg
parents: 2982
diff changeset
   563
                    jarmainclass="com.sun.tools.javap.Main"
727
cb50c1ae7bab 4075303: Use javap to enquire aboput a specific inner class
jjg
parents: 10
diff changeset
   564
                    jarclasspath="javac.jar"/>
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   565
        <build-tool name="javap"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   566
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   567
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   568
    <!-- (no javadoc for javap) -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   569
06bc494ca11e Initial load
duke
parents:
diff changeset
   570
    <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
   571
        <jtreg-tool name="javap" tests="${javap.tests}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   572
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   573
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   574
    <target name="findbugs-javap" depends="build-javap,-def-findbugs">
06bc494ca11e Initial load
duke
parents:
diff changeset
   575
        <findbugs-tool name="javap"/>
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="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
   579
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   580
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   581
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   582
    **** apt targets.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   583
    -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   584
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   585
    <target name="build-bootstrap-apt" depends="build-bootstrap-javac">
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   586
        <build-bootstrap-classes includes="${apt.includes}"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   587
        <build-bootstrap-jar     name="apt" includes="${apt.includes}"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   588
                                 jarclasspath="javac.jar"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   589
        <build-bootstrap-tool    name="apt"/>
10
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
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   592
    <target name="build-apt" depends="build-javac,build-classes-apt">
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   593
        <build-jar  name="apt" includes="${apt.includes}" jarclasspath="javac.jar"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   594
        <build-tool name="apt"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   595
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   596
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   597
    <target name="build-classes-apt" depends="build-classes-javac">
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   598
        <build-classes includes="${apt.includes}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   599
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   600
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   601
    <target name="javadoc-apt" depends="build-apt,-def-javadoc-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   602
        <javadoc-tool name="apt" includes="${apt.includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   603
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   604
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="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
   607
        <jtreg-tool name="apt" tests="${apt.tests}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   608
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   609
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   610
    <target name="findbugs-apt" depends="build-apt,-def-findbugs">
06bc494ca11e Initial load
duke
parents:
diff changeset
   611
        <findbugs-tool name="apt"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   612
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   613
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   614
    <target name="apt" depends="build-apt,jtreg-apt,findbugs-apt"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   615
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   616
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   617
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   618
    **** Create import JDK stubs.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   619
    -->
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   620
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   621
    <target name="-create-import-jdk-stubs" depends="-def-genstubs" if="require.import.jdk.stubs">
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   622
        <mkdir dir="${build.genstubs.dir}"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   623
        <genstubs
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   624
            srcdir="${import.jdk.src.dir}" destdir="${build.genstubs.dir}"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   625
            includes="${import.jdk.stub.files}"
6598
5e2fbe244215 6965264: langtools build should use ${ant.core.lib} instead of ${ant.home}/lib/ant.jar
jjg
parents: 6574
diff changeset
   626
            fork="true" classpath="${build.toolclasses.dir}:${build.bootstrap.dir}/classes:${ant.core.lib}"
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   627
        />
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   628
    </target>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   629
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   630
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   631
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   632
    **** Check targets.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   633
    **** "-check-*" targets check that a required property is set, and set to a reasonable value.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   634
    **** A user friendly message is generated if not, and the build exits.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   635
    -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   636
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   637
    <target name="-check-boot.java.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   638
        <check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   639
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   640
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   641
    <target name="-check-target.java.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   642
        <check name="target java" property="target.java.home" marker="${java.marker}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   643
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   644
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   645
    <target name="-check-cobertura.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   646
        <check name="cobertura" property="cobertura.home" marker="cobertura.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   647
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   648
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   649
    <target name="-check-findbugs.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   650
        <check name="findbugs" property="findbugs.home" marker="lib/findbugs.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   651
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   652
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   653
    <target name="-check-jtreg.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   654
        <check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   655
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   656
5844
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   657
    <target name="-check-vizant" depends="-def-check">
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   658
        <check name="vizant" property="vizant.jar"/>
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   659
        <check name="dot" property="dot"/>
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   660
    </target>
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   661
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   662
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   663
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   664
    **** Targets for Ant macro and task definitions.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   665
    -->
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   666
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   667
    <target name="-def-build-tool">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   668
        <macrodef name="build-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   669
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   670
            <attribute name="bin.dir" default="${dist.bin.dir}"/>
3654
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
   671
            <attribute name="java" default="${launcher.java}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   672
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   673
                <mkdir dir="@{bin.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   674
                <copy file="${src.bin.dir}/launcher.sh-template" tofile="@{bin.dir}/@{name}">
06bc494ca11e Initial load
duke
parents:
diff changeset
   675
                    <filterset begintoken="#" endtoken="#">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   676
                        <filter token="PROGRAM" value="@{name}"/>
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   677
                        <filter token="TARGET_JAVA" value="@{java}"/>
6574
7729fe9665a2 6979564: ":" for path separator in dist/bin/javac does not work on Windows
jjg
parents: 6149
diff changeset
   678
                        <filter token="PS" value="${path.separator}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   679
                    </filterset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   680
                </copy>
06bc494ca11e Initial load
duke
parents:
diff changeset
   681
                <chmod file="@{bin.dir}/@{name}" perm="ugo+rx"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   682
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   683
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   684
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   685
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   686
    <target name="-def-build-jar">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   687
        <macrodef name="build-jar">
06bc494ca11e Initial load
duke
parents:
diff changeset
   688
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   689
            <attribute name="includes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   690
            <attribute name="classes.dir" default="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   691
            <attribute name="lib.dir" default="${dist.lib.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   692
            <attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   693
            <attribute name="jarclasspath" default=""/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   694
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   695
                <mkdir dir="@{lib.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   696
                <jar destfile="@{lib.dir}/@{name}.jar"
06bc494ca11e Initial load
duke
parents:
diff changeset
   697
                     basedir="@{classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   698
                     includes="@{includes}">
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   699
                    <manifest>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   700
                        <attribute name="Main-Class" value="@{jarmainclass}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   701
                        <attribute name="Class-Path" value="@{jarclasspath}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   702
                    </manifest>
06bc494ca11e Initial load
duke
parents:
diff changeset
   703
                </jar>
06bc494ca11e Initial load
duke
parents:
diff changeset
   704
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   705
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   706
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   707
06bc494ca11e Initial load
duke
parents:
diff changeset
   708
    <target name="-def-build-classes" depends="-def-pcompile">
06bc494ca11e Initial load
duke
parents:
diff changeset
   709
        <macrodef name="build-classes">
06bc494ca11e Initial load
duke
parents:
diff changeset
   710
            <attribute name="includes"/>
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   711
            <attribute name="excludes" default="${exclude.files} **/package-info.java"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   712
            <attribute name="classes.dir" default="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   713
            <attribute name="gensrc.dir" default="${build.gensrc.dir}"/>
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   714
            <attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   715
            <attribute name="bootclasspath.opt" default="${javac.bootclasspath.opt}"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   716
            <attribute name="classpath" default="${javac.classpath}"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   717
            <attribute name="sourcepath" default="${javac.sourcepath}"/>
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   718
            <attribute name="java.home" default="${boot.java.home}"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   719
            <attribute name="source" default="${javac.source}"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   720
            <attribute name="target" default="${javac.target}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   721
            <attribute name="release" default="${release}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   722
            <attribute name="full.version" default="${full.version}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   723
            <sequential>
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   724
                <echo level="verbose" message="build-classes: excludes=@{excludes}"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   725
                <echo level="verbose" message="build-classes: bootclasspath.opt=@{bootclasspath.opt}"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   726
                <echo level="verbose" message="build-classes: classpath=@{classpath}"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   727
                <echo level="verbose" message="build-classes: sourcepath=@{sourcepath}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   728
                <mkdir dir="@{gensrc.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   729
                <mkdir dir="@{classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   730
                <pcompile srcdir="${src.classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   731
                          destdir="@{gensrc.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   732
                          includes="@{includes}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   733
                <copy todir="@{gensrc.dir}">
727
cb50c1ae7bab 4075303: Use javap to enquire aboput a specific inner class
jjg
parents: 10
diff changeset
   734
                    <fileset dir="${src.classes.dir}" includes="@{includes}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   735
                    <globmapper from="*.properties-template" to="*.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   736
                    <filterset begintoken="$(" endtoken=")">
06bc494ca11e Initial load
duke
parents:
diff changeset
   737
                        <filter token="JDK_VERSION" value="${jdk.version}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   738
                        <filter token="RELEASE" value="@{release}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   739
                        <filter token="FULL_VERSION" value="@{full.version}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   740
                    </filterset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   741
                </copy>
06bc494ca11e Initial load
duke
parents:
diff changeset
   742
                <pcompile srcdir="@{gensrc.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   743
                          destdir="@{gensrc.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   744
                          includes="**/*.properties"/>
7843
1103fac3fb5a 7008378: javac bootstrap launcher fails on cygwin when called via an absolute path
jjh
parents: 6599
diff changeset
   745
<echo message="jj: -def-build-classes @java.home: @{java.home}/bin/javac"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   746
                <javac fork="true"
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   747
                       executable="@{java.home}/bin/javac"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   748
                       srcdir="${src.classes.dir}:@{gensrc.dir}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   749
                       destdir="@{classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   750
                       includes="@{includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   751
                       excludes="@{excludes}"
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   752
                       sourcepath="@{sourcepath}"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   753
                       classpath="@{classpath}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   754
                       includeAntRuntime="no"
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   755
                       source="@{source}"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   756
                       target="@{target}"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   757
                       debug="${javac.debug}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   758
                       debuglevel="${javac.debuglevel}">
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   759
                    <compilerarg value="-implicit:none"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   760
                    <compilerarg value="-Xprefer:source"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   761
                    <compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   762
                    <compilerarg line="@{bootclasspath.opt}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   763
                    <compilerarg line="${javac.no.jdk.warnings}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   764
                    <compilerarg line="${javac.version.opt}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   765
                    <compilerarg line="${javac.lint.opts}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   766
                </javac>
4548
bc0d5b3c3b2d 6906175: bridge JSR199 and JSR 203 APIs
jjg
parents: 4415
diff changeset
   767
                <copy todir="@{classes.dir}" includeemptydirs="false">
bc0d5b3c3b2d 6906175: bridge JSR199 and JSR 203 APIs
jjg
parents: 4415
diff changeset
   768
                    <fileset dir="${src.classes.dir}" includes="@{includes}" excludes="@{excludes}">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   769
                        <exclude name="**/*.java"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   770
                        <exclude name="**/*.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   771
                        <exclude name="**/*-template"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   772
                        <exclude name="**/package.html"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   773
                    </fileset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   774
                </copy>
06bc494ca11e Initial load
duke
parents:
diff changeset
   775
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   776
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   777
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   778
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   779
    <target name="-def-build-bootstrap-tool" depends="-check-boot.java.home,-def-build-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   780
        <presetdef name="build-bootstrap-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   781
            <build-tool
06bc494ca11e Initial load
duke
parents:
diff changeset
   782
                bin.dir="${build.bootstrap.dir}/bin"
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   783
                java="${boot.java}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   784
        </presetdef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   785
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   786
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   787
    <target name="-def-build-bootstrap-jar" depends="-def-build-jar">
06bc494ca11e Initial load
duke
parents:
diff changeset
   788
        <presetdef name="build-bootstrap-jar">
06bc494ca11e Initial load
duke
parents:
diff changeset
   789
            <build-jar
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   790
                classes.dir="${build.bootstrap.dir}/classes"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   791
                lib.dir="${build.bootstrap.dir}/lib"/>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   792
        </presetdef>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   793
    </target>
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   794
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   795
    <target name="-def-build-bootstrap-classes" depends="-def-build-classes">
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   796
        <presetdef name="build-bootstrap-classes">
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   797
            <build-classes
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   798
                source="${boot.javac.source}"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   799
                target="${boot.javac.target}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   800
                gensrc.dir="${build.bootstrap.dir}/gensrc"
06bc494ca11e Initial load
duke
parents:
diff changeset
   801
                classes.dir="${build.bootstrap.dir}/classes"
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   802
                javac.bootclasspath=""
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   803
                bootclasspath.opt="-Xbootclasspath/p:${build.bootstrap.dir}/classes"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   804
                sourcepath=""
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   805
                release="${bootstrap.release}"
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   806
                full.version="${bootstrap.full.version}"
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   807
                excludes="${bootstrap.exclude.files} **/package-info.java"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   808
        </presetdef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   809
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   810
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   811
    <target name="-def-pcompile">
06bc494ca11e Initial load
duke
parents:
diff changeset
   812
        <mkdir dir="${build.toolclasses.dir}"/>
7843
1103fac3fb5a 7008378: javac bootstrap launcher fails on cygwin when called via an absolute path
jjh
parents: 6599
diff changeset
   813
<echo message="jj: -def-pcompile boot.java.home ${boot.java.home}/bin/javac"/>
1103fac3fb5a 7008378: javac bootstrap launcher fails on cygwin when called via an absolute path
jjh
parents: 6599
diff changeset
   814
1871
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   815
        <javac fork="true"
3658
8ee720a52b7d 6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents: 3655
diff changeset
   816
               source="${boot.javac.source}"
8ee720a52b7d 6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents: 3655
diff changeset
   817
               target="${boot.javac.target}"
1871
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   818
               executable="${boot.java.home}/bin/javac"
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   819
               srcdir="${make.tools.dir}/CompileProperties"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   820
               destdir="${build.toolclasses.dir}/"
6598
5e2fbe244215 6965264: langtools build should use ${ant.core.lib} instead of ${ant.home}/lib/ant.jar
jjg
parents: 6574
diff changeset
   821
               classpath="${ant.core.lib}"
5e2fbe244215 6965264: langtools build should use ${ant.core.lib} instead of ${ant.home}/lib/ant.jar
jjg
parents: 6574
diff changeset
   822
               includeantruntime="false"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   823
        <taskdef name="pcompile"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   824
                 classname="CompilePropertiesTask"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   825
                 classpath="${build.toolclasses.dir}/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   826
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   827
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   828
    <target name="-def-genstubs" depends="build-bootstrap-javac" if="require.import.jdk.stubs">
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   829
        <mkdir dir="${build.toolclasses.dir}"/>
7843
1103fac3fb5a 7008378: javac bootstrap launcher fails on cygwin when called via an absolute path
jjh
parents: 6599
diff changeset
   830
<echo message="jj: -def-genstubs boot.java.home ${boot.java.home}/bin/javac"/>
1103fac3fb5a 7008378: javac bootstrap launcher fails on cygwin when called via an absolute path
jjh
parents: 6599
diff changeset
   831
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   832
        <javac fork="true"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   833
               source="${boot.javac.source}"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   834
               target="${boot.javac.target}"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   835
               executable="${boot.java.home}/bin/javac"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   836
               srcdir="${make.tools.dir}/GenStubs"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   837
               destdir="${build.toolclasses.dir}/"
6598
5e2fbe244215 6965264: langtools build should use ${ant.core.lib} instead of ${ant.home}/lib/ant.jar
jjg
parents: 6574
diff changeset
   838
               classpath="${build.bootstrap.dir}/classes:${ant.core.lib}"
5e2fbe244215 6965264: langtools build should use ${ant.core.lib} instead of ${ant.home}/lib/ant.jar
jjg
parents: 6574
diff changeset
   839
               includeantruntime="false"/>
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   840
        <taskdef name="genstubs"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   841
                 classname="GenStubs$$Ant"
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   842
                 classpath="${build.toolclasses.dir}/"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   843
    </target>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   844
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   845
    <target name="-def-javadoc-tool" depends="-check-target.java.home">
06bc494ca11e Initial load
duke
parents:
diff changeset
   846
        <macrodef name="javadoc-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   847
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   848
            <attribute name="includes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   849
            <attribute name="options" default=""/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   850
            <attribute name="source" default="1.5"/> <!-- FIXME -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   851
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   852
                <property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   853
                <!-- Note: even with this default value, includes
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   854
                from src.classes.dir get javadoc'd; see packageset below -->
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   855
                <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
   856
                <javadoc
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   857
                    executable="${target.java.home}/bin/javadoc"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   858
                    destdir="${build.javadoc.dir}/@{name}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   859
                    source="@{source}"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   860
                    windowtitle="UNOFFICIAL"
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   861
                    failonerror="true"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   862
                    use="true"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   863
                    author="false"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   864
                    version="false"
06bc494ca11e Initial load
duke
parents:
diff changeset
   865
                    packagenames="${javadoc.packagenames}" >
06bc494ca11e Initial load
duke
parents:
diff changeset
   866
                    <header><![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></header>
06bc494ca11e Initial load
duke
parents:
diff changeset
   867
                    <arg line="@{options}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   868
                    <bootclasspath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   869
                        <path location="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   870
                        <path location="${target.java.home}/jre/lib/rt.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   871
                    </bootclasspath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   872
                    <sourcepath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   873
                        <pathelement location="${src.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   874
                    </sourcepath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   875
                    <!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   876
                    <!-- means that {@link some.package} will not work, which is no good. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   877
                    <!-- (It correctly skips excluded single classes, but not if packageset is also included, -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   878
                    <!-- which also causes duplicates in the class index for included files.) -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   879
                    <packageset dir="${src.classes.dir}" includes="@{includes}">
06bc494ca11e Initial load
duke
parents:
diff changeset
   880
                        <or>
06bc494ca11e Initial load
duke
parents:
diff changeset
   881
                            <filename name="java/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   882
                            <filename name="javax/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   883
                            <filename name="com/sun/javadoc/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   884
                            <filename name="com/sun/mirror/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   885
                            <filename name="com/sun/source/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   886
                        </or>
06bc494ca11e Initial load
duke
parents:
diff changeset
   887
                    </packageset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   888
                </javadoc>
06bc494ca11e Initial load
duke
parents:
diff changeset
   889
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   890
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   891
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   892
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   893
    <target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home,-check-target.java.home">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   894
        <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant">
06bc494ca11e Initial load
duke
parents:
diff changeset
   895
            <classpath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   896
                <pathelement location="${jtreg.home}/lib/jtreg.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   897
                <pathelement location="${jtreg.home}/lib/javatest.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   898
            </classpath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   899
        </taskdef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   900
        <macrodef name="jtreg-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   901
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   902
            <attribute name="tests"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   903
            <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
   904
            <attribute name="samevm" default="true"/>
5849
04edd7910585 6877961: langtools build should allow more options when running jtreg
jjg
parents: 5845
diff changeset
   905
            <attribute name="verbose" default="${default.jtreg.verbose}"/>
04edd7910585 6877961: langtools build should allow more options when running jtreg
jjg
parents: 5845
diff changeset
   906
            <attribute name="options" default="${other.jtreg.options}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   907
            <attribute name="keywords" default="-keywords:!ignore"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   908
            <attribute name="jpda.jvmargs" default=""/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   909
            <sequential>
5849
04edd7910585 6877961: langtools build should allow more options when running jtreg
jjg
parents: 5845
diff changeset
   910
                <property name="coverage.options" value=""/>              <!-- default -->
04edd7910585 6877961: langtools build should allow more options when running jtreg
jjg
parents: 5845
diff changeset
   911
                <property name="coverage.classpath" value=""/>            <!-- default -->
04edd7910585 6877961: langtools build should allow more options when running jtreg
jjg
parents: 5845
diff changeset
   912
                <property name="default.jtreg.verbose" value="summary"/>  <!-- default -->
04edd7910585 6877961: langtools build should allow more options when running jtreg
jjg
parents: 5845
diff changeset
   913
                <property name="other.jtreg.options" value=""/>           <!-- default -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   914
                <jtreg
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   915
                    dir="${test.dir}"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   916
                    workDir="${build.jtreg.dir}/@{name}/work"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   917
                    reportDir="${build.jtreg.dir}/@{name}/report"
06bc494ca11e Initial load
duke
parents:
diff changeset
   918
                    jdk="@{jdk}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   919
                    samevm="@{samevm}" verbose="@{verbose}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   920
                    failonerror="false" resultproperty="jtreg.@{name}.result"
06bc494ca11e Initial load
duke
parents:
diff changeset
   921
                    javacoptions="-g"
06bc494ca11e Initial load
duke
parents:
diff changeset
   922
                    vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}:${build.classes.dir} @{jpda.jvmargs}">
06bc494ca11e Initial load
duke
parents:
diff changeset
   923
                    <arg line="@{keywords}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   924
                    <arg line="@{options}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   925
                    <arg line="@{tests}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   926
                </jtreg>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   927
                <!-- the next two properties are for convenience, when only
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   928
                     a single instance of jtreg will be invoked. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   929
                <condition property="jtreg.passed">
1873
658385834998 6795365: NetBeans projects in langtools repository are not NB6.5-friendly
jjg
parents: 1872
diff changeset
   930
                    <equals arg1="${jtreg.@{name}.result}" arg2="0"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   931
                </condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   932
                <property name="jtreg.report" value="${build.jtreg.dir}/@{name}/report"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   933
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   934
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   935
        <property name="jtreg.defined" value="true"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   936
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   937
06bc494ca11e Initial load
duke
parents:
diff changeset
   938
    <target name="-def-cobertura" depends="-check-cobertura.home">
06bc494ca11e Initial load
duke
parents:
diff changeset
   939
        <path id="cobertura.classpath">
06bc494ca11e Initial load
duke
parents:
diff changeset
   940
            <fileset dir="${cobertura.home}">
06bc494ca11e Initial load
duke
parents:
diff changeset
   941
                <include name="cobertura.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   942
                <include name="lib/**/*.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   943
            </fileset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   944
        </path>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   945
        <taskdef classpathref="cobertura.classpath" resource="tasks.properties"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   946
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   947
6599
ec0419c70f24 6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents: 6598
diff changeset
   948
    <target name="-def-findbugs" unless="findbugs.defined"
ec0419c70f24 6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents: 6598
diff changeset
   949
        depends="-check-findbugs.home,-check-target.java.home">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   950
        <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
06bc494ca11e Initial load
duke
parents:
diff changeset
   951
            <classpath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   952
                <pathelement location="${findbugs.home}/lib/findbugs.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   953
            </classpath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   954
        </taskdef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   955
        <macrodef name="findbugs-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   956
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   957
            <attribute name="output" default="emacs"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   958
            <attribute name="outputFile" default=""/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   959
            <attribute name="reportLevel" default="high"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   960
            <sequential>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   961
                <findbugs
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   962
                    home="${findbugs.home}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   963
                    output="@{output}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   964
                    outputFile="@{outputFile}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   965
                    reportLevel="@{reportLevel}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   966
                    failOnError="false"
06bc494ca11e Initial load
duke
parents:
diff changeset
   967
                    errorProperty="findbugs.@{name}.errors"
06bc494ca11e Initial load
duke
parents:
diff changeset
   968
                    warningsProperty="findbugs.@{name}.warnings"
6599
ec0419c70f24 6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents: 6598
diff changeset
   969
                    jvm="${target.java.home}/bin/java"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   970
                    jvmargs="-Xmx512M" >
06bc494ca11e Initial load
duke
parents:
diff changeset
   971
                    <class location="${dist.dir}/lib/@{name}.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   972
                    <auxClasspath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   973
                        <pathelement location="${build.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   974
                    </auxClasspath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   975
                    <sourcePath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   976
                        <pathelement location="${src.classes.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   977
                    </sourcePath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   978
                </findbugs>
06bc494ca11e Initial load
duke
parents:
diff changeset
   979
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   980
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   981
        <property name="findbugs.defined" value="true"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   982
    </target>
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   983
5844
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   984
    <target name="-def-vizant" unless="vizant.defined" depends="-check-vizant">
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   985
        <taskdef name="vizant" classname="net.sourceforge.vizant.Vizant" classpath="${vizant.jar}"/>
5844
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   986
        <property name="vizant.defined" value="true"/>
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   987
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   988
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   989
    <target name="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   990
        <macrodef name="check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   991
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   992
            <attribute name="property"/>
5844
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   993
            <attribute name="marker" default=""/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   994
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   995
                <fail message="Cannot locate @{name}: please set @{property} to its location">
06bc494ca11e Initial load
duke
parents:
diff changeset
   996
                    <condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   997
                        <not>
06bc494ca11e Initial load
duke
parents:
diff changeset
   998
                            <isset property="@{property}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   999
                        </not>
06bc494ca11e Initial load
duke
parents:
diff changeset
  1000
                    </condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
  1001
                </fail>
06bc494ca11e Initial load
duke
parents:
diff changeset
  1002
                <fail message="@{name} is not installed in ${@{property}}">
06bc494ca11e Initial load
duke
parents:
diff changeset
  1003
                    <condition>
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
  1004
                        <and>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
  1005
                            <not>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
  1006
                                <equals arg1="@{marker}" arg2=""/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
  1007
                            </not>
5844
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
  1008
                            <not>
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
  1009
                                <available file="${@{property}}/@{marker}"/>
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
  1010
                            </not>
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
  1011
                        </and>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
  1012
                    </condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
  1013
                </fail>
06bc494ca11e Initial load
duke
parents:
diff changeset
  1014
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
  1015
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
  1016
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
  1017
06bc494ca11e Initial load
duke
parents:
diff changeset
  1018
</project>
06bc494ca11e Initial load
duke
parents:
diff changeset
  1019