langtools/make/build.xml
author mcimadamore
Thu, 22 Oct 2015 18:58:00 +0100
changeset 33368 e4755c76c052
parent 33362 65ec6de1d6b4
child 36526 3b41f1c69604
permissions -rw-r--r--
8140333: Tweak langtools IntelliJ project to better support Kulla changes Summary: Add support for target.java.home option to the idea target Reviewed-by: jlahoda
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
<!--
33362
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
     3
 Copyright (c) 2007, 2015, 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
<!--
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    28
 This is a convenience build file supporting development in the langtools
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    29
 repository. It can be run either standalone, or from IDEs. This build script
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    30
 is for a developer use only, it is not used to build the production version
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    31
 of javac or other langtools tools.
5845
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
 The main build happens in two phases:
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    43
 - First, javac is built using ${boot.java.home}. (This implies a constraint
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    44
   on the source code that they can be compiled with the previous version of JDK.
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    45
 - 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
    46
   in the previous step.
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    47
 The build generally builds one module at time.
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    48
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    49
 For more details on the stub generator, see
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    50
    http://blogs.sun.com/jjg/entry/building_javac_for_jdk7
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    51
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    52
 Internal details ...
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    53
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    54
 Bootstrap classes are built into the build/bootstrap/<module-name>/classes directory.
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    55
 Final classes are built into the build/<module-name>/classes directory.
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    56
 Final runnable javac is in dist/bin and dist/lib. Bootstrap javac (if requested by
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    57
 using the build-bootstrap-javac target) is built into dist/bootstrap.
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    58
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    59
 This file is organized into sections as follows:
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    60
 - global property definitions
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    61
 - primary top level targets (cleaning, building, testing, producing javac)
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    62
 - secondary top level targets (code analysis, diagnostics, extra documentation, etc.)
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    63
 - utility definitions
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
 -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
<project name="langtools" default="build" basedir="..">
5845
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
    **** Global property definitions.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
    69
    -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    70
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
    <!-- The following locations can be used to override default property values. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
    <!-- Use this location for customizations specific to this instance of this workspace -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
    <property file="build.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
    <!-- Use this location for customizations common to all OpenJDK langtools workspaces -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
    <property file="${user.home}/.openjdk/${ant.project.name}-build.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
    <!-- Use this location for customizations common to all OpenJDK workspaces -->
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
    <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
    81
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
    82
    <!-- Convenient shorthands for standard locations within the workspace. -->
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
    <property name="build.dir" location="build"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    84
    <property name="build.crules.dir" location="${build.dir}/crules"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
    <property name="build.jtreg.dir" location="${build.dir}/jtreg"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
    <property name="build.toolclasses.dir" location="${build.dir}/toolclasses"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    87
    <property name="build.javadoc.dir" location="${build.dir}/javadoc"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
    <property name="dist.dir" location="dist"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
    <property name="dist.bin.dir" location="${dist.dir}/bin"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    90
    <property name="dist.lib.dir" location="${dist.dir}/lib"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
    <property name="dist.findbugs.dir" location="${dist.dir}/findbugs"/>
11054
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
    92
    <property name="dist.checkstyle.dir" location="${dist.dir}/checkstyle"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
    <property name="make.dir" location="make"/>
11054
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
    94
    <property name="make.conf.dir" location="${make.dir}/conf"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
    <property name="make.tools.dir" location="${make.dir}/tools"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
    <property name="test.dir" location="test"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    98
    <property name="boot.build.dir" location="${build.dir}/bootstrap"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
    99
    <property name="boot.dist.dir" location="${dist.dir}/bootstrap"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   100
    <property name="boot.dist.bin.dir" location="${boot.dist.dir}/bin"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   101
    <property name="boot.dist.lib.dir" location="${boot.dist.dir}/lib"/>
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   102
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
    <!-- java.marker is set to a marker file to check for within a Java install dir.
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
         The best file to check for across Solaris/Linux/Windows/MacOS is one of the
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
         executables; regrettably, that is OS-specific. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
    <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
   107
        <os family="unix"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
    </condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
    <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
   110
        <os family="windows"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
    </condition>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   112
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
    <!-- 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
   114
    <property file="${make.dir}/build.properties"/>
3654
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
   115
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
   116
    <!-- 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
   117
        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
   118
        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
   119
        quietly default to simply use "java". -->
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   120
    <condition property="launcher.java"
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   121
        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
   122
        <isset property="target.java.home"/>
3654
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
   123
    </condition>
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
   124
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   125
    <!-- setup basic properties holding paths to all sources, generated source and class directories
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   126
         (both boot and non-boot) -->
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   127
    <pathconvert property="langtools.sources">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   128
        <path>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   129
            <pathelement path="${langtools.modules}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   130
        </path>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   131
        <map from="${basedir}/" to="${basedir}/src/" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   132
        <mapper type="glob" from="*" to="*/share/classes"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   133
    </pathconvert>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   134
    <pathconvert property="langtools.gensrc">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   135
        <path>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   136
            <pathelement path="${langtools.modules}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   137
        </path>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   138
        <map from="${basedir}/" to="${build.dir}/" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   139
        <mapper type="glob" from="*" to="*/gensrc"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   140
    </pathconvert>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   141
    <pathconvert property="langtools.boot.classes">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   142
        <path>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   143
            <pathelement path="${langtools.modules}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   144
        </path>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   145
        <map from="${basedir}/" to="${boot.build.dir}/" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   146
        <mapper type="glob" from="*" to="*/classes"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   147
    </pathconvert>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   148
    <pathconvert property="langtools.classes">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   149
        <path>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   150
            <pathelement path="${langtools.modules}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   151
        </path>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   152
        <map from="${basedir}/" to="${build.dir}/" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   153
        <mapper type="glob" from="*" to="*/classes"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   154
    </pathconvert>
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   155
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   156
    <!--
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   157
        **** Primary targets
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   158
    -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   159
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
    <target name="clean" description="Delete all generated files">
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
        <delete dir="${build.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
        <delete dir="${dist.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   165
    <target name="build" depends="build-all-tools">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   166
    </target>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   167
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   168
    <target name="build-all-tools" depends="build-all-classes,-def-build-all-module-jars,-def-build-tool">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   169
        <build-all-module-jars />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   170
        <build-tool name="javac"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   171
        <build-tool name="javadoc"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   172
        <build-tool name="javap"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   173
        <build-tool name="javah"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   174
        <build-tool name="sjavac"/>
33362
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   175
        <build-tool name="jshell"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   176
    </target>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   177
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   178
    <target name="build-all-classes" depends="-def-build-all-module-classes,build-bootstrap-javac-classes">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   179
        <build-all-module-classes />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   180
    </target>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   182
    <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
   183
        <jtreg-tool name="all" tests="${jtreg.tests}"/>
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   184
    </target>
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   185
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   186
    <target name="javadoc" depends="build-all-classes,-def-javadoc-tool">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   187
        <javadoc-tool options="${javadoc.jls.option}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   188
    </target>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   189
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   190
    <target name="build-bootstrap-javac-classes" depends="-check-boot.java.home,-def-build-all-module-classes">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   191
        <build-all-module-classes compilation.kind="boot." />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   192
    </target>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   193
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   194
    <!--
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   195
        **** Extra targets
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   196
    -->
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   197
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   198
    <target name="build-bootstrap-javac" depends="build-bootstrap-javac-classes,-def-build-all-module-jars,-def-build-tool">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   199
        <build-all-module-jars compilation.kind="boot." />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   200
        <build-tool name="javac" compilation.kind="boot." />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   201
    </target>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   202
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   203
    <target name="jtreg-bootstrap-javac" depends="build-bootstrap-javac,-def-jtreg">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   204
        <jtreg-tool name="bootstrap-javac"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   205
                    tests="${boot.javac.tests}"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   206
                    langtools.classes="${langtools.boot.classes}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   207
    </target>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   208
11054
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   209
    <target name="checkstyle" depends="-def-checkstyle"
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   210
        description="Generates reports for code convention violations.">
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   211
        <mkdir dir="${dist.checkstyle.dir}"/>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   212
        <checkstyle config="${make.conf.dir}/checkstyle-langtools.xml"
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   213
              failureProperty="checkstyle.failure"
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   214
              failOnViolation="false">
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   215
            <formatter type="xml" tofile="${dist.checkstyle.dir}/checkstyle_report.xml"/>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   216
            <fileset dir="src" includes="**/*.java, **/*.properties"/>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   217
        </checkstyle>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   218
        <!-- transform the output to a simple html -->
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   219
        <xslt  in="${dist.checkstyle.dir}/checkstyle_report.xml"
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   220
               out="${dist.checkstyle.dir}/checkstyle_report.html"
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents: 12085
diff changeset
   221
               style="${checkstyle.home}/contrib/checkstyle-simple.xsl"/>
11054
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   222
        <!-- transform the output to a very simple emacs friendly text file -->
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   223
        <xslt  in="${dist.checkstyle.dir}/checkstyle_report.xml"
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   224
               out="${dist.checkstyle.dir}/checkstyle_report.tmp"
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   225
               style="${make.conf.dir}/checkstyle-emacs.xsl"/>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   226
        <!-- beautify remove extra lines -->
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   227
        <move file="${dist.checkstyle.dir}/checkstyle_report.tmp"
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   228
             toFile="${dist.checkstyle.dir}/checkstyle_report.emacs.txt">
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   229
            <filterchain>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   230
                <ignoreblank/>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   231
                <replaceregex byline="true" pattern="^File:" replace="${line.separator}File:"/>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   232
            </filterchain>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   233
        </move>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   234
    </target>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   235
    <!-- target can be invoked from an ide, the output of which can be used
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   236
         to access and fix the errors directly.
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   237
     -->
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   238
    <target name="checkstyle-ide" depends="checkstyle">
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   239
        <concat>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   240
            <fileset file="${dist.checkstyle.dir}/checkstyle_report.emacs.txt"/>
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents: 12085
diff changeset
   241
        </concat>
11054
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   242
    </target>
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents: 12085
diff changeset
   243
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
    <target name="findbugs" depends="-def-findbugs,build-all-tools">
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
        <property name="findbugs.reportLevel" value="medium"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
        <mkdir dir="${dist.findbugs.dir}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
        <findbugs
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
            home="${findbugs.home}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
            projectName="JDK langtools ${full.version}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
            output="xml"
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
            outputFile="${dist.findbugs.dir}/findbugs.xml"
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
            reportLevel="${findbugs.reportLevel}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
            failOnError="false"
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
            errorProperty="findbugs.all.errors"
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
            warningsProperty="findbugs.all.warnings"
6599
ec0419c70f24 6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents: 6598
diff changeset
   256
            jvm="${target.java.home}/bin/java"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
            jvmargs="-Xmx512M">
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   258
            <class location="${build.dir}/java.compiler/classes"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   259
            <class location="${build.dir}/jdk.compiler/classes"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   260
            <class location="${build.dir}/jdk.javadoc/classes"/>
30846
2b3f379840f0 8074432: Move jdeps and javap to jdk.jdeps module
mchung
parents: 29781
diff changeset
   261
            <class location="${build.dir}/jdk.jdeps/classes"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   262
            <sourcePath>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   263
                <pathelement path="${langtools.sources}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
            </sourcePath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
        </findbugs>
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
        <exec executable="sh">
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
            <arg value="${findbugs.home}/bin/convertXmlToText"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
            <arg value="-longBugCodes"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   269
            <arg value="-html:${findbugs.home}/src/xsl/fancy.xsl"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   270
            <arg value="${dist.findbugs.dir}/findbugs.xml"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
            <redirector output="${dist.findbugs.dir}/findbugs.html"/>
727
cb50c1ae7bab 4075303: Use javap to enquire aboput a specific inner class
jjg
parents: 10
diff changeset
   272
        </exec>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   273
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   274
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   275
    <target name="diags-examples" depends="build-all-tools">
6149
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   276
        <!-- can override the following on the command line if desired. -->
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   277
        <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
   278
        <mkdir dir="${build.dir}/diag-examples/classes"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   279
        <javac fork="true"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   280
            executable="${dist.bin.dir}/javac"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   281
            srcdir="test/tools/javac/diags"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   282
            destdir="${build.dir}/diag-examples/classes"
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents: 12085
diff changeset
   283
            includes="ArgTypeCompilerFactory.java,Example.java,FileManager.java,HTMLWriter.java,RunExamples.java,DocCommentProcessor.java"
6149
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   284
            sourcepath=""
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   285
            classpath="${langtools.classes}"
6149
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   286
            includeAntRuntime="no"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   287
            debug="${javac.debug}"
10183
63f2f2e5f642 7058174: Reduce langtools build warnings
jjg
parents: 9303
diff changeset
   288
            debuglevel="${javac.debuglevel}">
63f2f2e5f642 7058174: Reduce langtools build warnings
jjg
parents: 9303
diff changeset
   289
            <compilerarg line="${javac.lint.opts}"/>
63f2f2e5f642 7058174: Reduce langtools build warnings
jjg
parents: 9303
diff changeset
   290
        </javac>
6149
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   291
        <java fork="true"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   292
            jvm="${target.java.home}/bin/java"
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   293
            dir="test/tools/javac/diags"
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   294
            classpath="${build.dir}/diag-examples/classes;${langtools.classes}"
6149
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   295
            classname="RunExamples">
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents: 12085
diff changeset
   296
            <jvmarg value="-Dtest.classes=${build.dir}/diag-examples/classes"/>
6149
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   297
            <arg value="-examples"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   298
            <arg value="examples"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   299
            <arg value="-o"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   300
            <arg file="${diags.examples.out}"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   301
            <arg value="-showFiles"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   302
            <arg value="-title"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   303
            <arg value="Examples of javac diagnostics"/>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   304
        </java>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   305
    </target>
48de3564aa13 6968063: provide examples of code that generate diagnostics
jjg
parents: 5849
diff changeset
   306
16559
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   307
    <target name="doclint-api" depends="build-all-classes">
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   308
        <delete dir="${build.dir}/doclint/classes"/>
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   309
        <mkdir dir="${build.dir}/doclint/classes"/>
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   310
        <javac fork="true"
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   311
               executable="${boot.java.home}/bin/javac"
16559
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   312
               destdir="${build.dir}/doclint/classes"
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   313
               includes="javax/lang/model/** com/sun/javadoc/** com/sun/source/**"
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   314
               excludes=""
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   315
               sourcepath=""
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   316
               classpath="${langtools.classes}"
16559
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   317
               includeAntRuntime="no"
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   318
               source="${javac.source}"
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   319
               target="${javac.target}"
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   320
               debug="${javac.debug}"
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   321
               debuglevel="${javac.debuglevel}">
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   322
            <compilerarg value="-implicit:none"/>
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   323
            <compilerarg value="-Xprefer:source"/>
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   324
            <compilerarg value="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   325
            <compilerarg line="${javac.extra.opts}"/>
16559
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   326
            <compilerarg line="-Xdoclint:all/protected,-missing"/>
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   327
            <src>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   328
                <pathelement path="${langtools.sources}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   329
                <pathelement path="${langtools.gensrc}"/>
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   330
            </src>
16559
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   331
        </javac>
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   332
    </target>
e927a4e65b0c 8010315: doclint errors in javac public API
jjg
parents: 15368
diff changeset
   333
25606
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   334
    <!-- Generate API docs for "important" test classes that are used by
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   335
         multiple tests.
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   336
    -->
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   337
    <target name="test-framework-docs" depends="build-all-classes">
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   338
        <javadoc executable="${target.java.home}/bin/javadoc"
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   339
                destdir="${build.dir}/testframeworkdocs">
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   340
            <!-- disable doclint for now; it might be good to enable -Xdoclint:missing -->
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   341
            <arg value="-Xdoclint:none"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   342
            <!-- source files to be documented -->
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   343
            <sourcefiles>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   344
                <fileset dir="${test.dir}">
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   345
                    <include name="**/ToolBox.java"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   346
                    <include name="**/*Tester.java"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   347
                    <include name="**/*TestBase.java"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   348
                    <include name="**/*Testing*.java"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   349
                </fileset>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   350
            </sourcefiles>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   351
            <!-- source path used for documentation -->
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   352
            <sourcepath>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   353
                <pathelement path="${test.dir}/lib"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   354
                <pathelement path="${test.dir}/lib/combo"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   355
                <pathelement path="${test.dir}/tools/javac/lib"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   356
                <pathelement path="${test.dir}/tools/javac/classfiles/attributes/LocalVariableTable"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   357
            </sourcepath>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   358
            <!-- exclude the following "packages" found by <javadoc>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   359
                on the sourcepath -->
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   360
            <excludepackage name="combo.tools.javac.combo"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   361
            <excludepackage name="tools.javac.combo"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   362
            <!-- library classes used for documentation -->
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   363
            <classpath>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   364
                <pathelement path="${jtreg.home}/lib/testng.jar"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   365
            </classpath>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   366
            <!-- platform classes used for documentation -->
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   367
            <bootclasspath>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   368
                <pathelement path="${langtools.classes}"/>
25606
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   369
                <pathelement path="${target.java.home}/jre/lib/rt.jar"/>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   370
            </bootclasspath>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   371
        </javadoc>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   372
    </target>
1272de877614 8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents: 25302
diff changeset
   373
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   374
    <target name="sanity"
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   375
        description="display settings of configuration values">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   376
        <echo level="info">ant.home = ${ant.home}</echo>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   377
        <echo level="info">boot.java.home = ${boot.java.home}</echo>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   378
        <echo level="info">target.java.home = ${target.java.home}</echo>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   379
        <echo level="info">jtreg.home = ${jtreg.home}</echo>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   380
        <echo level="info">findbugs.home = ${findbugs.home}</echo>
11054
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   381
        <echo level="info">checkstyle.home = ${checkstyle.home}</echo>
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   382
    </target>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   383
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   384
    <target name="diagnostics">
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   385
        <diagnostics/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   386
    </target>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   387
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   388
    <target name="jtreg-crules" depends="build-all-classes,-def-jtreg">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   389
        <mkdir dir="${build.crules.dir}/classes"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   390
        <javac fork="true"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   391
               source="${boot.javac.source}"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   392
               target="${boot.javac.target}"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   393
               executable="${boot.java.home}/bin/javac"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   394
               srcdir="${make.tools.dir}"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   395
               includes="crules/*"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   396
               destdir="${build.crules.dir}/classes"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   397
               includeantruntime="false">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   398
            <compilerarg value="-Xbootclasspath/p:${langtools.classes}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   399
            <compilerarg line="${javac.lint.opts}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   400
        </javac>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   401
        <copy todir="${build.crules.dir}/classes" includeemptydirs="false">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   402
            <fileset dir="${make.tools.dir}">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   403
                <include name="**/*.properties"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   404
            </fileset>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   405
        </copy>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   406
        <echo file="${build.crules.dir}/classes/META-INF/services/com.sun.source.util.Plugin">crules.CodingRulesAnalyzerPlugin</echo>
25848
3bc09f4676a9 8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents: 25697
diff changeset
   407
        <jtreg-tool name="crules"
3bc09f4676a9 8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents: 25697
diff changeset
   408
                    tests="${crules.tests}"
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   409
                    extra.jvmargs="-Xbootclasspath/a:${build.crules.dir}/classes" />
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   410
    </target>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   411
25282
d49c47cad9f0 8046451: Add basic IntelliJ support for langtools
mcimadamore
parents: 21041
diff changeset
   412
    <!--
d49c47cad9f0 8046451: Add basic IntelliJ support for langtools
mcimadamore
parents: 21041
diff changeset
   413
    **** IDE support
d49c47cad9f0 8046451: Add basic IntelliJ support for langtools
mcimadamore
parents: 21041
diff changeset
   414
    -->
d49c47cad9f0 8046451: Add basic IntelliJ support for langtools
mcimadamore
parents: 21041
diff changeset
   415
d49c47cad9f0 8046451: Add basic IntelliJ support for langtools
mcimadamore
parents: 21041
diff changeset
   416
    <target name="idea">
d49c47cad9f0 8046451: Add basic IntelliJ support for langtools
mcimadamore
parents: 21041
diff changeset
   417
        <mkdir dir=".idea"/>
d49c47cad9f0 8046451: Add basic IntelliJ support for langtools
mcimadamore
parents: 21041
diff changeset
   418
        <copy todir=".idea" >
25697
b71804e27eb1 8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents: 25606
diff changeset
   419
            <fileset dir="make/intellij" excludes="**/src/**"/>
25282
d49c47cad9f0 8046451: Add basic IntelliJ support for langtools
mcimadamore
parents: 21041
diff changeset
   420
        </copy>
33368
e4755c76c052 8140333: Tweak langtools IntelliJ project to better support Kulla changes
mcimadamore
parents: 33362
diff changeset
   421
        <condition property="idea.jtreg.home" value="${jtreg.home}" else = "[jtreg.home]">
25697
b71804e27eb1 8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents: 25606
diff changeset
   422
            <isset property="jtreg.home"/>
b71804e27eb1 8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents: 25606
diff changeset
   423
        </condition>
33368
e4755c76c052 8140333: Tweak langtools IntelliJ project to better support Kulla changes
mcimadamore
parents: 33362
diff changeset
   424
        <condition property="idea.target.jdk" value="${target.java.home}" else = "$JDKPath$">
e4755c76c052 8140333: Tweak langtools IntelliJ project to better support Kulla changes
mcimadamore
parents: 33362
diff changeset
   425
            <isset property="target.java.home"/>
e4755c76c052 8140333: Tweak langtools IntelliJ project to better support Kulla changes
mcimadamore
parents: 33362
diff changeset
   426
        </condition>
e4755c76c052 8140333: Tweak langtools IntelliJ project to better support Kulla changes
mcimadamore
parents: 33362
diff changeset
   427
        <replace file=".idea/ant.xml" token="@IDEA_JTREG_HOME@" value="${idea.jtreg.home}"/>
e4755c76c052 8140333: Tweak langtools IntelliJ project to better support Kulla changes
mcimadamore
parents: 33362
diff changeset
   428
        <replace file=".idea/ant.xml" token="@IDEA_TARGET_JDK@" value="${idea.target.jdk}"/>
27990
54ab8a7cccec 8066889: IntelliJ langtools launcher ought to be Windows friendly
mcimadamore
parents: 27546
diff changeset
   429
        <replace file=".idea/workspace.xml" token="@FILE_SEP@" value="${file.separator}"/>
54ab8a7cccec 8066889: IntelliJ langtools launcher ought to be Windows friendly
mcimadamore
parents: 27546
diff changeset
   430
        <replace file=".idea/workspace.xml" token="@PATH_SEP@" value="${path.separator}"/>
25697
b71804e27eb1 8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents: 25606
diff changeset
   431
        <mkdir dir=".idea/classes"/>
b71804e27eb1 8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents: 25606
diff changeset
   432
        <javac srcdir="make/intellij/src"
b71804e27eb1 8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents: 25606
diff changeset
   433
               destdir=".idea/classes"/>
25282
d49c47cad9f0 8046451: Add basic IntelliJ support for langtools
mcimadamore
parents: 21041
diff changeset
   434
    </target>
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   435
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   436
    <!--
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   437
    **** Check targets.
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   438
    **** "-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
   439
    **** 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
   440
    -->
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   441
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   442
    <target name="-check-boot.java.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   443
        <check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   444
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   445
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   446
    <target name="-check-target.java.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   447
        <check name="target java" property="target.java.home" marker="${java.marker}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   448
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   449
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   450
    <target name="-check-jtreg.home" depends="-def-check">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   451
        <check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/>
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="-check-findbugs.home" depends="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   455
        <check name="findbugs" property="findbugs.home" marker="lib/findbugs.jar"/>
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
11054
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   458
    <target name="-check-checkstyle.home" depends="-def-check">
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   459
        <check name="checkstyle" property="checkstyle.home" marker=""/> <!--TODO: better checkstyle verification-->
11054
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   460
    </target>
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents: 12085
diff changeset
   461
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   462
    <!-- Definitions -->
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   463
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   464
    <target name="-def-build-all-module-jars" depends="-def-build-module-jar">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   465
        <macrodef name="build-all-module-jars">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   466
            <attribute name="compilation.kind" default=""/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   467
            <sequential>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   468
                <build-module-jar module.name="java.compiler" compilation.kind="@{compilation.kind}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   469
                <build-module-jar module.name="jdk.compiler" compilation.kind="@{compilation.kind}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   470
                <build-module-jar module.name="jdk.javadoc" compilation.kind="@{compilation.kind}" />
30846
2b3f379840f0 8074432: Move jdeps and javap to jdk.jdeps module
mchung
parents: 29781
diff changeset
   471
                <build-module-jar module.name="jdk.jdeps" compilation.kind="@{compilation.kind}" />
33362
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   472
                <build-module-jar module.name="jdk.internal.le" compilation.kind="@{compilation.kind}" />
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   473
                <build-module-jar module.name="jdk.jdi" compilation.kind="@{compilation.kind}" />
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   474
                <build-module-jar module.name="jdk.jshell" compilation.kind="@{compilation.kind}" />
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   475
            </sequential>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   476
        </macrodef>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   477
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   478
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   479
    <target name="-def-build-module-jar">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   480
        <macrodef name="build-module-jar">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   481
            <attribute name="module.name"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   482
            <attribute name="compilation.kind"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   483
            <attribute name="dependencies" default="${@{compilation.kind}@{module.name}.dependencies}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   484
            <attribute name="build.dir" default="${@{compilation.kind}build.dir}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   485
            <attribute name="lib.dir" default="${@{compilation.kind}dist.lib.dir}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   486
            <attribute name="classes.dir" default="@{build.dir}/@{module.name}/classes"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   487
            <sequential>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   488
                <mkdir dir="@{lib.dir}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   489
                <local name="jarclasspath" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   490
                <pathconvert property="jarclasspath">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   491
                    <path>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   492
                        <pathelement path="@{dependencies}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   493
                    </path>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   494
                    <map from="${basedir}/" to="" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   495
                    <mapper type="glob" from="*" to="*.jar"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   496
                </pathconvert>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   497
                <jar destfile="@{lib.dir}/@{module.name}.jar"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   498
                     basedir="@{classes.dir}">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   499
                    <manifest>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   500
                        <attribute name="Class-Path" value="@{jarclasspath}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   501
                    </manifest>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   502
                </jar>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   503
            </sequential>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   504
        </macrodef>
5844
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   505
    </target>
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   506
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   507
    <target name="-def-build-tool">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   508
        <macrodef name="build-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   509
            <attribute name="name"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   510
            <attribute name="compilation.kind" default=""/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   511
            <attribute name="bin.dir" default="${@{compilation.kind}dist.bin.dir}"/>
3654
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3564
diff changeset
   512
            <attribute name="java" default="${launcher.java}"/>
33362
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   513
            <attribute name="main.class" default="${tool.@{name}.main.class}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   514
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   515
                <mkdir dir="@{bin.dir}"/>
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   516
                <copy file="${make.dir}/launcher.sh-template" tofile="@{bin.dir}/@{name}">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   517
                    <filterset begintoken="#" endtoken="#">
33362
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   518
                        <filter token="PROGRAM" value="@{main.class}"/>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   519
                        <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
   520
                        <filter token="PS" value="${path.separator}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   521
                    </filterset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   522
                </copy>
06bc494ca11e Initial load
duke
parents:
diff changeset
   523
                <chmod file="@{bin.dir}/@{name}" perm="ugo+rx"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   524
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   525
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   526
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   527
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   528
    <target name="-def-build-all-module-classes" depends="-def-build-module-classes">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   529
        <macrodef name="build-all-module-classes">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   530
            <attribute name="compilation.kind" default=""/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   531
            <sequential>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   532
                <build-module-classes module.name="java.compiler"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   533
                                      compilation.kind="@{compilation.kind}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   534
                <build-module-classes module.name="jdk.compiler"
28334
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   535
                                      compilation.kind="@{compilation.kind}"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   536
                                      resource.includes="${javac.resource.includes}" />
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   537
                <build-module-classes module.name="jdk.javadoc"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   538
                                      compilation.kind="@{compilation.kind}" />
30846
2b3f379840f0 8074432: Move jdeps and javap to jdk.jdeps module
mchung
parents: 29781
diff changeset
   539
                <build-module-classes module.name="jdk.jdeps"
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   540
                                      compilation.kind="@{compilation.kind}" />
33362
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   541
                <copy-module-classes  module.name="jdk.internal.le"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   542
                                      compilation.kind="@{compilation.kind}" />
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   543
                <copy-module-classes  module.name="jdk.jdi"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   544
                                      compilation.kind="@{compilation.kind}" />
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   545
                <build-module-classes module.name="jdk.jshell"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   546
                                      compilation.kind="@{compilation.kind}" />
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   547
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   548
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   549
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   550
33362
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   551
    <target name="-def-build-module-classes" depends="-def-pcompile,-def-pparse,-def-cdumper">
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   552
        <macrodef name="build-module-classes">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   553
            <attribute name="module.name"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   554
            <attribute name="compilation.kind" default=""/>
28334
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   555
            <attribute name="resource.includes" default="nonExistent" />
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   556
            <attribute name="dependencies" default="${@{module.name}.dependencies}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   557
            <attribute name="includes" default="${@{compilation.kind}javac.includes}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   558
            <attribute name="javac.lint.opts" default="${@{compilation.kind}javac.lint.opts}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   559
            <attribute name="javac.extra.opts" default="${@{compilation.kind}javac.extra.opts}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   560
            <attribute name="build.dir" default="${@{compilation.kind}build.dir}"/>
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   561
            <attribute name="excludes" default="${exclude.files} **/package-info.java"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   562
            <attribute name="classes.dir" default="@{build.dir}/@{module.name}/classes"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   563
            <attribute name="gensrc.dir" default="@{build.dir}/@{module.name}/gensrc"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   564
            <attribute name="depcache.dir" default="@{build.dir}/@{module.name}/depcache"/>
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   565
            <attribute name="java.home" default="${boot.java.home}"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   566
            <attribute name="source" default="${@{compilation.kind}javac.source}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   567
            <attribute name="target" default="${@{compilation.kind}javac.target}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   568
            <attribute name="release" default="${release}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   569
            <attribute name="full.version" default="${full.version}"/>
17283
cddfdf252f4a 8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents: 16559
diff changeset
   570
            <attribute name="plugin.options" default=""/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   571
            <sequential>
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   572
                <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
   573
                <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
   574
                <echo level="verbose" message="build-classes: sourcepath=@{sourcepath}"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   575
                <echo level="verbose" message="build-classes: dependencies=@{dependencies}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   576
                <local name="src.dir" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   577
                <property name="src.dir" location="${basedir}/src/@{module.name}/share/classes"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   578
                <local name="classpath" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   579
                <pathconvert property="classpath">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   580
                    <path>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   581
                        <pathelement path="@{dependencies}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   582
                    </path>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   583
                    <map from="${basedir}/" to="@{build.dir}/" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   584
                    <mapper type="glob" from="*" to="*/classes"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   585
                </pathconvert>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   586
                <local name="bootclasspath.prepend"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   587
                <condition property="bootclasspath.prepend" value="" else="${langtools.boot.classes}">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   588
                    <equals arg1="@{compilation.kind}" arg2="boot."/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   589
                </condition>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   590
                <mkdir dir="@{classes.dir}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   591
                <mkdir dir="@{gensrc.dir}"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   592
                <mkdir dir="@{depcache.dir}"/>
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   593
                <pcompile destdir="@{gensrc.dir}"
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   594
                          includes="@{includes}">
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   595
                    <src>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   596
                        <path location="${src.dir}"/>
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   597
                    </src>
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   598
                </pcompile>
28334
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   599
                <pparse destdir="@{gensrc.dir}"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   600
                        includes="@{resource.includes}">
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   601
                    <src>
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   602
                        <path location="${src.dir}"/>
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   603
                    </src>
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   604
                </pparse>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   605
                <copy todir="@{gensrc.dir}">
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   606
                    <fileset dir="${src.dir}" includes="@{includes}" />
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   607
                    <globmapper from="*.properties-template" to="*.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   608
                    <filterset begintoken="$(" endtoken=")">
06bc494ca11e Initial load
duke
parents:
diff changeset
   609
                        <filter token="JDK_VERSION" value="${jdk.version}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   610
                        <filter token="RELEASE" value="@{release}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   611
                        <filter token="FULL_VERSION" value="@{full.version}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   612
                    </filterset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   613
                </copy>
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   614
                <pcompile destdir="@{gensrc.dir}"
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   615
                          includes="**/*.properties">
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   616
                    <src>
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   617
                        <pathelement location="@{gensrc.dir}"/>
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   618
                    </src>
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   619
                </pcompile>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   620
                <antcall target="-do-depend">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   621
                    <param name="src.dir" value="${src.dir}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   622
                    <param name="classes.dir" value="@{classes.dir}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   623
                    <param name="gensrc.dir" value="@{gensrc.dir}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   624
                    <param name="depcache.dir" value="@{depcache.dir}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   625
                    <param name="classpath" value="${classpath}" />
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   626
                </antcall>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   627
                <javac fork="true"
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   628
                       executable="@{java.home}/bin/javac"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   629
                       destdir="@{classes.dir}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   630
                       includes="@{includes}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   631
                       excludes="@{excludes}"
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   632
                       sourcepath="${src.dir}:@{gensrc.dir}"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   633
                       classpath="${classpath}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   634
                       includeAntRuntime="no"
4410
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   635
                       source="@{source}"
0288a787be7a 6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents: 3996
diff changeset
   636
                       target="@{target}"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   637
                       debug="${javac.debug}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   638
                       debuglevel="${javac.debuglevel}">
4415
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   639
                    <compilerarg value="-implicit:none"/>
7d4f73717fba 6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents: 4414
diff changeset
   640
                    <compilerarg value="-Xprefer:source"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   641
                    <compilerarg value="-J-Xbootclasspath/p:${bootclasspath.prepend}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   642
                    <compilerarg value="-Xbootclasspath/p:${classpath}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   643
                    <compilerarg line="@{javac.extra.opts}"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   644
                    <compilerarg line="@{javac.lint.opts}"/>
17283
cddfdf252f4a 8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents: 16559
diff changeset
   645
                    <compilerarg line="@{plugin.options}"/>
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   646
                    <src>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   647
                        <path location="${src.dir}"/>
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   648
                        <path location="@{gensrc.dir}"/>
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   649
                    </src>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   650
                </javac>
4548
bc0d5b3c3b2d 6906175: bridge JSR199 and JSR 203 APIs
jjg
parents: 4415
diff changeset
   651
                <copy todir="@{classes.dir}" includeemptydirs="false">
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   652
                    <fileset dir="${src.dir}" includes="@{includes}" excludes="@{excludes}">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   653
                        <exclude name="**/*.java"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   654
                        <exclude name="**/*.properties"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   655
                        <exclude name="**/*-template"/>
9070
f847fe5cad3d 7009599: javac build puts extraneous files into dist/lib/classes.jar
jjg
parents: 8423
diff changeset
   656
                        <exclude name="**/*.rej"/>
f847fe5cad3d 7009599: javac build puts extraneous files into dist/lib/classes.jar
jjg
parents: 8423
diff changeset
   657
                        <exclude name="**/*.orig"/>
f847fe5cad3d 7009599: javac build puts extraneous files into dist/lib/classes.jar
jjg
parents: 8423
diff changeset
   658
                        <exclude name="**/overview.html"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   659
                        <exclude name="**/package.html"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   660
                    </fileset>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   661
                </copy>
06bc494ca11e Initial load
duke
parents:
diff changeset
   662
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   663
        </macrodef>
33362
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   664
        <macrodef name="copy-module-classes">
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   665
            <attribute name="module.name"/>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   666
            <attribute name="compilation.kind" default=""/>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   667
            <attribute name="build.dir" default="${@{compilation.kind}build.dir}"/>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   668
            <attribute name="classes.dir" default="@{build.dir}/@{module.name}/classes"/>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   669
            <attribute name="java.home" default="${boot.java.home}"/>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   670
            <sequential>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   671
                <property name="classes.origin.dir" location="${target.java.home}/../../jdk/modules/@{module.name}"/>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   672
                <mkdir dir="@{classes.dir}"/>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   673
                <dumpclasses moduleName="@{module.name}" destDir="@{classes.dir}" />
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   674
            </sequential>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   675
        </macrodef>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   676
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   677
28334
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   678
    <target name="-def-pparse">
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   679
        <mkdir dir="${build.toolclasses.dir}"/>
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   680
        <copy todir="${build.toolclasses.dir}/propertiesparser" >
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   681
            <fileset dir="make/tools/propertiesparser" includes="**/resources/**"/>
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   682
        </copy>
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   683
        <javac fork="true"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   684
               source="${boot.javac.source}"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   685
               target="${boot.javac.target}"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   686
               executable="${boot.java.home}/bin/javac"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   687
               srcdir="${make.tools.dir}"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   688
               includes="propertiesparser/* anttasks/PropertiesParser* anttasks/PathFileSet*"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   689
               destdir="${build.toolclasses.dir}/"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   690
               classpath="${ant.core.lib}"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   691
               bootclasspath="${boot.java.home}/jre/lib/rt.jar"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   692
               includeantruntime="false">
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   693
            <compilerarg line="${javac.lint.opts}"/>
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   694
        </javac>
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   695
        <taskdef name="pparse"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   696
                 classname="anttasks.PropertiesParserTask"
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   697
                 classpath="${build.toolclasses.dir}/"/>
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   698
    </target>
1633de6070ae 8058542: Devise scheme for better diagnostic creation
mcimadamore
parents: 27990
diff changeset
   699
33362
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   700
    <target name="-def-cdumper">
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   701
        <mkdir dir="${build.toolclasses.dir}"/>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   702
        <javac fork="true"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   703
               source="${boot.javac.source}"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   704
               target="${boot.javac.target}"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   705
               executable="${boot.java.home}/bin/javac"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   706
               srcdir="${make.tools.dir}"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   707
               includes="anttasks/DumpClass*"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   708
               destdir="${build.toolclasses.dir}/"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   709
               classpath="${ant.core.lib}"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   710
               bootclasspath="${boot.java.home}/jre/lib/rt.jar"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   711
               includeantruntime="false">
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   712
            <compilerarg line="${javac.lint.opts}"/>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   713
        </javac>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   714
        <taskdef name="dumpclasses"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   715
                 classname="anttasks.DumpClassesTask"
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   716
                 classpath="${build.toolclasses.dir}/:${target.java.home}/jrt-fs.jar"/>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   717
    </target>
65ec6de1d6b4 8134254: JShell API/tool: REPL for Java into JDK9
jlahoda
parents: 30846
diff changeset
   718
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   719
    <target name="-do-depend" if="do.depend">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   720
        <depend srcdir="${src.dir}:${gensrc.dir}" destdir="${classes.dir}" classpath="${classpath}"
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   721
                cache="${depcache.dir}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   722
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   723
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   724
    <target name="-def-pcompile">
06bc494ca11e Initial load
duke
parents:
diff changeset
   725
        <mkdir dir="${build.toolclasses.dir}"/>
1871
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   726
        <javac fork="true"
3658
8ee720a52b7d 6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents: 3655
diff changeset
   727
               source="${boot.javac.source}"
8ee720a52b7d 6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents: 3655
diff changeset
   728
               target="${boot.javac.target}"
1871
9bb6518238ff 6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents: 735
diff changeset
   729
               executable="${boot.java.home}/bin/javac"
12085
ce2780cb121f 7150579: Moved ant code into a separate package, anttasks.
ohrstrom
parents: 11866
diff changeset
   730
               srcdir="${make.tools.dir}"
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   731
               includes="compileproperties/* anttasks/CompileProperties* anttasks/PathFileSet*"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   732
               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
   733
               classpath="${ant.core.lib}"
10183
63f2f2e5f642 7058174: Reduce langtools build warnings
jjg
parents: 9303
diff changeset
   734
               bootclasspath="${boot.java.home}/jre/lib/rt.jar"
63f2f2e5f642 7058174: Reduce langtools build warnings
jjg
parents: 9303
diff changeset
   735
               includeantruntime="false">
63f2f2e5f642 7058174: Reduce langtools build warnings
jjg
parents: 9303
diff changeset
   736
            <compilerarg line="${javac.lint.opts}"/>
63f2f2e5f642 7058174: Reduce langtools build warnings
jjg
parents: 9303
diff changeset
   737
        </javac>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   738
        <taskdef name="pcompile"
12085
ce2780cb121f 7150579: Moved ant code into a separate package, anttasks.
ohrstrom
parents: 11866
diff changeset
   739
                 classname="anttasks.CompilePropertiesTask"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   740
                 classpath="${build.toolclasses.dir}/"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   741
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   742
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   743
    <target name="-def-javadoc-tool" depends="-check-target.java.home">
06bc494ca11e Initial load
duke
parents:
diff changeset
   744
        <macrodef name="javadoc-tool">
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   745
            <attribute name="includes" default="${javac.includes}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   746
            <attribute name="options" default=""/>
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   747
            <attribute name="source" default="${javac.source}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   748
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   749
                <property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   750
                <!-- Note: even with this default value, includes
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   751
                from source directories get javadoc'd; see packageset below -->
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   752
                <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
   753
                <javadoc
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   754
                    executable="${target.java.home}/bin/javadoc"
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   755
                    destdir="${build.javadoc.dir}"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   756
                    source="@{source}"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   757
                    windowtitle="UNOFFICIAL"
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   758
                    failonerror="true"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   759
                    use="true"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   760
                    author="false"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   761
                    version="false"
06bc494ca11e Initial load
duke
parents:
diff changeset
   762
                    packagenames="${javadoc.packagenames}" >
06bc494ca11e Initial load
duke
parents:
diff changeset
   763
                    <header><![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></header>
06bc494ca11e Initial load
duke
parents:
diff changeset
   764
                    <arg line="@{options}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   765
                    <bootclasspath>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   766
                        <pathelement path="${langtools.classes}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   767
                        <path location="${target.java.home}/jre/lib/rt.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   768
                    </bootclasspath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   769
                    <sourcepath>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   770
                        <pathelement path="${langtools.sources}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   771
                    </sourcepath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   772
                    <!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   773
                    <!-- means that {@link some.package} will not work, which is no good. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   774
                    <!-- (It correctly skips excluded single classes, but not if packageset is also included, -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   775
                    <!-- which also causes duplicates in the class index for included files.) -->
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   776
                    <packageset dir="${basedir}/src/java.compiler/share/classes" includes="@{includes}">
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   777
                        <or>
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   778
                            <filename name="javax/"/>
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   779
                        </or>
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   780
                    </packageset>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   781
                    <packageset dir="${basedir}/src/jdk.compiler/share/classes" includes="@{includes}">
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   782
                        <or>
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   783
                            <filename name="com/sun/source/"/>
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   784
                        </or>
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   785
                    </packageset>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   786
                    <packageset dir="${basedir}/src/jdk.javadoc/share/classes" includes="@{includes}">
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   787
                        <or>
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   788
                            <filename name="com/sun/javadoc/"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   789
                        </or>
06bc494ca11e Initial load
duke
parents:
diff changeset
   790
                    </packageset>
06bc494ca11e Initial load
duke
parents:
diff changeset
   791
                </javadoc>
06bc494ca11e Initial load
duke
parents:
diff changeset
   792
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   793
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   794
    </target>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   795
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   796
    <target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home,-check-target.java.home">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   797
        <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant">
06bc494ca11e Initial load
duke
parents:
diff changeset
   798
            <classpath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   799
                <pathelement location="${jtreg.home}/lib/jtreg.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   800
                <pathelement location="${jtreg.home}/lib/javatest.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   801
            </classpath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   802
        </taskdef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   803
        <macrodef name="jtreg-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   804
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   805
            <attribute name="tests"/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   806
            <attribute name="langtools.classes" default="${langtools.classes}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   807
            <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
   808
            <attribute name="samevm" default="true"/>
5849
04edd7910585 6877961: langtools build should allow more options when running jtreg
jjg
parents: 5845
diff changeset
   809
            <attribute name="verbose" default="${default.jtreg.verbose}"/>
04edd7910585 6877961: langtools build should allow more options when running jtreg
jjg
parents: 5845
diff changeset
   810
            <attribute name="options" default="${other.jtreg.options}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   811
            <attribute name="keywords" default="-keywords:!ignore"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   812
            <attribute name="jpda.jvmargs" default=""/>
25848
3bc09f4676a9 8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents: 25697
diff changeset
   813
            <attribute name="extra.jvmargs" default=""/>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   814
            <attribute name="build.dir" default="${build.dir}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   815
            <sequential>
5849
04edd7910585 6877961: langtools build should allow more options when running jtreg
jjg
parents: 5845
diff changeset
   816
                <property name="coverage.options" value=""/>              <!-- default -->
04edd7910585 6877961: langtools build should allow more options when running jtreg
jjg
parents: 5845
diff changeset
   817
                <property name="coverage.classpath" value=""/>            <!-- default -->
04edd7910585 6877961: langtools build should allow more options when running jtreg
jjg
parents: 5845
diff changeset
   818
                <property name="default.jtreg.verbose" value="summary"/>  <!-- default -->
04edd7910585 6877961: langtools build should allow more options when running jtreg
jjg
parents: 5845
diff changeset
   819
                <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
   820
                <jtreg
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   821
                    dir="${test.dir}"
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   822
                    workDir="${build.jtreg.dir}/@{name}/work"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   823
                    reportDir="${build.jtreg.dir}/@{name}/report"
06bc494ca11e Initial load
duke
parents:
diff changeset
   824
                    jdk="@{jdk}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   825
                    samevm="@{samevm}" verbose="@{verbose}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   826
                    failonerror="false" resultproperty="jtreg.@{name}.result"
06bc494ca11e Initial load
duke
parents:
diff changeset
   827
                    javacoptions="-g"
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   828
                    vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}${path.separator}@{langtools.classes} @{jpda.jvmargs} @{extra.jvmargs}">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   829
                    <arg line="@{keywords}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   830
                    <arg line="@{options}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   831
                    <arg line="@{tests}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   832
                </jtreg>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   833
                <!-- the next two properties are for convenience, when only
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   834
                     a single instance of jtreg will be invoked. -->
06bc494ca11e Initial load
duke
parents:
diff changeset
   835
                <condition property="jtreg.passed">
1873
658385834998 6795365: NetBeans projects in langtools repository are not NB6.5-friendly
jjg
parents: 1872
diff changeset
   836
                    <equals arg1="${jtreg.@{name}.result}" arg2="0"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   837
                </condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   838
                <property name="jtreg.report" value="${build.jtreg.dir}/@{name}/report"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   839
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   840
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   841
        <property name="jtreg.defined" value="true"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   842
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   843
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   844
    <target name="-def-checkstyle" unless="checkstyle.defined" depends="-check-checkstyle.home">
11054
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   845
        <taskdef resource="checkstyletask.properties">
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   846
            <classpath>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   847
              <fileset dir="${checkstyle.home}">
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   848
                <include name="checkstyle-*-all.jar"/>
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   849
              </fileset>
11054
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   850
            </classpath>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   851
        </taskdef>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   852
        <property name="checkstyle.defined" value="true"/>
c4224d65eb3e 7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents: 10183
diff changeset
   853
    </target>
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents: 12085
diff changeset
   854
6599
ec0419c70f24 6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents: 6598
diff changeset
   855
    <target name="-def-findbugs" unless="findbugs.defined"
ec0419c70f24 6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents: 6598
diff changeset
   856
        depends="-check-findbugs.home,-check-target.java.home">
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   857
        <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
06bc494ca11e Initial load
duke
parents:
diff changeset
   858
            <classpath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   859
                <pathelement location="${findbugs.home}/lib/findbugs.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   860
            </classpath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   861
        </taskdef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   862
        <macrodef name="findbugs-tool">
06bc494ca11e Initial load
duke
parents:
diff changeset
   863
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   864
            <attribute name="output" default="emacs"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   865
            <attribute name="outputFile" default=""/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   866
            <attribute name="reportLevel" default="high"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   867
            <sequential>
3655
f9ee66e780f4 6758471: should be able to set jtreg options in langtools build
jjg
parents: 3654
diff changeset
   868
                <findbugs
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   869
                    home="${findbugs.home}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   870
                    output="@{output}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   871
                    outputFile="@{outputFile}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   872
                    reportLevel="@{reportLevel}"
06bc494ca11e Initial load
duke
parents:
diff changeset
   873
                    failOnError="false"
06bc494ca11e Initial load
duke
parents:
diff changeset
   874
                    errorProperty="findbugs.@{name}.errors"
06bc494ca11e Initial load
duke
parents:
diff changeset
   875
                    warningsProperty="findbugs.@{name}.warnings"
6599
ec0419c70f24 6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents: 6598
diff changeset
   876
                    jvm="${target.java.home}/bin/java"
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   877
                    jvmargs="-Xmx512M" >
06bc494ca11e Initial load
duke
parents:
diff changeset
   878
                    <class location="${dist.dir}/lib/@{name}.jar"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   879
                    <auxClasspath>
27546
79b6b60ff60a 8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents: 26268
diff changeset
   880
                        <pathelement location="${langtools.classes}"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   881
                    </auxClasspath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   882
                    <sourcePath>
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25848
diff changeset
   883
                        <path refid="src.dirs"/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   884
                    </sourcePath>
06bc494ca11e Initial load
duke
parents:
diff changeset
   885
                </findbugs>
06bc494ca11e Initial load
duke
parents:
diff changeset
   886
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   887
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   888
        <property name="findbugs.defined" value="true"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   889
    </target>
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   890
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   891
    <target name="-def-check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   892
        <macrodef name="check">
06bc494ca11e Initial load
duke
parents:
diff changeset
   893
            <attribute name="name"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   894
            <attribute name="property"/>
5844
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   895
            <attribute name="marker" default=""/>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   896
            <sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   897
                <fail message="Cannot locate @{name}: please set @{property} to its location">
06bc494ca11e Initial load
duke
parents:
diff changeset
   898
                    <condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   899
                        <not>
06bc494ca11e Initial load
duke
parents:
diff changeset
   900
                            <isset property="@{property}"/>
06bc494ca11e Initial load
duke
parents:
diff changeset
   901
                        </not>
06bc494ca11e Initial load
duke
parents:
diff changeset
   902
                    </condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   903
                </fail>
06bc494ca11e Initial load
duke
parents:
diff changeset
   904
                <fail message="@{name} is not installed in ${@{property}}">
06bc494ca11e Initial load
duke
parents:
diff changeset
   905
                    <condition>
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   906
                        <and>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   907
                            <not>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   908
                                <equals arg1="@{marker}" arg2=""/>
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   909
                            </not>
5844
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   910
                            <not>
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   911
                                <available file="${@{property}}/@{marker}"/>
76650bf67a5c 6958391: add vizant support to langtools build
jjg
parents: 5520
diff changeset
   912
                            </not>
5845
6b8e5689445a 6958802: cleanup and doc langtools build.xml file
jjg
parents: 5844
diff changeset
   913
                        </and>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   914
                    </condition>
06bc494ca11e Initial load
duke
parents:
diff changeset
   915
                </fail>
06bc494ca11e Initial load
duke
parents:
diff changeset
   916
            </sequential>
06bc494ca11e Initial load
duke
parents:
diff changeset
   917
        </macrodef>
06bc494ca11e Initial load
duke
parents:
diff changeset
   918
    </target>
06bc494ca11e Initial load
duke
parents:
diff changeset
   919
06bc494ca11e Initial load
duke
parents:
diff changeset
   920
</project>
06bc494ca11e Initial load
duke
parents:
diff changeset
   921