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