author | sla |
Thu, 13 Nov 2014 07:58:28 +0100 | |
changeset 27622 | 38913dc333ed |
parent 26268 | 620556167c08 |
child 27546 | 79b6b60ff60a |
permissions | -rw-r--r-- |
10 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- |
|
25606
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
3 |
Copyright (c) 2007, 2014, 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 |
|
26268
620556167c08
8038732: [javadoc] NetBeans IDE target does not build doclets
ksrini
parents:
25874
diff
changeset
|
86 |
- groups of targets for each tool: javac, javadoc, 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 |
|
21041 | 92 |
findbugs-TOOL run findbugs on the tool's source code |
5845 | 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="test.dir" location="test"/> |
|
142 |
||
25874 | 143 |
<path id="src.dirs"> |
144 |
<pathelement path="${src.dir}/java.base/share/classes"/> |
|
145 |
<pathelement path="${src.dir}/java.compiler/share/classes"/> |
|
146 |
<pathelement path="${src.dir}/jdk.compiler/share/classes"/> |
|
147 |
<pathelement path="${src.dir}/jdk.dev/share/classes"/> |
|
148 |
<pathelement path="${src.dir}/jdk.javadoc/share/classes"/> |
|
149 |
</path> |
|
150 |
||
151 |
<pathconvert pathsep="," property="src.dirs.property" refid="src.dirs" /> |
|
152 |
||
10 | 153 |
<!-- java.marker is set to a marker file to check for within a Java install dir. |
154 |
The best file to check for across Solaris/Linux/Windows/MacOS is one of the |
|
155 |
executables; regrettably, that is OS-specific. --> |
|
156 |
<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
|
157 |
<os family="unix"/> |
10 | 158 |
</condition> |
159 |
<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
|
160 |
<os family="windows"/> |
10 | 161 |
</condition> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
162 |
|
10 | 163 |
<!-- 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
|
164 |
<property file="${make.dir}/build.properties"/> |
3654 | 165 |
|
166 |
<!-- 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
|
167 |
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
|
168 |
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
|
169 |
quietly default to simply use "java". --> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
170 |
<condition property="launcher.java" |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
171 |
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
|
172 |
<isset property="target.java.home"/> |
3654 | 173 |
</condition> |
174 |
||
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
175 |
<!-- 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
|
176 |
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
|
177 |
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
|
178 |
Based on the value, if any, set up default values for javac's sourcepath, |
4548 | 179 |
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
|
180 |
in the build-bootstrap-classes macro. --> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
181 |
|
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
182 |
<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
|
183 |
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
|
184 |
<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
|
185 |
ignoresystemclasses="true" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
186 |
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
|
187 |
|
5845 | 188 |
<!-- Set the default bootclasspath option used for javac. |
189 |
Note that different variants of the option are used, meaning we can't just |
|
190 |
define the value for the option. |
|
191 |
Note the explicit use of the standard property ${path.separator} in the following. |
|
192 |
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
|
193 |
<condition property="javac.bootclasspath.opt" |
4698
4ea5b8e20252
6915152: langtools build failures with import.jdk on Windows
jjg
parents:
4548
diff
changeset
|
194 |
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
|
195 |
else="-Xbootclasspath/p:${build.classes.dir}"> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
196 |
<isset property="import.jdk.jar"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
197 |
</condition> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
198 |
|
5845 | 199 |
<condition property="boot.java.provides.latest.jdk"> |
200 |
<available |
|
201 |
ignoresystemclasses="true" |
|
202 |
classpath="${boot.java.home}/jre/lib/rt.jar" classname="java.nio.file.Path"/> |
|
203 |
</condition> |
|
204 |
||
205 |
<condition property="bootstrap.exclude.files" value="" else="${require.latest.jdk.files}"> |
|
206 |
<isset property="boot.java.provides.latest.jdk"/> |
|
207 |
</condition> |
|
208 |
||
209 |
<condition property="exclude.files" value="" else="${require.latest.jdk.files}"> |
|
210 |
<or> |
|
211 |
<isset property="boot.java.provides.latest.jdk"/> |
|
212 |
<isset property="import.jdk"/> |
|
213 |
</or> |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
214 |
</condition> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
215 |
|
5845 | 216 |
<condition property="require.import.jdk.stubs"> |
217 |
<and> |
|
218 |
<not> |
|
219 |
<isset property="boot.java.provides.latest.jdk"/> |
|
220 |
</not> |
|
221 |
<isset property="import.jdk.src.dir"/> |
|
222 |
</and> |
|
223 |
</condition> |
|
224 |
||
225 |
<!-- Set the default value of the sourcepath used for javac. --> |
|
226 |
<condition property="javac.sourcepath" value="${build.genstubs.dir}" else=""> |
|
227 |
<isset property="require.import.jdk.stubs"/> |
|
228 |
</condition> |
|
229 |
||
230 |
<!-- Set the default value of the classpath used for javac. --> |
|
231 |
<property name="javac.classpath" value=""/> |
|
232 |
||
233 |
||
234 |
<!-- |
|
235 |
**** General top level targets. |
|
236 |
--> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
237 |
|
10 | 238 |
<!-- Standard target to build deliverables for JDK build. --> |
239 |
||
240 |
<target name="build" depends="build-bootstrap-tools,build-all-classes"> |
|
241 |
<copy todir="${dist.dir}/bootstrap"> |
|
242 |
<fileset dir="${build.bootstrap.dir}" includes="bin/,lib/"/> |
|
243 |
</copy> |
|
244 |
<chmod dir="${dist.dir}/bootstrap/bin" perm="ugo+rx"> |
|
245 |
<include name="*"/> |
|
246 |
</chmod> |
|
247 |
<mkdir dir="${dist.lib.dir}"/> |
|
248 |
<jar file="${dist.lib.dir}/classes.jar" basedir="${build.classes.dir}"/> |
|
25874 | 249 |
<zip file="${dist.lib.dir}/src.zip"> |
250 |
<multirootfileset basedirs="${src.dirs.property}" /> |
|
251 |
</zip> |
|
10 | 252 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
253 |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
254 |
<target name="build-bootstrap-tools" |
26268
620556167c08
8038732: [javadoc] NetBeans IDE target does not build doclets
ksrini
parents:
25874
diff
changeset
|
255 |
depends="build-bootstrap-javac,build-bootstrap-javadoc,build-bootstrap-javah,build-bootstrap-sjavac" |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
256 |
/> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
257 |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
258 |
<target name="build-all-tools" |
26268
620556167c08
8038732: [javadoc] NetBeans IDE target does not build doclets
ksrini
parents:
25874
diff
changeset
|
259 |
depends="build-javac,build-javadoc,build-javah,build-javap,build-sjavac" |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
260 |
/> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
261 |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
262 |
<target name="build-all-classes" depends="build-bootstrap-javac,-create-import-jdk-stubs"> |
26268
620556167c08
8038732: [javadoc] NetBeans IDE target does not build doclets
ksrini
parents:
25874
diff
changeset
|
263 |
<build-classes includes="${javac.includes} ${javadoc.includes} ${javah.includes} ${javap.includes} ${sjavac.includes}"/> |
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
264 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
265 |
|
10 | 266 |
<!-- clean --> |
267 |
||
268 |
<target name="clean" description="Delete all generated files"> |
|
269 |
<delete dir="${build.dir}"/> |
|
270 |
<delete dir="${dist.dir}"/> |
|
271 |
</target> |
|
272 |
||
273 |
<!-- Additional targets for running tools on the build --> |
|
274 |
||
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
275 |
<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
|
276 |
<jtreg-tool name="all" tests="${jtreg.tests}"/> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
277 |
</target> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
278 |
|
11054
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
279 |
<target name="checkstyle" depends="-def-checkstyle" |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
280 |
description="Generates reports for code convention violations."> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
281 |
<mkdir dir="${dist.checkstyle.dir}"/> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
282 |
<checkstyle config="${make.conf.dir}/checkstyle-langtools.xml" |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
283 |
failureProperty="checkstyle.failure" |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
284 |
failOnViolation="false"> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
285 |
<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
|
286 |
<fileset dir="src" includes="**/*.java, **/*.properties"/> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
287 |
</checkstyle> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
288 |
<!-- transform the output to a simple html --> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
289 |
<xslt in="${dist.checkstyle.dir}/checkstyle_report.xml" |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
290 |
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
|
291 |
style="${checkstyle.home}/contrib/checkstyle-simple.xsl"/> |
11054
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
292 |
<!-- 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
|
293 |
<xslt in="${dist.checkstyle.dir}/checkstyle_report.xml" |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
294 |
out="${dist.checkstyle.dir}/checkstyle_report.tmp" |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
295 |
style="${make.conf.dir}/checkstyle-emacs.xsl"/> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
296 |
<!-- beautify remove extra lines --> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
297 |
<move file="${dist.checkstyle.dir}/checkstyle_report.tmp" |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
298 |
toFile="${dist.checkstyle.dir}/checkstyle_report.emacs.txt"> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
299 |
<filterchain> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
300 |
<ignoreblank/> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
301 |
<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
|
302 |
</filterchain> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
303 |
</move> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
304 |
</target> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
305 |
<!-- 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
|
306 |
to access and fix the errors directly. |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
307 |
--> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
308 |
<target name="checkstyle-ide" depends="checkstyle"> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
309 |
<concat> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
310 |
<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
|
311 |
</concat> |
11054
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
312 |
</target> |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
12085
diff
changeset
|
313 |
|
10 | 314 |
<target name="findbugs" depends="-def-findbugs,build-all-tools"> |
315 |
<property name="findbugs.reportLevel" value="medium"/> |
|
316 |
<mkdir dir="${dist.findbugs.dir}"/> |
|
317 |
<findbugs |
|
318 |
home="${findbugs.home}" |
|
319 |
projectName="JDK langtools ${full.version}" |
|
320 |
output="xml" |
|
321 |
outputFile="${dist.findbugs.dir}/findbugs.xml" |
|
322 |
reportLevel="${findbugs.reportLevel}" |
|
323 |
failOnError="false" |
|
324 |
errorProperty="findbugs.all.errors" |
|
325 |
warningsProperty="findbugs.all.warnings" |
|
6599
ec0419c70f24
6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents:
6598
diff
changeset
|
326 |
jvm="${target.java.home}/bin/java" |
10 | 327 |
jvmargs="-Xmx512M"> |
328 |
<class location="${build.classes.dir}"/> |
|
329 |
<sourcePath> |
|
25874 | 330 |
<path refid="src.dirs"/> |
10 | 331 |
</sourcePath> |
332 |
</findbugs> |
|
333 |
<exec executable="sh"> |
|
334 |
<arg value="${findbugs.home}/bin/convertXmlToText"/> |
|
335 |
<arg value="-longBugCodes"/> |
|
336 |
<arg value="-html:${findbugs.home}/src/xsl/fancy.xsl"/> |
|
337 |
<arg value="${dist.findbugs.dir}/findbugs.xml"/> |
|
338 |
<redirector output="${dist.findbugs.dir}/findbugs.html"/> |
|
727
cb50c1ae7bab
4075303: Use javap to enquire aboput a specific inner class
jjg
parents:
10
diff
changeset
|
339 |
</exec> |
10 | 340 |
</target> |
341 |
||
342 |
<target name="coverage" depends="-def-cobertura,build-all-classes,instrument-classes,jtreg,coverage-report"/> |
|
343 |
||
344 |
<target name="instrument-classes" depends="-def-cobertura"> |
|
345 |
<!-- only define the following property when we want coverage info --> |
|
346 |
<path id="coverage.classpath"> |
|
347 |
<pathelement location="${build.coverage.dir}/classes"/> |
|
348 |
<path refid="cobertura.classpath"/> |
|
349 |
</path> |
|
350 |
<property name="coverage.options" value="-Dnet.sourceforge.cobertura.datafile=${build.coverage.dir}/cobertura.ser"/> |
|
351 |
<property name="coverage.classpath" refid="coverage.classpath"/> |
|
352 |
<mkdir dir="${build.coverage.dir}/classes"/> |
|
353 |
<delete file="${build.coverage.dir}/cobertura.ser"/> |
|
354 |
<cobertura-instrument todir="${build.coverage.dir}/classes" |
|
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 |
<fileset dir="${build.classes.dir}" |
10 | 357 |
includes="**/*.class" excludes="**/resources/*.class"/> |
358 |
</cobertura-instrument> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
359 |
</target> |
10 | 360 |
|
361 |
<target name="coverage-report" depends="-def-cobertura"> |
|
362 |
<mkdir dir="${dist.coverage.dir}"/> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
363 |
<cobertura-report |
10 | 364 |
destdir="${dist.coverage.dir}" |
25874 | 365 |
datafile="${build.coverage.dir}/cobertura.ser"> |
366 |
<fileset dir="${src.dir}/java.base/share/classes"/> |
|
367 |
<fileset dir="${src.dir}/java.compiler/share/classes"/> |
|
368 |
<fileset dir="${src.dir}/jdk.compiler/share/classes"/> |
|
369 |
<fileset dir="${src.dir}/jdk.dev/share/classes"/> |
|
370 |
<fileset dir="${src.dir}/jdk.javadoc/share/classes"/> |
|
371 |
</cobertura-report> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
372 |
<cobertura-report |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
373 |
format="xml" |
10 | 374 |
destdir="${dist.coverage.dir}" |
25874 | 375 |
datafile="${build.coverage.dir}/cobertura.ser"> |
376 |
<fileset dir="${src.dir}/java.base/share/classes"/> |
|
377 |
<fileset dir="${src.dir}/java.compiler/share/classes"/> |
|
378 |
<fileset dir="${src.dir}/jdk.compiler/share/classes"/> |
|
379 |
<fileset dir="${src.dir}/jdk.dev/share/classes"/> |
|
380 |
<fileset dir="${src.dir}/jdk.javadoc/share/classes"/> |
|
381 |
</cobertura-report> |
|
10 | 382 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
383 |
|
21006
534673718919
8025087: Annotation processing api returns default modifier for interface static method
jlahoda
parents:
17283
diff
changeset
|
384 |
<target name="diags-examples" depends="build-javac,build-javap"> |
6149
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
385 |
<!-- can override the following on the command line if desired. --> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
386 |
<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
|
387 |
<mkdir dir="${build.dir}/diag-examples/classes"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
388 |
<javac fork="true" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
389 |
executable="${dist.bin.dir}/javac" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
390 |
srcdir="test/tools/javac/diags" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
391 |
destdir="${build.dir}/diag-examples/classes" |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
12085
diff
changeset
|
392 |
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
|
393 |
sourcepath="" |
21006
534673718919
8025087: Annotation processing api returns default modifier for interface static method
jlahoda
parents:
17283
diff
changeset
|
394 |
classpath="${dist.lib.dir}/javac.jar;${dist.lib.dir}/javap.jar" |
6149
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
395 |
includeAntRuntime="no" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
396 |
debug="${javac.debug}" |
10183 | 397 |
debuglevel="${javac.debuglevel}"> |
398 |
<compilerarg line="${javac.lint.opts}"/> |
|
399 |
</javac> |
|
6149
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
400 |
<java fork="true" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
401 |
jvm="${target.java.home}/bin/java" |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
402 |
dir="test/tools/javac/diags" |
21006
534673718919
8025087: Annotation processing api returns default modifier for interface static method
jlahoda
parents:
17283
diff
changeset
|
403 |
classpath="${build.dir}/diag-examples/classes;${dist.lib.dir}/javac.jar;${dist.lib.dir}/javap.jar" |
6149
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
404 |
classname="RunExamples"> |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
12085
diff
changeset
|
405 |
<jvmarg value="-Dtest.classes=${build.dir}/diag-examples/classes"/> |
6149
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
406 |
<arg value="-examples"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
407 |
<arg value="examples"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
408 |
<arg value="-o"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
409 |
<arg file="${diags.examples.out}"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
410 |
<arg value="-showFiles"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
411 |
<arg value="-title"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
412 |
<arg value="Examples of javac diagnostics"/> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
413 |
</java> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
414 |
</target> |
48de3564aa13
6968063: provide examples of code that generate diagnostics
jjg
parents:
5849
diff
changeset
|
415 |
|
8041
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
416 |
<!-- 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
|
417 |
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
|
418 |
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
|
419 |
patching the jdk used for jtreg and other tests. |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
420 |
--> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
421 |
<target name="patch" depends="build-all-classes"> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
422 |
<condition property="patch.jdk" value="${target.java.home}"> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
423 |
<available file="${target.java.home}" type="dir"/> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
424 |
</condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
425 |
<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
|
426 |
<condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
427 |
<not> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
428 |
<isset property="patch.jdk"/> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
429 |
</not> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
430 |
</condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
431 |
</fail> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
432 |
<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
|
433 |
<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
|
434 |
<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
|
435 |
<condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
436 |
<not> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
437 |
<available file="${patch.tools.jar}" type="file"/> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
438 |
</not> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
439 |
</condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
440 |
</fail> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
441 |
<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
|
442 |
<condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
443 |
<not> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
444 |
<available file="${patch.rt.jar}" type="file"/> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
445 |
</not> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
446 |
</condition> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
447 |
</fail> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
448 |
<zip zipfile="${patch.tools.jar}" update="true"> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
449 |
<zipfileset dir="${build.classes.dir}" includes="com/**"/> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
450 |
</zip> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
451 |
<zip zipfile="${patch.rt.jar}" update="true"> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
452 |
<zipfileset dir="${build.classes.dir}" includes="javax/**"/> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
453 |
</zip> |
19d4868d7f08
7011272: langtools build.xml should provide a patch target
ksrini
parents:
7845
diff
changeset
|
454 |
</target> |
5845 | 455 |
|
16559 | 456 |
<target name="doclint-api" depends="build-all-classes"> |
457 |
<delete dir="${build.dir}/doclint/classes"/> |
|
458 |
<mkdir dir="${build.dir}/doclint/classes"/> |
|
459 |
<javac fork="true" |
|
460 |
executable="${boot.javac}" |
|
461 |
destdir="${build.dir}/doclint/classes" |
|
462 |
includes="javax/lang/model/** com/sun/javadoc/** com/sun/source/**" |
|
463 |
excludes="" |
|
464 |
sourcepath="${javac.sourcepath}" |
|
465 |
classpath="${javac.classpath}" |
|
466 |
includeAntRuntime="no" |
|
467 |
source="${javac.source}" |
|
468 |
target="${javac.target}" |
|
469 |
debug="${javac.debug}" |
|
470 |
debuglevel="${javac.debuglevel}"> |
|
471 |
<compilerarg value="-implicit:none"/> |
|
472 |
<compilerarg value="-Xprefer:source"/> |
|
473 |
<compilerarg value="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/> |
|
474 |
<compilerarg line="${javac.no.jdk.warnings}"/> |
|
475 |
<compilerarg line="${javac.version.opt}"/> |
|
476 |
<compilerarg line="-Xdoclint:all/protected,-missing"/> |
|
25874 | 477 |
<src> |
478 |
<path refid="src.dirs"/> |
|
479 |
<path location="${build.gensrc.dir}"/> |
|
480 |
</src> |
|
16559 | 481 |
</javac> |
482 |
</target> |
|
483 |
||
25606
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
484 |
<!-- Generate API docs for "important" test classes that are used by |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
485 |
multiple tests. |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
486 |
--> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
487 |
<target name="test-framework-docs" depends="build-all-classes"> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
488 |
<javadoc executable="${target.java.home}/bin/javadoc" |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
489 |
destdir="${build.dir}/testframeworkdocs"> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
490 |
<!-- disable doclint for now; it might be good to enable -Xdoclint:missing --> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
491 |
<arg value="-Xdoclint:none"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
492 |
<!-- source files to be documented --> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
493 |
<sourcefiles> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
494 |
<fileset dir="${test.dir}"> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
495 |
<include name="**/ToolBox.java"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
496 |
<include name="**/*Tester.java"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
497 |
<include name="**/*TestBase.java"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
498 |
<include name="**/*Testing*.java"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
499 |
</fileset> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
500 |
</sourcefiles> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
501 |
<!-- source path used for documentation --> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
502 |
<sourcepath> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
503 |
<pathelement path="${test.dir}/lib"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
504 |
<pathelement path="${test.dir}/lib/combo"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
505 |
<pathelement path="${test.dir}/tools/javac/lib"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
506 |
<pathelement path="${test.dir}/tools/javac/classfiles/attributes/LocalVariableTable"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
507 |
</sourcepath> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
508 |
<!-- exclude the following "packages" found by <javadoc> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
509 |
on the sourcepath --> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
510 |
<excludepackage name="combo.tools.javac.combo"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
511 |
<excludepackage name="tools.javac.combo"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
512 |
<!-- library classes used for documentation --> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
513 |
<classpath> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
514 |
<pathelement path="${jtreg.home}/lib/testng.jar"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
515 |
</classpath> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
516 |
<!-- platform classes used for documentation --> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
517 |
<bootclasspath> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
518 |
<pathelement path="${build.dir}/classes"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
519 |
<pathelement path="${target.java.home}/jre/lib/rt.jar"/> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
520 |
</bootclasspath> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
521 |
</javadoc> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
522 |
</target> |
1272de877614
8050805: Add a target to langtools/make/build.xml to generate docs for test library classes
jjg
parents:
25302
diff
changeset
|
523 |
|
5845 | 524 |
<!-- |
525 |
**** Debugging/diagnostic targets. |
|
526 |
--> |
|
527 |
||
528 |
<!-- standard JDK target --> |
|
529 |
<target name="sanity" |
|
530 |
description="display settings of configuration values"> |
|
531 |
<echo level="info">ant.home = ${ant.home}</echo> |
|
532 |
<echo level="info">boot.java.home = ${boot.java.home}</echo> |
|
533 |
<echo level="info">target.java.home = ${target.java.home}</echo> |
|
534 |
<echo level="info">jtreg.home = ${jtreg.home}</echo> |
|
535 |
<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
|
536 |
<echo level="info">checkstyle.home = ${checkstyle.home}</echo> |
5845 | 537 |
</target> |
538 |
||
539 |
<target name="post-sanity" depends="-def-jtreg,sanity,build" |
|
540 |
description="perform basic validation after a standard build"> |
|
541 |
<jtreg |
|
542 |
dir="make/test" |
|
543 |
workDir="${build.jtreg.dir}/post-sanity/work" |
|
544 |
reportDir="${build.jtreg.dir}/post-sanity/report" |
|
545 |
jdk="${target.java.home}" |
|
546 |
verbose="summary" |
|
547 |
failonerror="false" resultproperty="jtreg.post-sanity.result"> |
|
548 |
</jtreg> |
|
549 |
</target> |
|
550 |
||
551 |
<!-- use vizant tool to generate graphical image of this Ant file.--> |
|
552 |
<target name="vizant" depends="-def-vizant"> |
|
553 |
<mkdir dir="${build.dir}"/> |
|
554 |
<echo message="Generating ${build.dir}/build.dot"/> |
|
555 |
<vizant antfile="${make.dir}/build.xml" outfile="${build.dir}/build.dot"/> |
|
556 |
<echo message="Generating ${build.dir}/build.png"/> |
|
557 |
<exec executable="${dot}" > |
|
558 |
<arg value="-Tpng"/> |
|
559 |
<arg value="-o"/> |
|
560 |
<arg file="${build.dir}/build.png"/> |
|
561 |
<arg file="${build.dir}/build.dot"/> |
|
562 |
</exec> |
|
563 |
</target> |
|
564 |
||
565 |
<target name="check-import.jdk"> |
|
566 |
<echo message="import.jdk: ${import.jdk}"/> |
|
567 |
<echo message="import.jdk.jar: ${import.jdk.jar}"/> |
|
568 |
<echo message="import.jdk.src.dir: ${import.jdk.src.dir}"/> |
|
569 |
</target> |
|
570 |
||
571 |
<target name="diagnostics"> |
|
572 |
<diagnostics/> |
|
573 |
</target> |
|
574 |
||
575 |
||
576 |
<!-- |
|
577 |
**** javac targets. |
|
578 |
--> |
|
10 | 579 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
580 |
<target name="build-bootstrap-javac" |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
581 |
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
|
582 |
<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
|
583 |
<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
|
584 |
<build-bootstrap-tool name="javac"/> |
10 | 585 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
586 |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
587 |
<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
|
588 |
<build-classes includes="${javac.includes}"/> |
10 | 589 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
590 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
591 |
<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
|
592 |
<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
|
593 |
<build-tool name="javac"/> |
10 | 594 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
595 |
|
10 | 596 |
<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
|
597 |
<javadoc-tool name="javac" includes="${javac.includes}" options="${javadoc.jls.option}"/> |
10 | 598 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
599 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
600 |
<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
|
601 |
<jtreg-tool name="javac" tests="${javac.tests}"/> |
10 | 602 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
603 |
|
10 | 604 |
<target name="findbugs-javac" depends="build-javac,-def-findbugs"> |
605 |
<findbugs-tool name="javac"/> |
|
606 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
607 |
|
10 | 608 |
<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
|
609 |
|
5845 | 610 |
|
611 |
<!-- |
|
612 |
**** javadoc targets. |
|
613 |
--> |
|
10 | 614 |
|
615 |
<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
|
616 |
<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
|
617 |
<build-bootstrap-jar name="javadoc" includes="${javadoc.includes}" |
26268
620556167c08
8038732: [javadoc] NetBeans IDE target does not build doclets
ksrini
parents:
25874
diff
changeset
|
618 |
jarclasspath="javac.jar"/> |
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
619 |
<build-bootstrap-tool name="javadoc"/> |
10 | 620 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
621 |
|
10 | 622 |
<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
|
623 |
<build-classes includes="${javadoc.includes}"/> |
10 | 624 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
625 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
626 |
<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
|
627 |
<build-jar name="javadoc" includes="${javadoc.includes}" |
26268
620556167c08
8038732: [javadoc] NetBeans IDE target does not build doclets
ksrini
parents:
25874
diff
changeset
|
628 |
jarclasspath="javac.jar"/> |
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
629 |
<build-tool name="javadoc"/> |
10 | 630 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
631 |
|
10 | 632 |
<target name="javadoc-javadoc" depends="build-javadoc,-def-javadoc-tool"> |
633 |
<javadoc-tool name="javadoc" includes="${javadoc.includes}"/> |
|
634 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
635 |
|
10 | 636 |
<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
|
637 |
<jtreg-tool name="javadoc" tests="${javadoc.tests}"/> |
10 | 638 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
639 |
|
10 | 640 |
<target name="findbugs-javadoc" depends="build-javadoc,-def-findbugs"> |
641 |
<findbugs-tool name="javadoc"/> |
|
642 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
643 |
|
10 | 644 |
<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
|
645 |
|
5845 | 646 |
<!-- |
647 |
**** javah targets. |
|
648 |
--> |
|
10 | 649 |
|
650 |
<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
|
651 |
<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
|
652 |
<build-bootstrap-jar name="javah" includes="${javah.includes}" |
26268
620556167c08
8038732: [javadoc] NetBeans IDE target does not build doclets
ksrini
parents:
25874
diff
changeset
|
653 |
jarclasspath="javadoc.jar javac.jar"/> |
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
654 |
<build-bootstrap-tool name="javah"/> |
10 | 655 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
656 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
657 |
<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
|
658 |
<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
|
659 |
<build-tool name="javah"/> |
10 | 660 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
661 |
|
10 | 662 |
<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
|
663 |
<build-classes includes="${javah.includes}"/> |
10 | 664 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
665 |
|
10 | 666 |
<!-- (no javadoc for javah) --> |
667 |
||
668 |
<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
|
669 |
<jtreg-tool name="javah" tests="${javah.tests}"/> |
10 | 670 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
671 |
|
10 | 672 |
<target name="findbugs-javah" depends="build-javah,-def-findbugs"> |
673 |
<findbugs-tool name="javah"/> |
|
674 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
675 |
|
10 | 676 |
<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
|
677 |
|
5845 | 678 |
|
679 |
<!-- |
|
680 |
**** javap targets. |
|
681 |
--> |
|
10 | 682 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
683 |
<target name="build-bootstrap-javap" |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
684 |
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
|
685 |
<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
|
686 |
<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
|
687 |
jarmainclass="sun.tools.javap.Main"/> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
688 |
<build-bootstrap-tool name="javap"/> |
10 | 689 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
690 |
|
727
cb50c1ae7bab
4075303: Use javap to enquire aboput a specific inner class
jjg
parents:
10
diff
changeset
|
691 |
<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
|
692 |
<build-classes includes="${javap.includes}"/> |
10 | 693 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
694 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
695 |
<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
|
696 |
<build-jar name="javap" includes="${javap.includes}" |
2987 | 697 |
jarmainclass="com.sun.tools.javap.Main" |
727
cb50c1ae7bab
4075303: Use javap to enquire aboput a specific inner class
jjg
parents:
10
diff
changeset
|
698 |
jarclasspath="javac.jar"/> |
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
699 |
<build-tool name="javap"/> |
10 | 700 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
701 |
|
10 | 702 |
<!-- (no javadoc for javap) --> |
703 |
||
704 |
<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
|
705 |
<jtreg-tool name="javap" tests="${javap.tests}"/> |
10 | 706 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
707 |
|
10 | 708 |
<target name="findbugs-javap" depends="build-javap,-def-findbugs"> |
709 |
<findbugs-tool name="javap"/> |
|
710 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
711 |
|
10 | 712 |
<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
|
713 |
|
15368
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
714 |
<!-- |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
715 |
**** sjavac targets. |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
716 |
--> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
717 |
|
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
718 |
<target name="build-bootstrap-sjavac" |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
719 |
depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool"> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
720 |
<build-bootstrap-classes includes="${sjavac.includes}"/> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
721 |
<build-bootstrap-jar name="sjavac" includes="${sjavac.includes}" |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
722 |
jarmainclass="com.sun.tools.sjavac.Main"/> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
723 |
<build-bootstrap-tool name="sjavac"/> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
724 |
</target> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
725 |
|
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
726 |
<target name="build-classes-sjavac" depends="build-classes-javac"> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
727 |
<build-classes includes="${sjavac.includes}"/> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
728 |
</target> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
729 |
|
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
730 |
<target name="build-sjavac" depends="build-classes-sjavac"> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
731 |
<build-jar name="sjavac" includes="${sjavac.includes}" |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
732 |
jarmainclass="com.sun.tools.sjavac.Main" |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
733 |
jarclasspath="sjavac.jar"/> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
734 |
<build-tool name="sjavac"/> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
735 |
</target> |
16559 | 736 |
|
15368
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
737 |
<!-- (no javadoc for javap) --> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
738 |
|
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
739 |
<target name="jtreg-sjavac" depends="build-sjavac,-def-jtreg"> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
740 |
<jtreg-tool name="sjavac" tests="${sjavac.tests}"/> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
741 |
</target> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
742 |
|
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
743 |
<target name="findbugs-sjavac" depends="build-sjavac,-def-findbugs"> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
744 |
<findbugs-tool name="sjavac"/> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
745 |
</target> |
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
746 |
|
2577ddb7e710
8004658: Add internal smart javac wrapper to solve JEP 139
ohrstrom
parents:
14541
diff
changeset
|
747 |
<target name="sjavac" depends="build-sjavac,jtreg-sjavac,findbugs-sjavac"/> |
5845 | 748 |
|
749 |
<!-- |
|
17283
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
750 |
**** crules targets. |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
751 |
--> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
752 |
|
25848
3bc09f4676a9
8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents:
25697
diff
changeset
|
753 |
<target name="build-crules" |
3bc09f4676a9
8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents:
25697
diff
changeset
|
754 |
depends="-def-compilecrules,-def-build-jar-with-services,build-bootstrap-javac,-create-import-jdk-stubs"> |
17283
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
755 |
<compilecrules/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
756 |
<build-jar-with-services |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
757 |
name="crules" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
758 |
includes="crules/* crules/resources/*" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
759 |
classes.dir="${build.toolclasses.dir}" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
760 |
lib.dir="${build.toolclasses.dir}" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
761 |
jarmainclass="" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
762 |
jarclasspath="crules.jar" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
763 |
service.type="com.sun.source.util.Plugin" |
25848
3bc09f4676a9
8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents:
25697
diff
changeset
|
764 |
service.provider="crules.CodingRulesAnalyzerPlugin"/> |
17283
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
765 |
<build-tool name="crules"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
766 |
</target> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
767 |
|
25848
3bc09f4676a9
8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents:
25697
diff
changeset
|
768 |
<target name="jtreg-crules" depends="build-javac,build-crules,-def-jtreg"> |
3bc09f4676a9
8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents:
25697
diff
changeset
|
769 |
<jtreg-tool name="crules" |
3bc09f4676a9
8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents:
25697
diff
changeset
|
770 |
tests="${crules.tests}" |
3bc09f4676a9
8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents:
25697
diff
changeset
|
771 |
extra.jvmargs="-Xbootclasspath/a:${build.toolclasses.dir}/crules.jar" /> |
3bc09f4676a9
8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents:
25697
diff
changeset
|
772 |
</target> |
3bc09f4676a9
8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents:
25697
diff
changeset
|
773 |
|
17283
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
774 |
<target name="check-coding-rules" depends="build-bootstrap-javac,-create-import-jdk-stubs,build-crules"> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
775 |
<build-classes includes="${javac.includes}" |
25848
3bc09f4676a9
8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents:
25697
diff
changeset
|
776 |
plugin.options="-J-Xbootclasspath/a:${build.toolclasses.dir}/crules.jar -Xplugin:coding_rules" /> |
17283
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
777 |
</target> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
778 |
|
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
779 |
<!-- |
5845 | 780 |
**** Create import JDK stubs. |
781 |
--> |
|
782 |
||
783 |
<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
|
784 |
<mkdir dir="${build.genstubs.dir}"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
785 |
<genstubs |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
786 |
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
|
787 |
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
|
788 |
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
|
789 |
/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
790 |
</target> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
791 |
|
25282
d49c47cad9f0
8046451: Add basic IntelliJ support for langtools
mcimadamore
parents:
21041
diff
changeset
|
792 |
<!-- |
d49c47cad9f0
8046451: Add basic IntelliJ support for langtools
mcimadamore
parents:
21041
diff
changeset
|
793 |
**** IDE support |
d49c47cad9f0
8046451: Add basic IntelliJ support for langtools
mcimadamore
parents:
21041
diff
changeset
|
794 |
--> |
d49c47cad9f0
8046451: Add basic IntelliJ support for langtools
mcimadamore
parents:
21041
diff
changeset
|
795 |
|
d49c47cad9f0
8046451: Add basic IntelliJ support for langtools
mcimadamore
parents:
21041
diff
changeset
|
796 |
<target name="idea"> |
d49c47cad9f0
8046451: Add basic IntelliJ support for langtools
mcimadamore
parents:
21041
diff
changeset
|
797 |
<mkdir dir=".idea"/> |
d49c47cad9f0
8046451: Add basic IntelliJ support for langtools
mcimadamore
parents:
21041
diff
changeset
|
798 |
<copy todir=".idea" > |
25697
b71804e27eb1
8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents:
25606
diff
changeset
|
799 |
<fileset dir="make/intellij" excludes="**/src/**"/> |
25282
d49c47cad9f0
8046451: Add basic IntelliJ support for langtools
mcimadamore
parents:
21041
diff
changeset
|
800 |
</copy> |
25697
b71804e27eb1
8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents:
25606
diff
changeset
|
801 |
<condition property="jtreg.idea.home" value="${jtreg.home}" else = "[jtreg.home]"> |
b71804e27eb1
8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents:
25606
diff
changeset
|
802 |
<isset property="jtreg.home"/> |
b71804e27eb1
8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents:
25606
diff
changeset
|
803 |
</condition> |
b71804e27eb1
8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents:
25606
diff
changeset
|
804 |
<replace file=".idea/ant.xml" token="@@@" value="${jtreg.idea.home}"/> |
b71804e27eb1
8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents:
25606
diff
changeset
|
805 |
<mkdir dir=".idea/classes"/> |
b71804e27eb1
8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents:
25606
diff
changeset
|
806 |
<javac srcdir="make/intellij/src" |
b71804e27eb1
8049234: Add support for running/debugging bootstrap tools in IntelliJ
mcimadamore
parents:
25606
diff
changeset
|
807 |
destdir=".idea/classes"/> |
25282
d49c47cad9f0
8046451: Add basic IntelliJ support for langtools
mcimadamore
parents:
21041
diff
changeset
|
808 |
</target> |
5845 | 809 |
|
810 |
<!-- |
|
811 |
**** Check targets. |
|
812 |
**** "-check-*" targets check that a required property is set, and set to a reasonable value. |
|
813 |
**** A user friendly message is generated if not, and the build exits. |
|
814 |
--> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
815 |
|
10 | 816 |
<target name="-check-boot.java.home" depends="-def-check"> |
817 |
<check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/> |
|
818 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
819 |
|
10 | 820 |
<target name="-check-target.java.home" depends="-def-check"> |
821 |
<check name="target java" property="target.java.home" marker="${java.marker}"/> |
|
822 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
823 |
|
10 | 824 |
<target name="-check-cobertura.home" depends="-def-check"> |
825 |
<check name="cobertura" property="cobertura.home" marker="cobertura.jar"/> |
|
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="-check-findbugs.home" depends="-def-check"> |
829 |
<check name="findbugs" property="findbugs.home" marker="lib/findbugs.jar"/> |
|
830 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
831 |
|
11054
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
832 |
<target name="-check-checkstyle.home" depends="-def-check"> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
833 |
<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
|
834 |
</target> |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
12085
diff
changeset
|
835 |
|
10 | 836 |
<target name="-check-jtreg.home" depends="-def-check"> |
837 |
<check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/> |
|
838 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
839 |
|
5844 | 840 |
<target name="-check-vizant" depends="-def-check"> |
841 |
<check name="vizant" property="vizant.jar"/> |
|
842 |
<check name="dot" property="dot"/> |
|
843 |
</target> |
|
844 |
||
5845 | 845 |
|
846 |
<!-- |
|
847 |
**** Targets for Ant macro and task definitions. |
|
848 |
--> |
|
10 | 849 |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
850 |
<target name="-def-build-tool"> |
10 | 851 |
<macrodef name="build-tool"> |
852 |
<attribute name="name"/> |
|
853 |
<attribute name="bin.dir" default="${dist.bin.dir}"/> |
|
3654 | 854 |
<attribute name="java" default="${launcher.java}"/> |
10 | 855 |
<sequential> |
856 |
<mkdir dir="@{bin.dir}"/> |
|
25874 | 857 |
<copy file="${make.dir}/launcher.sh-template" tofile="@{bin.dir}/@{name}"> |
10 | 858 |
<filterset begintoken="#" endtoken="#"> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
859 |
<filter token="PROGRAM" value="@{name}"/> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
860 |
<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
|
861 |
<filter token="PS" value="${path.separator}"/> |
10 | 862 |
</filterset> |
863 |
</copy> |
|
864 |
<chmod file="@{bin.dir}/@{name}" perm="ugo+rx"/> |
|
865 |
</sequential> |
|
866 |
</macrodef> |
|
867 |
</target> |
|
868 |
||
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
869 |
<target name="-def-build-jar"> |
10 | 870 |
<macrodef name="build-jar"> |
871 |
<attribute name="name"/> |
|
872 |
<attribute name="includes"/> |
|
873 |
<attribute name="classes.dir" default="${build.classes.dir}"/> |
|
874 |
<attribute name="lib.dir" default="${dist.lib.dir}"/> |
|
875 |
<attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/> |
|
876 |
<attribute name="jarclasspath" default=""/> |
|
877 |
<sequential> |
|
878 |
<mkdir dir="@{lib.dir}"/> |
|
879 |
<jar destfile="@{lib.dir}/@{name}.jar" |
|
880 |
basedir="@{classes.dir}" |
|
881 |
includes="@{includes}"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
882 |
<manifest> |
10 | 883 |
<attribute name="Main-Class" value="@{jarmainclass}"/> |
884 |
<attribute name="Class-Path" value="@{jarclasspath}"/> |
|
885 |
</manifest> |
|
886 |
</jar> |
|
887 |
</sequential> |
|
888 |
</macrodef> |
|
889 |
</target> |
|
890 |
||
17283
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
891 |
<target name="-def-build-jar-with-services"> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
892 |
<macrodef name="build-jar-with-services"> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
893 |
<attribute name="name"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
894 |
<attribute name="includes"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
895 |
<attribute name="classes.dir" default="${build.classes.dir}"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
896 |
<attribute name="lib.dir" default="${dist.lib.dir}"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
897 |
<attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
898 |
<attribute name="jarclasspath" default=""/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
899 |
<attribute name="service.type" default=""/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
900 |
<attribute name="service.provider" default=""/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
901 |
<sequential> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
902 |
<mkdir dir="${build.toolclasses.dir}"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
903 |
<jar destfile="@{lib.dir}/@{name}.jar" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
904 |
basedir="@{classes.dir}" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
905 |
includes="@{includes}"> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
906 |
<service type="@{service.type}" provider="@{service.provider}"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
907 |
<manifest> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
908 |
<attribute name="Main-Class" value="@{jarmainclass}"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
909 |
<attribute name="Class-Path" value="@{jarclasspath}"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
910 |
</manifest> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
911 |
</jar> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
912 |
</sequential> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
913 |
</macrodef> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
914 |
</target> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
915 |
|
10 | 916 |
<target name="-def-build-classes" depends="-def-pcompile"> |
917 |
<macrodef name="build-classes"> |
|
918 |
<attribute name="includes"/> |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
919 |
<attribute name="excludes" default="${exclude.files} **/package-info.java"/> |
10 | 920 |
<attribute name="classes.dir" default="${build.classes.dir}"/> |
921 |
<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
|
922 |
<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
|
923 |
<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
|
924 |
<attribute name="classpath" default="${javac.classpath}"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
925 |
<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
|
926 |
<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
|
927 |
<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
|
928 |
<attribute name="target" default="${javac.target}"/> |
10 | 929 |
<attribute name="release" default="${release}"/> |
930 |
<attribute name="full.version" default="${full.version}"/> |
|
17283
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
931 |
<attribute name="plugin.options" default=""/> |
10 | 932 |
<sequential> |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
933 |
<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
|
934 |
<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
|
935 |
<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
|
936 |
<echo level="verbose" message="build-classes: sourcepath=@{sourcepath}"/> |
10 | 937 |
<mkdir dir="@{gensrc.dir}"/> |
938 |
<mkdir dir="@{classes.dir}"/> |
|
25874 | 939 |
<pcompile destdir="@{gensrc.dir}" |
940 |
includes="@{includes}"> |
|
941 |
<src> |
|
942 |
<path refid="src.dirs"/> |
|
943 |
</src> |
|
944 |
</pcompile> |
|
10 | 945 |
<copy todir="@{gensrc.dir}"> |
25874 | 946 |
<multirootfileset basedirs="${src.dirs.property}" includes="@{includes}" /> |
10 | 947 |
<globmapper from="*.properties-template" to="*.properties"/> |
948 |
<filterset begintoken="$(" endtoken=")"> |
|
949 |
<filter token="JDK_VERSION" value="${jdk.version}"/> |
|
950 |
<filter token="RELEASE" value="@{release}"/> |
|
951 |
<filter token="FULL_VERSION" value="@{full.version}"/> |
|
952 |
</filterset> |
|
953 |
</copy> |
|
25874 | 954 |
<pcompile destdir="@{gensrc.dir}" |
955 |
includes="**/*.properties"> |
|
956 |
<src> |
|
957 |
<pathelement location="@{gensrc.dir}"/> |
|
958 |
</src> |
|
959 |
</pcompile> |
|
10 | 960 |
<javac fork="true" |
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
961 |
executable="@{java.home}/bin/javac" |
10 | 962 |
destdir="@{classes.dir}" |
963 |
includes="@{includes}" |
|
964 |
excludes="@{excludes}" |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
965 |
sourcepath="@{sourcepath}" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
966 |
classpath="@{classpath}" |
10 | 967 |
includeAntRuntime="no" |
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
968 |
source="@{source}" |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
969 |
target="@{target}" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
970 |
debug="${javac.debug}" |
10 | 971 |
debuglevel="${javac.debuglevel}"> |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
972 |
<compilerarg value="-implicit:none"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
973 |
<compilerarg value="-Xprefer:source"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
974 |
<compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
975 |
<compilerarg line="@{bootclasspath.opt}"/> |
10 | 976 |
<compilerarg line="${javac.no.jdk.warnings}"/> |
977 |
<compilerarg line="${javac.version.opt}"/> |
|
978 |
<compilerarg line="${javac.lint.opts}"/> |
|
17283
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
979 |
<compilerarg line="@{plugin.options}"/> |
25874 | 980 |
<src> |
981 |
<path refid="src.dirs"/> |
|
982 |
<path location="@{gensrc.dir}"/> |
|
983 |
</src> |
|
10 | 984 |
</javac> |
4548 | 985 |
<copy todir="@{classes.dir}" includeemptydirs="false"> |
25874 | 986 |
<multirootfileset basedirs="${src.dirs.property}" includes="@{includes}" excludes="@{excludes}"> |
10 | 987 |
<exclude name="**/*.java"/> |
988 |
<exclude name="**/*.properties"/> |
|
989 |
<exclude name="**/*-template"/> |
|
9070
f847fe5cad3d
7009599: javac build puts extraneous files into dist/lib/classes.jar
jjg
parents:
8423
diff
changeset
|
990 |
<exclude name="**/*.rej"/> |
f847fe5cad3d
7009599: javac build puts extraneous files into dist/lib/classes.jar
jjg
parents:
8423
diff
changeset
|
991 |
<exclude name="**/*.orig"/> |
f847fe5cad3d
7009599: javac build puts extraneous files into dist/lib/classes.jar
jjg
parents:
8423
diff
changeset
|
992 |
<exclude name="**/overview.html"/> |
10 | 993 |
<exclude name="**/package.html"/> |
25874 | 994 |
</multirootfileset> |
10 | 995 |
</copy> |
996 |
</sequential> |
|
997 |
</macrodef> |
|
998 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
999 |
|
10 | 1000 |
<target name="-def-build-bootstrap-tool" depends="-check-boot.java.home,-def-build-tool"> |
1001 |
<presetdef name="build-bootstrap-tool"> |
|
1002 |
<build-tool |
|
1003 |
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
|
1004 |
java="${boot.java}"/> |
10 | 1005 |
</presetdef> |
1006 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1007 |
|
10 | 1008 |
<target name="-def-build-bootstrap-jar" depends="-def-build-jar"> |
1009 |
<presetdef name="build-bootstrap-jar"> |
|
1010 |
<build-jar |
|
4410
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
1011 |
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
|
1012 |
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
|
1013 |
</presetdef> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
1014 |
</target> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
1015 |
|
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
1016 |
<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
|
1017 |
<presetdef name="build-bootstrap-classes"> |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
1018 |
<build-classes |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
1019 |
source="${boot.javac.source}" |
0288a787be7a
6898585: restructure langtools build.xml to facilitate more options for <build-classes> macro
jjg
parents:
3996
diff
changeset
|
1020 |
target="${boot.javac.target}" |
10 | 1021 |
gensrc.dir="${build.bootstrap.dir}/gensrc" |
1022 |
classes.dir="${build.bootstrap.dir}/classes" |
|
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
1023 |
javac.bootclasspath="" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
1024 |
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
|
1025 |
sourcepath="" |
10 | 1026 |
release="${bootstrap.release}" |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
1027 |
full.version="${bootstrap.full.version}" |
5845 | 1028 |
excludes="${bootstrap.exclude.files} **/package-info.java"/> |
10 | 1029 |
</presetdef> |
1030 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1031 |
|
10 | 1032 |
<target name="-def-pcompile"> |
1033 |
<mkdir dir="${build.toolclasses.dir}"/> |
|
1871
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
1034 |
<javac fork="true" |
3658
8ee720a52b7d
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
3655
diff
changeset
|
1035 |
source="${boot.javac.source}" |
8ee720a52b7d
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
3655
diff
changeset
|
1036 |
target="${boot.javac.target}" |
1871
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
1037 |
executable="${boot.java.home}/bin/javac" |
12085
ce2780cb121f
7150579: Moved ant code into a separate package, anttasks.
ohrstrom
parents:
11866
diff
changeset
|
1038 |
srcdir="${make.tools.dir}" |
25874 | 1039 |
includes="compileproperties/* anttasks/CompileProperties* anttasks/PathFileSet*" |
10 | 1040 |
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
|
1041 |
classpath="${ant.core.lib}" |
10183 | 1042 |
bootclasspath="${boot.java.home}/jre/lib/rt.jar" |
1043 |
includeantruntime="false"> |
|
1044 |
<compilerarg line="${javac.lint.opts}"/> |
|
1045 |
</javac> |
|
10 | 1046 |
<taskdef name="pcompile" |
12085
ce2780cb121f
7150579: Moved ant code into a separate package, anttasks.
ohrstrom
parents:
11866
diff
changeset
|
1047 |
classname="anttasks.CompilePropertiesTask" |
10 | 1048 |
classpath="${build.toolclasses.dir}/"/> |
1049 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1050 |
|
17283
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1051 |
<target name="-def-compilecrules"> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1052 |
<macrodef name="compilecrules"> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1053 |
<sequential> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1054 |
<mkdir dir="${build.toolclasses.dir}"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1055 |
<javac fork="true" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1056 |
source="${boot.javac.source}" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1057 |
target="${boot.javac.target}" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1058 |
executable="${boot.java.home}/bin/javac" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1059 |
srcdir="${make.tools.dir}" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1060 |
includes="crules/*" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1061 |
destdir="${build.toolclasses.dir}/" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1062 |
classpath="${ant.core.lib}" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1063 |
bootclasspath="${boot.java.home}/jre/lib/rt.jar" |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1064 |
includeantruntime="false"> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1065 |
<compilerarg value="-Xbootclasspath/p:${build.bootstrap.dir}/classes"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1066 |
<compilerarg line="${javac.lint.opts}"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1067 |
</javac> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1068 |
<copy todir="${build.toolclasses.dir}/" includeemptydirs="false"> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1069 |
<fileset dir="${make.tools.dir}"> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1070 |
<include name="**/*.properties"/> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1071 |
</fileset> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1072 |
</copy> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1073 |
</sequential> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1074 |
</macrodef> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1075 |
</target> |
cddfdf252f4a
8010304: javac should detect all mutable implicit static fields in langtools using a plugin
vromero
parents:
16559
diff
changeset
|
1076 |
|
5845 | 1077 |
<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
|
1078 |
<mkdir dir="${build.toolclasses.dir}"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
1079 |
<javac fork="true" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
1080 |
source="${boot.javac.source}" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
1081 |
target="${boot.javac.target}" |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
1082 |
executable="${boot.java.home}/bin/javac" |
12085
ce2780cb121f
7150579: Moved ant code into a separate package, anttasks.
ohrstrom
parents:
11866
diff
changeset
|
1083 |
srcdir="${make.tools.dir}" |
ce2780cb121f
7150579: Moved ant code into a separate package, anttasks.
ohrstrom
parents:
11866
diff
changeset
|
1084 |
includes="genstubs/* anttasks/GenStubs*" |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
1085 |
destdir="${build.toolclasses.dir}/" |
8423 | 1086 |
classpath="${ant.core.lib}" |
1087 |
includeantruntime="false"> |
|
1088 |
<compilerarg value="-Xbootclasspath/p:${build.bootstrap.dir}/classes"/> |
|
10183 | 1089 |
<compilerarg line="${javac.lint.opts}"/> |
8423 | 1090 |
</javac> |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
1091 |
<taskdef name="genstubs" |
12085
ce2780cb121f
7150579: Moved ant code into a separate package, anttasks.
ohrstrom
parents:
11866
diff
changeset
|
1092 |
classname="anttasks.GenStubsTask" |
4415
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
1093 |
classpath="${build.toolclasses.dir}/"/> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
1094 |
</target> |
7d4f73717fba
6902337: fix langtools build to allow forward refs into jdk/ repo
jjg
parents:
4414
diff
changeset
|
1095 |
|
10 | 1096 |
<target name="-def-javadoc-tool" depends="-check-target.java.home"> |
1097 |
<macrodef name="javadoc-tool"> |
|
1098 |
<attribute name="name"/> |
|
1099 |
<attribute name="includes"/> |
|
1100 |
<attribute name="options" default=""/> |
|
25874 | 1101 |
<attribute name="source" default="${javac.source}"/> |
10 | 1102 |
<sequential> |
1103 |
<property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project --> |
|
1104 |
<!-- Note: even with this default value, includes |
|
25874 | 1105 |
from source directories get javadoc'd; see packageset below --> |
10 | 1106 |
<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
|
1107 |
<javadoc |
10 | 1108 |
executable="${target.java.home}/bin/javadoc" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1109 |
destdir="${build.javadoc.dir}/@{name}" |
10 | 1110 |
source="@{source}" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1111 |
windowtitle="UNOFFICIAL" |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1112 |
failonerror="true" |
10 | 1113 |
use="true" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1114 |
author="false" |
10 | 1115 |
version="false" |
1116 |
packagenames="${javadoc.packagenames}" > |
|
1117 |
<header><![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></header> |
|
1118 |
<arg line="@{options}"/> |
|
25874 | 1119 |
<arg value="-tag" /> |
1120 |
<arg value="implNote:a:Implementation Note:"/> |
|
10 | 1121 |
<bootclasspath> |
1122 |
<path location="${build.classes.dir}"/> |
|
1123 |
<path location="${target.java.home}/jre/lib/rt.jar"/> |
|
1124 |
</bootclasspath> |
|
1125 |
<sourcepath> |
|
25874 | 1126 |
<path refid="src.dirs"/> |
10 | 1127 |
</sourcepath> |
1128 |
<!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> --> |
|
1129 |
<!-- means that {@link some.package} will not work, which is no good. --> |
|
1130 |
<!-- (It correctly skips excluded single classes, but not if packageset is also included, --> |
|
1131 |
<!-- which also causes duplicates in the class index for included files.) --> |
|
25874 | 1132 |
<packageset dir="${src.dir}/java.base/share/classes" includes="@{includes}"> |
1133 |
<or> |
|
1134 |
<filename name="java/"/> |
|
1135 |
<filename name="javax/"/> |
|
1136 |
<filename name="com/sun/javadoc/"/> |
|
1137 |
<filename name="com/sun/source/"/> |
|
1138 |
</or> |
|
1139 |
</packageset> |
|
1140 |
<packageset dir="${src.dir}/java.compiler/share/classes" includes="@{includes}"> |
|
1141 |
<or> |
|
1142 |
<filename name="java/"/> |
|
1143 |
<filename name="javax/"/> |
|
1144 |
<filename name="com/sun/javadoc/"/> |
|
1145 |
<filename name="com/sun/source/"/> |
|
1146 |
</or> |
|
1147 |
</packageset> |
|
1148 |
<packageset dir="${src.dir}/jdk.compiler/share/classes" includes="@{includes}"> |
|
1149 |
<or> |
|
1150 |
<filename name="java/"/> |
|
1151 |
<filename name="javax/"/> |
|
1152 |
<filename name="com/sun/javadoc/"/> |
|
1153 |
<filename name="com/sun/source/"/> |
|
1154 |
</or> |
|
1155 |
</packageset> |
|
1156 |
<packageset dir="${src.dir}/jdk.dev/share/classes" includes="@{includes}"> |
|
1157 |
<or> |
|
1158 |
<filename name="java/"/> |
|
1159 |
<filename name="javax/"/> |
|
1160 |
<filename name="com/sun/javadoc/"/> |
|
1161 |
<filename name="com/sun/source/"/> |
|
1162 |
</or> |
|
1163 |
</packageset> |
|
1164 |
<packageset dir="${src.dir}/jdk.javadoc/share/classes" includes="@{includes}"> |
|
10 | 1165 |
<or> |
1166 |
<filename name="java/"/> |
|
1167 |
<filename name="javax/"/> |
|
1168 |
<filename name="com/sun/javadoc/"/> |
|
1169 |
<filename name="com/sun/source/"/> |
|
1170 |
</or> |
|
1171 |
</packageset> |
|
1172 |
</javadoc> |
|
1173 |
</sequential> |
|
1174 |
</macrodef> |
|
1175 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1176 |
|
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1177 |
<target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home,-check-target.java.home"> |
10 | 1178 |
<taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"> |
1179 |
<classpath> |
|
1180 |
<pathelement location="${jtreg.home}/lib/jtreg.jar"/> |
|
1181 |
<pathelement location="${jtreg.home}/lib/javatest.jar"/> |
|
1182 |
</classpath> |
|
1183 |
</taskdef> |
|
1184 |
<macrodef name="jtreg-tool"> |
|
1185 |
<attribute name="name"/> |
|
1186 |
<attribute name="tests"/> |
|
1187 |
<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
|
1188 |
<attribute name="samevm" default="true"/> |
5849
04edd7910585
6877961: langtools build should allow more options when running jtreg
jjg
parents:
5845
diff
changeset
|
1189 |
<attribute name="verbose" default="${default.jtreg.verbose}"/> |
04edd7910585
6877961: langtools build should allow more options when running jtreg
jjg
parents:
5845
diff
changeset
|
1190 |
<attribute name="options" default="${other.jtreg.options}"/> |
10 | 1191 |
<attribute name="keywords" default="-keywords:!ignore"/> |
1192 |
<attribute name="jpda.jvmargs" default=""/> |
|
25848
3bc09f4676a9
8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents:
25697
diff
changeset
|
1193 |
<attribute name="extra.jvmargs" default=""/> |
10 | 1194 |
<sequential> |
5849
04edd7910585
6877961: langtools build should allow more options when running jtreg
jjg
parents:
5845
diff
changeset
|
1195 |
<property name="coverage.options" value=""/> <!-- default --> |
04edd7910585
6877961: langtools build should allow more options when running jtreg
jjg
parents:
5845
diff
changeset
|
1196 |
<property name="coverage.classpath" value=""/> <!-- default --> |
04edd7910585
6877961: langtools build should allow more options when running jtreg
jjg
parents:
5845
diff
changeset
|
1197 |
<property name="default.jtreg.verbose" value="summary"/> <!-- default --> |
04edd7910585
6877961: langtools build should allow more options when running jtreg
jjg
parents:
5845
diff
changeset
|
1198 |
<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
|
1199 |
<jtreg |
10 | 1200 |
dir="${test.dir}" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1201 |
workDir="${build.jtreg.dir}/@{name}/work" |
10 | 1202 |
reportDir="${build.jtreg.dir}/@{name}/report" |
1203 |
jdk="@{jdk}" |
|
1204 |
samevm="@{samevm}" verbose="@{verbose}" |
|
1205 |
failonerror="false" resultproperty="jtreg.@{name}.result" |
|
1206 |
javacoptions="-g" |
|
25848
3bc09f4676a9
8043643: Add an crules analyzer avoiding string concatenation in messages of Assert checks.
jlahoda
parents:
25697
diff
changeset
|
1207 |
vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}${path.separator}${build.classes.dir} @{jpda.jvmargs} @{extra.jvmargs}"> |
10 | 1208 |
<arg line="@{keywords}"/> |
1209 |
<arg line="@{options}"/> |
|
1210 |
<arg line="@{tests}"/> |
|
1211 |
</jtreg> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1212 |
<!-- the next two properties are for convenience, when only |
10 | 1213 |
a single instance of jtreg will be invoked. --> |
1214 |
<condition property="jtreg.passed"> |
|
1873
658385834998
6795365: NetBeans projects in langtools repository are not NB6.5-friendly
jjg
parents:
1872
diff
changeset
|
1215 |
<equals arg1="${jtreg.@{name}.result}" arg2="0"/> |
10 | 1216 |
</condition> |
1217 |
<property name="jtreg.report" value="${build.jtreg.dir}/@{name}/report"/> |
|
1218 |
</sequential> |
|
1219 |
</macrodef> |
|
1220 |
<property name="jtreg.defined" value="true"/> |
|
1221 |
</target> |
|
1222 |
||
1223 |
<target name="-def-cobertura" depends="-check-cobertura.home"> |
|
1224 |
<path id="cobertura.classpath"> |
|
1225 |
<fileset dir="${cobertura.home}"> |
|
1226 |
<include name="cobertura.jar"/> |
|
1227 |
<include name="lib/**/*.jar"/> |
|
1228 |
</fileset> |
|
1229 |
</path> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1230 |
<taskdef classpathref="cobertura.classpath" resource="tasks.properties"/> |
10 | 1231 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1232 |
|
11054
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
1233 |
<target name="-def-checkstyle" unless="checkstyle.defined" |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
1234 |
depends="-check-checkstyle.home"> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
1235 |
<taskdef resource="checkstyletask.properties"> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
1236 |
<classpath> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
1237 |
<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
|
1238 |
</classpath> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
1239 |
</taskdef> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
1240 |
<property name="checkstyle.defined" value="true"/> |
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
1241 |
</target> |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
12085
diff
changeset
|
1242 |
|
6599
ec0419c70f24
6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents:
6598
diff
changeset
|
1243 |
<target name="-def-findbugs" unless="findbugs.defined" |
ec0419c70f24
6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents:
6598
diff
changeset
|
1244 |
depends="-check-findbugs.home,-check-target.java.home"> |
10 | 1245 |
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"> |
1246 |
<classpath> |
|
1247 |
<pathelement location="${findbugs.home}/lib/findbugs.jar"/> |
|
1248 |
</classpath> |
|
1249 |
</taskdef> |
|
1250 |
<macrodef name="findbugs-tool"> |
|
1251 |
<attribute name="name"/> |
|
1252 |
<attribute name="output" default="emacs"/> |
|
1253 |
<attribute name="outputFile" default=""/> |
|
1254 |
<attribute name="reportLevel" default="high"/> |
|
1255 |
<sequential> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1256 |
<findbugs |
10 | 1257 |
home="${findbugs.home}" |
1258 |
output="@{output}" |
|
1259 |
outputFile="@{outputFile}" |
|
1260 |
reportLevel="@{reportLevel}" |
|
1261 |
failOnError="false" |
|
1262 |
errorProperty="findbugs.@{name}.errors" |
|
1263 |
warningsProperty="findbugs.@{name}.warnings" |
|
6599
ec0419c70f24
6978974: [langtools] <findbugs> task should use ${target.java.home}
jjg
parents:
6598
diff
changeset
|
1264 |
jvm="${target.java.home}/bin/java" |
10 | 1265 |
jvmargs="-Xmx512M" > |
1266 |
<class location="${dist.dir}/lib/@{name}.jar"/> |
|
1267 |
<auxClasspath> |
|
1268 |
<pathelement location="${build.classes.dir}"/> |
|
1269 |
</auxClasspath> |
|
1270 |
<sourcePath> |
|
25874 | 1271 |
<path refid="src.dirs"/> |
10 | 1272 |
</sourcePath> |
1273 |
</findbugs> |
|
1274 |
</sequential> |
|
1275 |
</macrodef> |
|
1276 |
<property name="findbugs.defined" value="true"/> |
|
1277 |
</target> |
|
5845 | 1278 |
|
5844 | 1279 |
<target name="-def-vizant" unless="vizant.defined" depends="-check-vizant"> |
5845 | 1280 |
<taskdef name="vizant" classname="net.sourceforge.vizant.Vizant" classpath="${vizant.jar}"/> |
5844 | 1281 |
<property name="vizant.defined" value="true"/> |
1282 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
1283 |
|
10 | 1284 |
<target name="-def-check"> |
1285 |
<macrodef name="check"> |
|
1286 |
<attribute name="name"/> |
|
1287 |
<attribute name="property"/> |
|
5844 | 1288 |
<attribute name="marker" default=""/> |
10 | 1289 |
<sequential> |
1290 |
<fail message="Cannot locate @{name}: please set @{property} to its location"> |
|
1291 |
<condition> |
|
1292 |
<not> |
|
1293 |
<isset property="@{property}"/> |
|
1294 |
</not> |
|
1295 |
</condition> |
|
1296 |
</fail> |
|
1297 |
<fail message="@{name} is not installed in ${@{property}}"> |
|
1298 |
<condition> |
|
5845 | 1299 |
<and> |
1300 |
<not> |
|
1301 |
<equals arg1="@{marker}" arg2=""/> |
|
1302 |
</not> |
|
5844 | 1303 |
<not> |
1304 |
<available file="${@{property}}/@{marker}"/> |
|
1305 |
</not> |
|
5845 | 1306 |
</and> |
10 | 1307 |
</condition> |
1308 |
</fail> |
|
1309 |
</sequential> |
|
1310 |
</macrodef> |
|
1311 |
</target> |
|
1312 |
||
1313 |
</project> |
|
1314 |