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