author | jjg |
Thu, 23 Jun 2011 11:49:27 -0700 | |
changeset 10183 | 63f2f2e5f642 |
parent 9303 | eae35c201e19 |
child 11054 | c4224d65eb3e |
permissions | -rw-r--r-- |
10 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- |
|
8226
8c2fd7e7bcf3
7013272: Automatically generate info about how compiler resource keys are used
jjg
parents:
8041
diff
changeset
|
3 |
Copyright (c) 2007, 2011, 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 |
|
86 |
- groups of targets for each tool: javac, javadoc, doclets, javah, javap, apt |
|
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"/> |
|
134 |
<property name="dist.lib.dir" location="${dist.dir}/lib"/> |
|
135 |
<property name="make.dir" location="make"/> |
|
136 |
<property name="make.tools.dir" location="${make.dir}/tools"/> |
|
137 |
<property name="src.dir" location="src"/> |
|
138 |
<property name="src.bin.dir" location="${src.dir}/share/bin"/> |
|
139 |
<property name="src.classes.dir" location="${src.dir}/share/classes"/> |
|
140 |
<property name="test.dir" location="test"/> |
|
141 |
||
142 |
<!-- java.marker is set to a marker file to check for within a Java install dir. |
|
143 |
The best file to check for across Solaris/Linux/Windows/MacOS is one of the |
|
144 |
executables; regrettably, that is OS-specific. --> |
|
145 |
<condition property="java.marker" value="bin/java"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
146 |
<os family="unix"/> |
10 | 147 |
</condition> |
148 |
<condition property="java.marker" value="bin/java.exe"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
149 |
<os family="windows"/> |
10 | 150 |
</condition> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
151 |
|
10 | 152 |
<!-- Standard property values, if not overriden by earlier settings. --> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
153 |
<property file="${make.dir}/build.properties"/> |
3654 | 154 |
|
155 |
<!-- launcher.java is used in the launcher scripts provided to run |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
156 |
the tools' jar files. If it has not already been set, then |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
157 |
default it to use ${target.java.home}, if available, otherwise |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
158 |
quietly default to simply use "java". --> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
159 |
<condition property="launcher.java" |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
160 |
value="${target.java.home}/bin/java" else="java"> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
161 |
<isset property="target.java.home"/> |
3654 | 162 |
</condition> |
163 |
||
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
164 |
<!-- Logic for handling access import jdk classes, if available. |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
165 |
import.jdk should be unset, or set to jdk home (to use rt.jar) |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
166 |
or to jdk repo (to use src/share/classes). |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
167 |
Based on the value, if any, set up default values for javac's sourcepath, |
4548 | 168 |
classpath and bootclasspath. Note: the default values are overridden |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
169 |
in the build-bootstrap-classes macro. --> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
170 |
|
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
171 |
<available property="import.jdk.src.dir" value="${import.jdk}/src/share/classes" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
172 |
filepath="${import.jdk}/src/share/classes" file="java/nio/file/Path.java"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
173 |
<available property="import.jdk.jar" value="${import.jdk}/jre/lib/rt.jar" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
174 |
ignoresystemclasses="true" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
175 |
classpath="${import.jdk}/jre/lib/rt.jar" classname="java.nio.file.Path"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
176 |
|
5845 | 177 |
<!-- Set the default bootclasspath option used for javac. |
178 |
Note that different variants of the option are used, meaning we can't just |
|
179 |
define the value for the option. |
|
180 |
Note the explicit use of the standard property ${path.separator} in the following. |
|
181 |
This is because Ant is not clever enough to handle direct use of : or ; --> |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
182 |
<condition property="javac.bootclasspath.opt" |
4698
4ea5b8e20252
6915152: langtools build failures with import.jdk on Windows
jjg
parents:
4548
diff
changeset
|
183 |
value="-Xbootclasspath:${build.classes.dir}${path.separator}${import.jdk.jar}" |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
184 |
else="-Xbootclasspath/p:${build.classes.dir}"> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
185 |
<isset property="import.jdk.jar"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
186 |
</condition> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
187 |
|
5845 | 188 |
<condition property="boot.java.provides.latest.jdk"> |
189 |
<available |
|
190 |
ignoresystemclasses="true" |
|
191 |
classpath="${boot.java.home}/jre/lib/rt.jar" classname="java.nio.file.Path"/> |
|
192 |
</condition> |
|
193 |
||
194 |
<condition property="bootstrap.exclude.files" value="" else="${require.latest.jdk.files}"> |
|
195 |
<isset property="boot.java.provides.latest.jdk"/> |
|
196 |
</condition> |
|
197 |
||
198 |
<condition property="exclude.files" value="" else="${require.latest.jdk.files}"> |
|
199 |
<or> |
|
200 |
<isset property="boot.java.provides.latest.jdk"/> |
|
201 |
<isset property="import.jdk"/> |
|
202 |
</or> |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
203 |
</condition> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
204 |
|
5845 | 205 |
<condition property="require.import.jdk.stubs"> |
206 |
<and> |
|
207 |
<not> |
|
208 |
<isset property="boot.java.provides.latest.jdk"/> |
|
209 |
</not> |
|
210 |
<isset property="import.jdk.src.dir"/> |
|
211 |
</and> |
|
212 |
</condition> |
|
213 |
||
214 |
<!-- Set the default value of the sourcepath used for javac. --> |
|
215 |
<condition property="javac.sourcepath" value="${build.genstubs.dir}" else=""> |
|
216 |
<isset property="require.import.jdk.stubs"/> |
|
217 |
</condition> |
|
218 |
||
219 |
<!-- Set the default value of the classpath used for javac. --> |
|
220 |
<property name="javac.classpath" value=""/> |
|
221 |
||
222 |
||
223 |
<!-- |
|
224 |
**** General top level targets. |
|
225 |
--> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
226 |
|
10 | 227 |
<!-- Standard target to build deliverables for JDK build. --> |
228 |
||
229 |
<target name="build" depends="build-bootstrap-tools,build-all-classes"> |
|
230 |
<copy todir="${dist.dir}/bootstrap"> |
|
231 |
<fileset dir="${build.bootstrap.dir}" includes="bin/,lib/"/> |
|
232 |
</copy> |
|
233 |
<chmod dir="${dist.dir}/bootstrap/bin" perm="ugo+rx"> |
|
234 |
<include name="*"/> |
|
235 |
</chmod> |
|
236 |
<mkdir dir="${dist.lib.dir}"/> |
|
237 |
<jar file="${dist.lib.dir}/classes.jar" basedir="${build.classes.dir}"/> |
|
238 |
<zip file="${dist.lib.dir}/src.zip" basedir="${src.classes.dir}"/> |
|
239 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
240 |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
241 |
<target name="build-bootstrap-tools" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
242 |
depends="build-bootstrap-javac,build-bootstrap-javadoc,build-bootstrap-doclets,build-bootstrap-javah" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
243 |
/> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
244 |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
245 |
<target name="build-all-tools" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
246 |
depends="build-javac,build-javadoc,build-doclets,build-javah,build-javap,build-apt" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
247 |
/> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
248 |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
249 |
<target name="build-all-classes" depends="build-bootstrap-javac,-create-import-jdk-stubs"> |
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
250 |
<build-classes includes="${javac.includes} ${javadoc.includes} ${doclets.includes} ${javah.includes} ${javap.includes} ${apt.includes}"/> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
251 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
252 |
|
10 | 253 |
<!-- clean --> |
254 |
||
255 |
<target name="clean" description="Delete all generated files"> |
|
256 |
<delete dir="${build.dir}"/> |
|
257 |
<delete dir="${dist.dir}"/> |
|
258 |
</target> |
|
259 |
||
260 |
<!-- Additional targets for running tools on the build --> |
|
261 |
||
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
262 |
<target name="jtreg" depends="build-all-tools,-def-jtreg"> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
263 |
<jtreg-tool name="all" tests="${jtreg.tests}"/> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
264 |
</target> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
265 |
|
10 | 266 |
<target name="findbugs" depends="-def-findbugs,build-all-tools"> |
267 |
<property name="findbugs.reportLevel" value="medium"/> |
|
268 |
<mkdir dir="${dist.findbugs.dir}"/> |
|
269 |
<findbugs |
|
270 |
home="${findbugs.home}" |
|
271 |
projectName="JDK langtools ${full.version}" |
|
272 |
output="xml" |
|
273 |
outputFile="${dist.findbugs.dir}/findbugs.xml" |
|
274 |
reportLevel="${findbugs.reportLevel}" |
|
275 |
failOnError="false" |
|
276 |
errorProperty="findbugs.all.errors" |
|
277 |
warningsProperty="findbugs.all.warnings" |
|
6599
ec0419c70f24
6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents:
6598
diff
changeset
|
278 |
jvm="${target.java.home}/bin/java" |
10 | 279 |
jvmargs="-Xmx512M"> |
280 |
<class location="${build.classes.dir}"/> |
|
281 |
<sourcePath> |
|
282 |
<pathelement location="${src.classes.dir}"/> |
|
283 |
</sourcePath> |
|
284 |
</findbugs> |
|
285 |
<exec executable="sh"> |
|
286 |
<arg value="${findbugs.home}/bin/convertXmlToText"/> |
|
287 |
<arg value="-longBugCodes"/> |
|
288 |
<arg value="-html:${findbugs.home}/src/xsl/fancy.xsl"/> |
|
289 |
<arg value="${dist.findbugs.dir}/findbugs.xml"/> |
|
290 |
<redirector output="${dist.findbugs.dir}/findbugs.html"/> |
|
727
cb50c1ae7bab
4075303: Use javap to enquire aboput a specific inner class
jjg
parents:
10
diff
changeset
|
291 |
</exec> |
10 | 292 |
</target> |
293 |
||
294 |
<target name="coverage" depends="-def-cobertura,build-all-classes,instrument-classes,jtreg,coverage-report"/> |
|
295 |
||
296 |
<target name="instrument-classes" depends="-def-cobertura"> |
|
297 |
<!-- only define the following property when we want coverage info --> |
|
298 |
<path id="coverage.classpath"> |
|
299 |
<pathelement location="${build.coverage.dir}/classes"/> |
|
300 |
<path refid="cobertura.classpath"/> |
|
301 |
</path> |
|
302 |
<property name="coverage.options" value="-Dnet.sourceforge.cobertura.datafile=${build.coverage.dir}/cobertura.ser"/> |
|
303 |
<property name="coverage.classpath" refid="coverage.classpath"/> |
|
304 |
<mkdir dir="${build.coverage.dir}/classes"/> |
|
305 |
<delete file="${build.coverage.dir}/cobertura.ser"/> |
|
306 |
<cobertura-instrument todir="${build.coverage.dir}/classes" |
|
307 |
datafile="${build.coverage.dir}/cobertura.ser"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
308 |
<fileset dir="${build.classes.dir}" |
10 | 309 |
includes="**/*.class" excludes="**/resources/*.class"/> |
310 |
</cobertura-instrument> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
311 |
</target> |
10 | 312 |
|
313 |
<target name="coverage-report" depends="-def-cobertura"> |
|
314 |
<mkdir dir="${dist.coverage.dir}"/> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
315 |
<cobertura-report |
10 | 316 |
srcdir="${src.classes.dir}" |
317 |
destdir="${dist.coverage.dir}" |
|
318 |
datafile="${build.coverage.dir}/cobertura.ser"/> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
319 |
<cobertura-report |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
320 |
format="xml" |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
321 |
srcdir="${src.classes.dir}" |
10 | 322 |
destdir="${dist.coverage.dir}" |
323 |
datafile="${build.coverage.dir}/cobertura.ser"/> |
|
324 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
325 |
|
6149
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
326 |
<target name="diags-examples" depends="build-javac"> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
327 |
<!-- can override the following on the command line if desired. --> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
328 |
<property name="diags.examples.out" location="${build.dir}/diag-examples/diags-examples.html"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
329 |
<mkdir dir="${build.dir}/diag-examples/classes"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
330 |
<javac fork="true" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
331 |
executable="${dist.bin.dir}/javac" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
332 |
srcdir="test/tools/javac/diags" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
333 |
destdir="${build.dir}/diag-examples/classes" |
8226
8c2fd7e7bcf3
7013272: Automatically generate info about how compiler resource keys are used
jjg
parents:
8041
diff
changeset
|
334 |
includes="ArgTypeCompilerFactory.java,Example.java,FileManager.java,HTMLWriter.java,RunExamples.java" |
6149
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
335 |
sourcepath="" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
336 |
classpath="${dist.lib.dir}/javac.jar" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
337 |
includeAntRuntime="no" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
338 |
debug="${javac.debug}" |
10183 | 339 |
debuglevel="${javac.debuglevel}"> |
340 |
<compilerarg line="${javac.lint.opts}"/> |
|
341 |
</javac> |
|
6149
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
342 |
<java fork="true" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
343 |
jvm="${target.java.home}/bin/java" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
344 |
dir="test/tools/javac/diags" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
345 |
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
|
346 |
classname="RunExamples"> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
347 |
<arg value="-examples"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
348 |
<arg value="examples"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
349 |
<arg value="-o"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
350 |
<arg file="${diags.examples.out}"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
351 |
<arg value="-showFiles"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
352 |
<arg value="-title"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
353 |
<arg value="Examples of javac diagnostics"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
354 |
</java> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
355 |
</target> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
356 |
|
8041
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
357 |
<!-- 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
|
358 |
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
|
359 |
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
|
360 |
patching the jdk used for jtreg and other tests. |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
361 |
--> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
362 |
<target name="patch" depends="build-all-classes"> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
363 |
<condition property="patch.jdk" value="${target.java.home}"> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
364 |
<available file="${target.java.home}" type="dir"/> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
365 |
</condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
366 |
<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
|
367 |
<condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
368 |
<not> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
369 |
<isset property="patch.jdk"/> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
370 |
</not> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
371 |
</condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
372 |
</fail> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
373 |
<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
|
374 |
<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
|
375 |
<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
|
376 |
<condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
377 |
<not> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
378 |
<available file="${patch.tools.jar}" type="file"/> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
379 |
</not> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
380 |
</condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
381 |
</fail> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
382 |
<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
|
383 |
<condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
384 |
<not> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
385 |
<available file="${patch.rt.jar}" type="file"/> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
386 |
</not> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
387 |
</condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
388 |
</fail> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
389 |
<zip zipfile="${patch.tools.jar}" update="true"> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
390 |
<zipfileset dir="${build.classes.dir}" includes="com/**"/> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
391 |
</zip> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
392 |
<zip zipfile="${patch.rt.jar}" update="true"> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
393 |
<zipfileset dir="${build.classes.dir}" includes="javax/**"/> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
394 |
</zip> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
395 |
</target> |
5845 | 396 |
|
397 |
<!-- |
|
398 |
**** Debugging/diagnostic targets. |
|
399 |
--> |
|
400 |
||
401 |
<!-- standard JDK target --> |
|
402 |
<target name="sanity" |
|
403 |
description="display settings of configuration values"> |
|
404 |
<echo level="info">ant.home = ${ant.home}</echo> |
|
405 |
<echo level="info">boot.java.home = ${boot.java.home}</echo> |
|
406 |
<echo level="info">target.java.home = ${target.java.home}</echo> |
|
407 |
<echo level="info">jtreg.home = ${jtreg.home}</echo> |
|
408 |
<echo level="info">findbugs.home = ${findbugs.home}</echo> |
|
409 |
</target> |
|
410 |
||
411 |
<target name="post-sanity" depends="-def-jtreg,sanity,build" |
|
412 |
description="perform basic validation after a standard build"> |
|
413 |
<jtreg |
|
414 |
dir="make/test" |
|
415 |
workDir="${build.jtreg.dir}/post-sanity/work" |
|
416 |
reportDir="${build.jtreg.dir}/post-sanity/report" |
|
417 |
jdk="${target.java.home}" |
|
418 |
verbose="summary" |
|
419 |
failonerror="false" resultproperty="jtreg.post-sanity.result"> |
|
420 |
</jtreg> |
|
421 |
</target> |
|
422 |
||
423 |
<!-- use vizant tool to generate graphical image of this Ant file.--> |
|
424 |
<target name="vizant" depends="-def-vizant"> |
|
425 |
<mkdir dir="${build.dir}"/> |
|
426 |
<echo message="Generating ${build.dir}/build.dot"/> |
|
427 |
<vizant antfile="${make.dir}/build.xml" outfile="${build.dir}/build.dot"/> |
|
428 |
<echo message="Generating ${build.dir}/build.png"/> |
|
429 |
<exec executable="${dot}" > |
|
430 |
<arg value="-Tpng"/> |
|
431 |
<arg value="-o"/> |
|
432 |
<arg file="${build.dir}/build.png"/> |
|
433 |
<arg file="${build.dir}/build.dot"/> |
|
434 |
</exec> |
|
435 |
</target> |
|
436 |
||
437 |
<target name="check-import.jdk"> |
|
438 |
<echo message="import.jdk: ${import.jdk}"/> |
|
439 |
<echo message="import.jdk.jar: ${import.jdk.jar}"/> |
|
440 |
<echo message="import.jdk.src.dir: ${import.jdk.src.dir}"/> |
|
441 |
</target> |
|
442 |
||
443 |
<target name="diagnostics"> |
|
444 |
<diagnostics/> |
|
445 |
</target> |
|
446 |
||
447 |
||
448 |
<!-- |
|
449 |
**** javac targets. |
|
450 |
--> |
|
10 | 451 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
452 |
<target name="build-bootstrap-javac" |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
453 |
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
|
454 |
<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
|
455 |
<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
|
456 |
<build-bootstrap-tool name="javac"/> |
10 | 457 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
458 |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
459 |
<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
|
460 |
<build-classes includes="${javac.includes}"/> |
10 | 461 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
462 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
463 |
<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
|
464 |
<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
|
465 |
<build-tool name="javac"/> |
10 | 466 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
467 |
|
10 | 468 |
<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
|
469 |
<javadoc-tool name="javac" includes="${javac.includes}" options="${javadoc.jls.option}"/> |
10 | 470 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
471 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
472 |
<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
|
473 |
<jtreg-tool name="javac" tests="${javac.tests}"/> |
10 | 474 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
475 |
|
10 | 476 |
<target name="findbugs-javac" depends="build-javac,-def-findbugs"> |
477 |
<findbugs-tool name="javac"/> |
|
478 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
479 |
|
10 | 480 |
<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
|
481 |
|
5845 | 482 |
|
483 |
<!-- |
|
484 |
**** javadoc targets. |
|
485 |
--> |
|
10 | 486 |
|
487 |
<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
|
488 |
<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
|
489 |
<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
|
490 |
jarclasspath="javac.jar doclets.jar"/> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
491 |
<build-bootstrap-tool name="javadoc"/> |
10 | 492 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
493 |
|
10 | 494 |
<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
|
495 |
<build-classes includes="${javadoc.includes}"/> |
10 | 496 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
497 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
498 |
<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
|
499 |
<build-jar name="javadoc" includes="${javadoc.includes}" |
10 | 500 |
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
|
501 |
<build-tool name="javadoc"/> |
10 | 502 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
503 |
|
10 | 504 |
<target name="javadoc-javadoc" depends="build-javadoc,-def-javadoc-tool"> |
505 |
<javadoc-tool name="javadoc" includes="${javadoc.includes}"/> |
|
506 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
507 |
|
10 | 508 |
<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
|
509 |
<jtreg-tool name="javadoc" tests="${javadoc.tests}"/> |
10 | 510 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
511 |
|
10 | 512 |
<target name="findbugs-javadoc" depends="build-javadoc,-def-findbugs"> |
513 |
<findbugs-tool name="javadoc"/> |
|
514 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
515 |
|
10 | 516 |
<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
|
517 |
|
5845 | 518 |
|
519 |
<!-- |
|
520 |
**** doclets targets. |
|
521 |
--> |
|
10 | 522 |
|
523 |
<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
|
524 |
<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
|
525 |
<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
|
526 |
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
|
527 |
jarclasspath="javadoc.jar"/> |
10 | 528 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
529 |
|
10 | 530 |
<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
|
531 |
<build-classes includes="${doclets.includes}"/> |
10 | 532 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
533 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
534 |
<target name="build-doclets" depends="build-javadoc,build-classes-doclets"> |
10 | 535 |
<!-- 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
|
536 |
<build-jar name="doclets" includes="${doclets.includes}" jarclasspath="javadoc.jar"/> |
10 | 537 |
</target> |
538 |
||
539 |
<!-- (no javadoc for doclets) --> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
540 |
|
10 | 541 |
<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
|
542 |
<jtreg-tool name="doclets" tests="${doclets.tests}"/> |
10 | 543 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
544 |
|
10 | 545 |
<target name="findbugs-doclets" depends="build-doclets,-def-findbugs"> |
546 |
<findbugs-tool name="doclets"/> |
|
547 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
548 |
|
10 | 549 |
<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
|
550 |
|
5845 | 551 |
|
552 |
<!-- |
|
553 |
**** javah targets. |
|
554 |
--> |
|
10 | 555 |
|
556 |
<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
|
557 |
<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
|
558 |
<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
|
559 |
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
|
560 |
<build-bootstrap-tool name="javah"/> |
10 | 561 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
562 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
563 |
<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
|
564 |
<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
|
565 |
<build-tool name="javah"/> |
10 | 566 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
567 |
|
10 | 568 |
<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
|
569 |
<build-classes includes="${javah.includes}"/> |
10 | 570 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
571 |
|
10 | 572 |
<!-- (no javadoc for javah) --> |
573 |
||
574 |
<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
|
575 |
<jtreg-tool name="javah" tests="${javah.tests}"/> |
10 | 576 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
577 |
|
10 | 578 |
<target name="findbugs-javah" depends="build-javah,-def-findbugs"> |
579 |
<findbugs-tool name="javah"/> |
|
580 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
581 |
|
10 | 582 |
<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
|
583 |
|
5845 | 584 |
|
585 |
<!-- |
|
586 |
**** javap targets. |
|
587 |
--> |
|
10 | 588 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
589 |
<target name="build-bootstrap-javap" |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
590 |
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
|
591 |
<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
|
592 |
<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
|
593 |
jarmainclass="sun.tools.javap.Main"/> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
594 |
<build-bootstrap-tool name="javap"/> |
10 | 595 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
596 |
|
727
cb50c1ae7bab
4075303: Use javap to enquire aboput a specific inner class
jjg
parents:
10
diff
changeset
|
597 |
<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
|
598 |
<build-classes includes="${javap.includes}"/> |
10 | 599 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
600 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
601 |
<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
|
602 |
<build-jar name="javap" includes="${javap.includes}" |
2987 | 603 |
jarmainclass="com.sun.tools.javap.Main" |
727
cb50c1ae7bab
4075303: Use javap to enquire aboput a specific inner class
jjg
parents:
10
diff
changeset
|
604 |
jarclasspath="javac.jar"/> |
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
605 |
<build-tool name="javap"/> |
10 | 606 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
607 |
|
10 | 608 |
<!-- (no javadoc for javap) --> |
609 |
||
610 |
<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
|
611 |
<jtreg-tool name="javap" tests="${javap.tests}"/> |
10 | 612 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
613 |
|
10 | 614 |
<target name="findbugs-javap" depends="build-javap,-def-findbugs"> |
615 |
<findbugs-tool name="javap"/> |
|
616 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
617 |
|
10 | 618 |
<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
|
619 |
|
5845 | 620 |
|
621 |
<!-- |
|
622 |
**** apt targets. |
|
623 |
--> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
624 |
|
10 | 625 |
<target name="build-bootstrap-apt" depends="build-bootstrap-javac"> |
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
626 |
<build-bootstrap-classes includes="${apt.includes}"/> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
627 |
<build-bootstrap-jar name="apt" includes="${apt.includes}" |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
628 |
jarclasspath="javac.jar"/> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
629 |
<build-bootstrap-tool name="apt"/> |
10 | 630 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
631 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
632 |
<target name="build-apt" depends="build-javac,build-classes-apt"> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
633 |
<build-jar name="apt" includes="${apt.includes}" jarclasspath="javac.jar"/> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
634 |
<build-tool name="apt"/> |
10 | 635 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
636 |
|
10 | 637 |
<target name="build-classes-apt" depends="build-classes-javac"> |
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
638 |
<build-classes includes="${apt.includes}"/> |
10 | 639 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
640 |
|
10 | 641 |
<target name="javadoc-apt" depends="build-apt,-def-javadoc-tool"> |
642 |
<javadoc-tool name="apt" includes="${apt.includes}"/> |
|
643 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
644 |
|
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
645 |
|
10 | 646 |
<target name="jtreg-apt" depends="build-apt,-def-jtreg"> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
647 |
<jtreg-tool name="apt" tests="${apt.tests}"/> |
10 | 648 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
649 |
|
10 | 650 |
<target name="findbugs-apt" depends="build-apt,-def-findbugs"> |
651 |
<findbugs-tool name="apt"/> |
|
652 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
653 |
|
10 | 654 |
<target name="apt" depends="build-apt,jtreg-apt,findbugs-apt"/> |
655 |
||
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
656 |
|
5845 | 657 |
<!-- |
658 |
**** Create import JDK stubs. |
|
659 |
--> |
|
660 |
||
661 |
<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
|
662 |
<mkdir dir="${build.genstubs.dir}"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
663 |
<genstubs |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
664 |
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
|
665 |
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
|
666 |
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
|
667 |
/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
668 |
</target> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
669 |
|
5845 | 670 |
|
671 |
<!-- |
|
672 |
**** Check targets. |
|
673 |
**** "-check-*" targets check that a required property is set, and set to a reasonable value. |
|
674 |
**** A user friendly message is generated if not, and the build exits. |
|
675 |
--> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
676 |
|
10 | 677 |
<target name="-check-boot.java.home" depends="-def-check"> |
678 |
<check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/> |
|
679 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
680 |
|
10 | 681 |
<target name="-check-target.java.home" depends="-def-check"> |
682 |
<check name="target java" property="target.java.home" marker="${java.marker}"/> |
|
683 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
684 |
|
10 | 685 |
<target name="-check-cobertura.home" depends="-def-check"> |
686 |
<check name="cobertura" property="cobertura.home" marker="cobertura.jar"/> |
|
687 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
688 |
|
10 | 689 |
<target name="-check-findbugs.home" depends="-def-check"> |
690 |
<check name="findbugs" property="findbugs.home" marker="lib/findbugs.jar"/> |
|
691 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
692 |
|
10 | 693 |
<target name="-check-jtreg.home" depends="-def-check"> |
694 |
<check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/> |
|
695 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
696 |
|
5844 | 697 |
<target name="-check-vizant" depends="-def-check"> |
698 |
<check name="vizant" property="vizant.jar"/> |
|
699 |
<check name="dot" property="dot"/> |
|
700 |
</target> |
|
701 |
||
5845 | 702 |
|
703 |
<!-- |
|
704 |
**** Targets for Ant macro and task definitions. |
|
705 |
--> |
|
10 | 706 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
707 |
<target name="-def-build-tool"> |
10 | 708 |
<macrodef name="build-tool"> |
709 |
<attribute name="name"/> |
|
710 |
<attribute name="bin.dir" default="${dist.bin.dir}"/> |
|
3654 | 711 |
<attribute name="java" default="${launcher.java}"/> |
10 | 712 |
<sequential> |
713 |
<mkdir dir="@{bin.dir}"/> |
|
714 |
<copy file="${src.bin.dir}/launcher.sh-template" tofile="@{bin.dir}/@{name}"> |
|
715 |
<filterset begintoken="#" endtoken="#"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
716 |
<filter token="PROGRAM" value="@{name}"/> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
717 |
<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
|
718 |
<filter token="PS" value="${path.separator}"/> |
10 | 719 |
</filterset> |
720 |
</copy> |
|
721 |
<chmod file="@{bin.dir}/@{name}" perm="ugo+rx"/> |
|
722 |
</sequential> |
|
723 |
</macrodef> |
|
724 |
</target> |
|
725 |
||
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
726 |
<target name="-def-build-jar"> |
10 | 727 |
<macrodef name="build-jar"> |
728 |
<attribute name="name"/> |
|
729 |
<attribute name="includes"/> |
|
730 |
<attribute name="classes.dir" default="${build.classes.dir}"/> |
|
731 |
<attribute name="lib.dir" default="${dist.lib.dir}"/> |
|
732 |
<attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/> |
|
733 |
<attribute name="jarclasspath" default=""/> |
|
734 |
<sequential> |
|
735 |
<mkdir dir="@{lib.dir}"/> |
|
736 |
<jar destfile="@{lib.dir}/@{name}.jar" |
|
737 |
basedir="@{classes.dir}" |
|
738 |
includes="@{includes}"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
739 |
<manifest> |
10 | 740 |
<attribute name="Main-Class" value="@{jarmainclass}"/> |
741 |
<attribute name="Class-Path" value="@{jarclasspath}"/> |
|
742 |
</manifest> |
|
743 |
</jar> |
|
744 |
</sequential> |
|
745 |
</macrodef> |
|
746 |
</target> |
|
747 |
||
748 |
<target name="-def-build-classes" depends="-def-pcompile"> |
|
749 |
<macrodef name="build-classes"> |
|
750 |
<attribute name="includes"/> |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
751 |
<attribute name="excludes" default="${exclude.files} **/package-info.java"/> |
10 | 752 |
<attribute name="classes.dir" default="${build.classes.dir}"/> |
753 |
<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
|
754 |
<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
|
755 |
<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
|
756 |
<attribute name="classpath" default="${javac.classpath}"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
757 |
<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
|
758 |
<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
|
759 |
<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
|
760 |
<attribute name="target" default="${javac.target}"/> |
10 | 761 |
<attribute name="release" default="${release}"/> |
762 |
<attribute name="full.version" default="${full.version}"/> |
|
763 |
<sequential> |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
764 |
<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
|
765 |
<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
|
766 |
<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
|
767 |
<echo level="verbose" message="build-classes: sourcepath=@{sourcepath}"/> |
10 | 768 |
<mkdir dir="@{gensrc.dir}"/> |
769 |
<mkdir dir="@{classes.dir}"/> |
|
770 |
<pcompile srcdir="${src.classes.dir}" |
|
771 |
destdir="@{gensrc.dir}" |
|
772 |
includes="@{includes}"/> |
|
773 |
<copy todir="@{gensrc.dir}"> |
|
727
cb50c1ae7bab
4075303: Use javap to enquire aboput a specific inner class
jjg
parents:
10
diff
changeset
|
774 |
<fileset dir="${src.classes.dir}" includes="@{includes}"/> |
10 | 775 |
<globmapper from="*.properties-template" to="*.properties"/> |
776 |
<filterset begintoken="$(" endtoken=")"> |
|
777 |
<filter token="JDK_VERSION" value="${jdk.version}"/> |
|
778 |
<filter token="RELEASE" value="@{release}"/> |
|
779 |
<filter token="FULL_VERSION" value="@{full.version}"/> |
|
780 |
</filterset> |
|
781 |
</copy> |
|
782 |
<pcompile srcdir="@{gensrc.dir}" |
|
783 |
destdir="@{gensrc.dir}" |
|
784 |
includes="**/*.properties"/> |
|
785 |
<javac fork="true" |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
786 |
executable="@{java.home}/bin/javac" |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
787 |
srcdir="${src.classes.dir}:@{gensrc.dir}" |
10 | 788 |
destdir="@{classes.dir}" |
789 |
includes="@{includes}" |
|
790 |
excludes="@{excludes}" |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
791 |
sourcepath="@{sourcepath}" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
792 |
classpath="@{classpath}" |
10 | 793 |
includeAntRuntime="no" |
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
794 |
source="@{source}" |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
795 |
target="@{target}" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
796 |
debug="${javac.debug}" |
10 | 797 |
debuglevel="${javac.debuglevel}"> |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
798 |
<compilerarg value="-implicit:none"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
799 |
<compilerarg value="-Xprefer:source"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
800 |
<compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
801 |
<compilerarg line="@{bootclasspath.opt}"/> |
10 | 802 |
<compilerarg line="${javac.no.jdk.warnings}"/> |
803 |
<compilerarg line="${javac.version.opt}"/> |
|
804 |
<compilerarg line="${javac.lint.opts}"/> |
|
805 |
</javac> |
|
4548 | 806 |
<copy todir="@{classes.dir}" includeemptydirs="false"> |
807 |
<fileset dir="${src.classes.dir}" includes="@{includes}" excludes="@{excludes}"> |
|
10 | 808 |
<exclude name="**/*.java"/> |
809 |
<exclude name="**/*.properties"/> |
|
810 |
<exclude name="**/*-template"/> |
|
9070
f847fe5cad3d
7009599: javac build puts extraneous files into dist/lib/classes.jar
jjg
parents:
8423
diff
changeset
|
811 |
<exclude name="**/*.rej"/> |
f847fe5cad3d
7009599: javac build puts extraneous files into dist/lib/classes.jar
jjg
parents:
8423
diff
changeset
|
812 |
<exclude name="**/*.orig"/> |
f847fe5cad3d
7009599: javac build puts extraneous files into dist/lib/classes.jar
jjg
parents:
8423
diff
changeset
|
813 |
<exclude name="**/overview.html"/> |
10 | 814 |
<exclude name="**/package.html"/> |
815 |
</fileset> |
|
816 |
</copy> |
|
817 |
</sequential> |
|
818 |
</macrodef> |
|
819 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
820 |
|
10 | 821 |
<target name="-def-build-bootstrap-tool" depends="-check-boot.java.home,-def-build-tool"> |
822 |
<presetdef name="build-bootstrap-tool"> |
|
823 |
<build-tool |
|
824 |
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
|
825 |
java="${boot.java}"/> |
10 | 826 |
</presetdef> |
827 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
828 |
|
10 | 829 |
<target name="-def-build-bootstrap-jar" depends="-def-build-jar"> |
830 |
<presetdef name="build-bootstrap-jar"> |
|
831 |
<build-jar |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
832 |
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
|
833 |
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
|
834 |
</presetdef> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
835 |
</target> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
836 |
|
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
837 |
<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
|
838 |
<presetdef name="build-bootstrap-classes"> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
839 |
<build-classes |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
840 |
source="${boot.javac.source}" |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
841 |
target="${boot.javac.target}" |
10 | 842 |
gensrc.dir="${build.bootstrap.dir}/gensrc" |
843 |
classes.dir="${build.bootstrap.dir}/classes" |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
844 |
javac.bootclasspath="" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
845 |
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
|
846 |
sourcepath="" |
10 | 847 |
release="${bootstrap.release}" |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
848 |
full.version="${bootstrap.full.version}" |
5845 | 849 |
excludes="${bootstrap.exclude.files} **/package-info.java"/> |
10 | 850 |
</presetdef> |
851 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
852 |
|
10 | 853 |
<target name="-def-pcompile"> |
854 |
<mkdir dir="${build.toolclasses.dir}"/> |
|
1871
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
855 |
<javac fork="true" |
3658
8ee720a52b7d
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
3655
diff
changeset
|
856 |
source="${boot.javac.source}" |
8ee720a52b7d
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
3655
diff
changeset
|
857 |
target="${boot.javac.target}" |
1871
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
858 |
executable="${boot.java.home}/bin/javac" |
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
859 |
srcdir="${make.tools.dir}/CompileProperties" |
10 | 860 |
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
|
861 |
classpath="${ant.core.lib}" |
10183 | 862 |
bootclasspath="${boot.java.home}/jre/lib/rt.jar" |
863 |
includeantruntime="false"> |
|
864 |
<compilerarg line="${javac.lint.opts}"/> |
|
865 |
</javac> |
|
10 | 866 |
<taskdef name="pcompile" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
867 |
classname="CompilePropertiesTask" |
10 | 868 |
classpath="${build.toolclasses.dir}/"/> |
869 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
870 |
|
5845 | 871 |
<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
|
872 |
<mkdir dir="${build.toolclasses.dir}"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
873 |
<javac fork="true" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
874 |
source="${boot.javac.source}" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
875 |
target="${boot.javac.target}" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
876 |
executable="${boot.java.home}/bin/javac" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
877 |
srcdir="${make.tools.dir}/GenStubs" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
878 |
destdir="${build.toolclasses.dir}/" |
8423 | 879 |
classpath="${ant.core.lib}" |
880 |
includeantruntime="false"> |
|
881 |
<compilerarg value="-Xbootclasspath/p:${build.bootstrap.dir}/classes"/> |
|
10183 | 882 |
<compilerarg line="${javac.lint.opts}"/> |
8423 | 883 |
</javac> |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
884 |
<taskdef name="genstubs" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
885 |
classname="GenStubs$$Ant" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
886 |
classpath="${build.toolclasses.dir}/"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
887 |
</target> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
888 |
|
10 | 889 |
<target name="-def-javadoc-tool" depends="-check-target.java.home"> |
890 |
<macrodef name="javadoc-tool"> |
|
891 |
<attribute name="name"/> |
|
892 |
<attribute name="includes"/> |
|
893 |
<attribute name="options" default=""/> |
|
894 |
<attribute name="source" default="1.5"/> <!-- FIXME --> |
|
895 |
<sequential> |
|
896 |
<property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project --> |
|
897 |
<!-- Note: even with this default value, includes |
|
5845 | 898 |
from src.classes.dir get javadoc'd; see packageset below --> |
10 | 899 |
<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
|
900 |
<javadoc |
10 | 901 |
executable="${target.java.home}/bin/javadoc" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
902 |
destdir="${build.javadoc.dir}/@{name}" |
10 | 903 |
source="@{source}" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
904 |
windowtitle="UNOFFICIAL" |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
905 |
failonerror="true" |
10 | 906 |
use="true" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
907 |
author="false" |
10 | 908 |
version="false" |
909 |
packagenames="${javadoc.packagenames}" > |
|
910 |
<header><![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></header> |
|
911 |
<arg line="@{options}"/> |
|
912 |
<bootclasspath> |
|
913 |
<path location="${build.classes.dir}"/> |
|
914 |
<path location="${target.java.home}/jre/lib/rt.jar"/> |
|
915 |
</bootclasspath> |
|
916 |
<sourcepath> |
|
917 |
<pathelement location="${src.classes.dir}"/> |
|
918 |
</sourcepath> |
|
919 |
<!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> --> |
|
920 |
<!-- means that {@link some.package} will not work, which is no good. --> |
|
921 |
<!-- (It correctly skips excluded single classes, but not if packageset is also included, --> |
|
922 |
<!-- which also causes duplicates in the class index for included files.) --> |
|
923 |
<packageset dir="${src.classes.dir}" includes="@{includes}"> |
|
924 |
<or> |
|
925 |
<filename name="java/"/> |
|
926 |
<filename name="javax/"/> |
|
927 |
<filename name="com/sun/javadoc/"/> |
|
928 |
<filename name="com/sun/mirror/"/> |
|
929 |
<filename name="com/sun/source/"/> |
|
930 |
</or> |
|
931 |
</packageset> |
|
932 |
</javadoc> |
|
933 |
</sequential> |
|
934 |
</macrodef> |
|
935 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
936 |
|
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
937 |
<target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home,-check-target.java.home"> |
10 | 938 |
<taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"> |
939 |
<classpath> |
|
940 |
<pathelement location="${jtreg.home}/lib/jtreg.jar"/> |
|
941 |
<pathelement location="${jtreg.home}/lib/javatest.jar"/> |
|
942 |
</classpath> |
|
943 |
</taskdef> |
|
944 |
<macrodef name="jtreg-tool"> |
|
945 |
<attribute name="name"/> |
|
946 |
<attribute name="tests"/> |
|
947 |
<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
|
948 |
<attribute name="samevm" default="true"/> |
5849
04edd7910585
6877961: langtools build should allow more options when running jtreg
jjg
parents:
5845
diff
changeset
|
949 |
<attribute name="verbose" default="${default.jtreg.verbose}"/> |
04edd7910585
6877961: langtools build should allow more options when running jtreg
jjg
parents:
5845
diff
changeset
|
950 |
<attribute name="options" default="${other.jtreg.options}"/> |
10 | 951 |
<attribute name="keywords" default="-keywords:!ignore"/> |
952 |
<attribute name="jpda.jvmargs" default=""/> |
|
953 |
<sequential> |
|
5849
04edd7910585
6877961: langtools build should allow more options when running jtreg
jjg
parents:
5845
diff
changeset
|
954 |
<property name="coverage.options" value=""/> <!-- default --> |
04edd7910585
6877961: langtools build should allow more options when running jtreg
jjg
parents:
5845
diff
changeset
|
955 |
<property name="coverage.classpath" value=""/> <!-- default --> |
04edd7910585
6877961: langtools build should allow more options when running jtreg
jjg
parents:
5845
diff
changeset
|
956 |
<property name="default.jtreg.verbose" value="summary"/> <!-- default --> |
04edd7910585
6877961: langtools build should allow more options when running jtreg
jjg
parents:
5845
diff
changeset
|
957 |
<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
|
958 |
<jtreg |
10 | 959 |
dir="${test.dir}" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
960 |
workDir="${build.jtreg.dir}/@{name}/work" |
10 | 961 |
reportDir="${build.jtreg.dir}/@{name}/report" |
962 |
jdk="@{jdk}" |
|
963 |
samevm="@{samevm}" verbose="@{verbose}" |
|
964 |
failonerror="false" resultproperty="jtreg.@{name}.result" |
|
965 |
javacoptions="-g" |
|
966 |
vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}:${build.classes.dir} @{jpda.jvmargs}"> |
|
967 |
<arg line="@{keywords}"/> |
|
968 |
<arg line="@{options}"/> |
|
969 |
<arg line="@{tests}"/> |
|
970 |
</jtreg> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
971 |
<!-- the next two properties are for convenience, when only |
10 | 972 |
a single instance of jtreg will be invoked. --> |
973 |
<condition property="jtreg.passed"> |
|
1873
658385834998
6795365: NetBeans projects in langtools repository are not NB6.5-friendly
jjg
parents:
1872
diff
changeset
|
974 |
<equals arg1="${jtreg.@{name}.result}" arg2="0"/> |
10 | 975 |
</condition> |
976 |
<property name="jtreg.report" value="${build.jtreg.dir}/@{name}/report"/> |
|
977 |
</sequential> |
|
978 |
</macrodef> |
|
979 |
<property name="jtreg.defined" value="true"/> |
|
980 |
</target> |
|
981 |
||
982 |
<target name="-def-cobertura" depends="-check-cobertura.home"> |
|
983 |
<path id="cobertura.classpath"> |
|
984 |
<fileset dir="${cobertura.home}"> |
|
985 |
<include name="cobertura.jar"/> |
|
986 |
<include name="lib/**/*.jar"/> |
|
987 |
</fileset> |
|
988 |
</path> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
989 |
<taskdef classpathref="cobertura.classpath" resource="tasks.properties"/> |
10 | 990 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
991 |
|
6599
ec0419c70f24
6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents:
6598
diff
changeset
|
992 |
<target name="-def-findbugs" unless="findbugs.defined" |
ec0419c70f24
6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents:
6598
diff
changeset
|
993 |
depends="-check-findbugs.home,-check-target.java.home"> |
10 | 994 |
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"> |
995 |
<classpath> |
|
996 |
<pathelement location="${findbugs.home}/lib/findbugs.jar"/> |
|
997 |
</classpath> |
|
998 |
</taskdef> |
|
999 |
<macrodef name="findbugs-tool"> |
|
1000 |
<attribute name="name"/> |
|
1001 |
<attribute name="output" default="emacs"/> |
|
1002 |
<attribute name="outputFile" default=""/> |
|
1003 |
<attribute name="reportLevel" default="high"/> |
|
1004 |
<sequential> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1005 |
<findbugs |
10 | 1006 |
home="${findbugs.home}" |
1007 |
output="@{output}" |
|
1008 |
outputFile="@{outputFile}" |
|
1009 |
reportLevel="@{reportLevel}" |
|
1010 |
failOnError="false" |
|
1011 |
errorProperty="findbugs.@{name}.errors" |
|
1012 |
warningsProperty="findbugs.@{name}.warnings" |
|
6599
ec0419c70f24
6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents:
6598
diff
changeset
|
1013 |
jvm="${target.java.home}/bin/java" |
10 | 1014 |
jvmargs="-Xmx512M" > |
1015 |
<class location="${dist.dir}/lib/@{name}.jar"/> |
|
1016 |
<auxClasspath> |
|
1017 |
<pathelement location="${build.classes.dir}"/> |
|
1018 |
</auxClasspath> |
|
1019 |
<sourcePath> |
|
1020 |
<pathelement location="${src.classes.dir}"/> |
|
1021 |
</sourcePath> |
|
1022 |
</findbugs> |
|
1023 |
</sequential> |
|
1024 |
</macrodef> |
|
1025 |
<property name="findbugs.defined" value="true"/> |
|
1026 |
</target> |
|
5845 | 1027 |
|
5844 | 1028 |
<target name="-def-vizant" unless="vizant.defined" depends="-check-vizant"> |
5845 | 1029 |
<taskdef name="vizant" classname="net.sourceforge.vizant.Vizant" classpath="${vizant.jar}"/> |
5844 | 1030 |
<property name="vizant.defined" value="true"/> |
1031 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1032 |
|
10 | 1033 |
<target name="-def-check"> |
1034 |
<macrodef name="check"> |
|
1035 |
<attribute name="name"/> |
|
1036 |
<attribute name="property"/> |
|
5844 | 1037 |
<attribute name="marker" default=""/> |
10 | 1038 |
<sequential> |
1039 |
<fail message="Cannot locate @{name}: please set @{property} to its location"> |
|
1040 |
<condition> |
|
1041 |
<not> |
|
1042 |
<isset property="@{property}"/> |
|
1043 |
</not> |
|
1044 |
</condition> |
|
1045 |
</fail> |
|
1046 |
<fail message="@{name} is not installed in ${@{property}}"> |
|
1047 |
<condition> |
|
5845 | 1048 |
<and> |
1049 |
<not> |
|
1050 |
<equals arg1="@{marker}" arg2=""/> |
|
1051 |
</not> |
|
5844 | 1052 |
<not> |
1053 |
<available file="${@{property}}/@{marker}"/> |
|
1054 |
</not> |
|
5845 | 1055 |
</and> |
10 | 1056 |
</condition> |
1057 |
</fail> |
|
1058 |
</sequential> |
|
1059 |
</macrodef> |
|
1060 |
</target> |
|
1061 |
||
1062 |
</project> |
|
1063 |