author | coleenp |
Wed, 15 Nov 2017 08:14:56 -0500 | |
changeset 47895 | a879c04d61ea |
parent 47217 | 72e3ae9a25eb |
child 48406 | 26b47ea4c77d |
permissions | -rw-r--r-- |
10 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- |
|
36526 | 3 |
~ Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. |
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 |
|
8 |
~ published by the Free Software Foundation. Oracle designates this |
|
9 |
~ particular file as subject to the "Classpath" exception as provided |
|
10 |
~ by Oracle in the LICENSE file that accompanied this code. |
|
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 |
~ |
|
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. |
|
25 |
--> |
|
10 | 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 |
|
36526 | 36 |
recommended.) At a minimum, langtools.jdk.home must be set to the installed |
5845 | 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. |
|
36526 | 39 |
For example, to run any of the jtreg tests you must set jtreg.home. |
5845 | 40 |
|
36526 | 41 |
The output of the build is as follows: |
5845 | 42 |
|
36526 | 43 |
build |
44 |
|-bin (scripts to invoke various tools, javac, javah etc.) |
|
45 |
|-genrsc (generated sources - i.e. properties) |
|
46 |
|-modules (compiled classes in a modular layout) |
|
47 |
|-jtreg (test work/results) |
|
48 |
|-toolclasses (tools used for building - like the property compiler) |
|
5845 | 49 |
|
50 |
This file is organized into sections as follows: |
|
51 |
- global property definitions |
|
36526 | 52 |
- primary top level targets (cleaning, building) |
5845 | 53 |
- utility definitions |
10 | 54 |
--> |
55 |
||
47217 | 56 |
<project name="langtools" default="build" basedir="../.."> |
5845 | 57 |
<!-- |
58 |
**** Global property definitions. |
|
59 |
--> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
60 |
|
10 | 61 |
<!-- The following locations can be used to override default property values. --> |
62 |
||
63 |
<!-- Use this location for customizations specific to this instance of this workspace --> |
|
47217 | 64 |
<property file="make/langtools/build.properties"/> |
10 | 65 |
|
66 |
<!-- Use this location for customizations common to all OpenJDK langtools workspaces --> |
|
67 |
<property file="${user.home}/.openjdk/${ant.project.name}-build.properties"/> |
|
68 |
||
69 |
<!-- Use this location for customizations common to all OpenJDK workspaces --> |
|
70 |
<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
|
71 |
|
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
72 |
<!-- Convenient shorthands for standard locations within the workspace. --> |
36526 | 73 |
<property name="src.dir" location="src"/> |
74 |
<property name="test.dir" location="test"/> |
|
47217 | 75 |
<property name="make.dir" location="make/langtools"/> |
11054
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
76 |
<property name="make.conf.dir" location="${make.dir}/conf"/> |
10 | 77 |
<property name="make.tools.dir" location="${make.dir}/tools"/> |
47217 | 78 |
<property name="build.dir" location="build/langtools"/> |
36526 | 79 |
<property name="build.modules" location="${build.dir}/modules"/> |
80 |
<property name="build.gensrc" location="${build.dir}/gensrc"/> |
|
81 |
<property name="build.tools" location="${build.dir}/toolclasses"/> |
|
82 |
<property name="build.bin" location="${build.dir}/bin"/> |
|
83 |
<property name="build.jtreg" location="${build.dir}/jtreg"/> |
|
84 |
<property name="build.prevsrc" location="${build.dir}/prevsrc"/> |
|
10 | 85 |
|
47217 | 86 |
<dirset id="src.module.dirset" dir="${src.dir}" includes="${module.names}"/> |
37851
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
87 |
|
47217 | 88 |
<pathconvert pathsep="," property="src.module.dirs" refid="src.module.dirset"/> |
89 |
||
90 |
<pathconvert property="xpatch.rest" pathsep=" --patch-module=" refid="src.module.dirset"> |
|
44461
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
91 |
<scriptmapper language="javascript"> |
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
92 |
fs = project.getProperty("file.separator"); |
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
93 |
path = project.getProperty("build.modules"); |
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
94 |
mod = source.substr(source.lastIndexOf(fs)+1); |
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
95 |
self.addMappedName(mod + "=\"" + path + fs + mod + "\""); |
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
96 |
</scriptmapper> |
38609
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
97 |
</pathconvert> |
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
98 |
|
47217 | 99 |
<pathconvert property="xpatch.noquotes.rest" pathsep=" --patch-module=" refid="src.module.dirset"> |
44461
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
100 |
<scriptmapper language="javascript"> |
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
101 |
fs = project.getProperty("file.separator"); |
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
102 |
path = project.getProperty("build.modules"); |
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
103 |
mod = source.substr(source.lastIndexOf(fs)+1); |
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
104 |
self.addMappedName(mod + "=" + path + fs + mod); |
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
105 |
</scriptmapper> |
37851
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
106 |
</pathconvert> |
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
107 |
|
40599
be40838eb215
8164887: update tests to remove use of old-style options
jjg
parents:
40510
diff
changeset
|
108 |
<property name="xpatch.cmd" value="--patch-module=${xpatch.rest}"/> |
be40838eb215
8164887: update tests to remove use of old-style options
jjg
parents:
40510
diff
changeset
|
109 |
<property name="xpatch.noquotes.cmd" value="--patch-module=${xpatch.noquotes.rest}"/> |
25874 | 110 |
|
10 | 111 |
<!-- java.marker is set to a marker file to check for within a Java install dir. |
112 |
The best file to check for across Solaris/Linux/Windows/MacOS is one of the |
|
113 |
executables; regrettably, that is OS-specific. --> |
|
114 |
<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
|
115 |
<os family="unix"/> |
10 | 116 |
</condition> |
117 |
<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
|
118 |
<os family="windows"/> |
10 | 119 |
</condition> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
120 |
|
10 | 121 |
<!-- 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
|
122 |
<property file="${make.dir}/build.properties"/> |
3654 | 123 |
|
36526 | 124 |
<condition property="langtools.jdk.home" value="${jdk.home}"> |
125 |
<isset property="jdk.home" /> |
|
3654 | 126 |
</condition> |
127 |
||
36526 | 128 |
<!-- launcher.java is used in the launcher scripts provided to run |
129 |
the tools' jar files. If it has not already been set, then |
|
130 |
default it to use ${langtools.jdk.home}, if available, otherwise |
|
131 |
quietly default to simply use "java". --> |
|
132 |
<condition property="launcher.java" |
|
133 |
value="${langtools.jdk.home}/bin/java" else="java"> |
|
134 |
<isset property="langtools.jdk.home"/> |
|
135 |
</condition> |
|
27546
79b6b60ff60a
8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents:
26268
diff
changeset
|
136 |
|
79b6b60ff60a
8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents:
26268
diff
changeset
|
137 |
<!-- |
36526 | 138 |
**** Check targets |
5845 | 139 |
--> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
140 |
|
10 | 141 |
<target name="-def-check"> |
36526 | 142 |
<macrodef name="check"> |
143 |
<attribute name="name"/> |
|
144 |
<attribute name="property"/> |
|
145 |
<attribute name="marker" default=""/> |
|
10 | 146 |
<sequential> |
147 |
<fail message="Cannot locate @{name}: please set @{property} to its location"> |
|
148 |
<condition> |
|
149 |
<not> |
|
150 |
<isset property="@{property}"/> |
|
151 |
</not> |
|
152 |
</condition> |
|
153 |
</fail> |
|
154 |
<fail message="@{name} is not installed in ${@{property}}"> |
|
155 |
<condition> |
|
5845 | 156 |
<and> |
157 |
<not> |
|
158 |
<equals arg1="@{marker}" arg2=""/> |
|
159 |
</not> |
|
5844 | 160 |
<not> |
161 |
<available file="${@{property}}/@{marker}"/> |
|
162 |
</not> |
|
5845 | 163 |
</and> |
10 | 164 |
</condition> |
165 |
</fail> |
|
166 |
</sequential> |
|
167 |
</macrodef> |
|
168 |
</target> |
|
169 |
||
36526 | 170 |
<target name="-check-langtools.jdk.home" depends="-def-check"> |
171 |
<check name="target java" property="langtools.jdk.home" marker="${java.marker}"/> |
|
172 |
</target> |
|
173 |
||
174 |
<target name="-check-jtreg.home" depends="-def-check"> |
|
175 |
<check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/> |
|
176 |
</target> |
|
177 |
||
178 |
<!-- |
|
179 |
**** Primary targets |
|
180 |
--> |
|
181 |
||
182 |
<target name="clean" description="Delete all generated files"> |
|
183 |
<delete dir="${build.dir}"/> |
|
184 |
</target> |
|
185 |
||
186 |
<target name="build" depends="build-all-tools"/> |
|
187 |
||
188 |
<target name="-prepare-build" depends="-check-langtools.jdk.home"> |
|
189 |
<mkdir dir="${build.modules}"/> |
|
190 |
<mkdir dir="${build.tools}"/> |
|
191 |
<mkdir dir="${build.gensrc}"/> |
|
192 |
<mkdir dir="${build.bin}"/> |
|
193 |
<mkdir dir="${build.prevsrc}"/> |
|
194 |
</target> |
|
195 |
||
196 |
<target name="generate-sources-internal"> |
|
197 |
<basename property="module.name" file="${basedir}"/> |
|
47217 | 198 |
<mkdir dir="${build.gensrc}/${module.name}"/> |
36526 | 199 |
<pparse destdir="${build.gensrc}/${module.name}" includes="${langtools.resource.includes}"> |
200 |
<src path="./share/classes"/> |
|
201 |
</pparse> |
|
202 |
<pcompile destdir="${build.gensrc}/${module.name}" includes="**/*.properties"> |
|
203 |
<src path="./share/classes"/> |
|
204 |
</pcompile> |
|
205 |
</target> |
|
206 |
||
207 |
<target name="generate-sources" depends="-prepare-build,-def-pparse,-def-pcompile"> |
|
208 |
<subant inheritall="true" target="generate-sources-internal" genericantfile="${make.dir}/build.xml"> |
|
47217 | 209 |
<dirset refid="src.module.dirset"/> |
36526 | 210 |
</subant> |
211 |
</target> |
|
212 |
||
213 |
<target name="build-all-classes" depends="generate-sources"> |
|
47217 | 214 |
<pathconvert property="xpatch.src.rest" pathsep=" --patch-module=" refid="src.module.dirset"> |
215 |
<scriptmapper language="javascript"> |
|
216 |
fs = project.getProperty("file.separator"); |
|
217 |
path_src = project.getProperty("src.dir"); |
|
218 |
path_sep = project.getProperty("path.separator"); |
|
219 |
path_gensrc = project.getProperty("build.gensrc"); |
|
220 |
mod = source.substr(source.lastIndexOf(fs)+1); |
|
221 |
self.addMappedName(mod + "=" + path_src + fs + mod + path_sep + path_gensrc + fs + mod); |
|
222 |
</scriptmapper> |
|
223 |
</pathconvert> |
|
224 |
<property name="xpatch.src.cmd" value="--patch-module=${xpatch.src.rest}"/> |
|
225 |
<pathconvert pathsep="," property="gensrc.module.dirs"> |
|
226 |
<dirset dir="${build.gensrc}" includes="${module.names}"/> |
|
227 |
</pathconvert> |
|
228 |
<multirootfileset id="source.fileset" basedirs="${src.module.dirs},${gensrc.module.dirs}"> |
|
229 |
<include name="**/*.java"/> |
|
230 |
<different targetdir="${build.prevsrc}" ignoreFileTimes="true"/> |
|
231 |
</multirootfileset> |
|
232 |
<pathconvert pathsep=" " property="source.files" refid="source.fileset"/> |
|
233 |
<echo file="${build.dir}/sources.txt">${source.files}</echo> |
|
36526 | 234 |
<exec executable="${langtools.jdk.home}/bin/javac" failonerror="true"> |
235 |
<arg line="-source ${javac.source} -target ${javac.target}" /> |
|
236 |
<arg value="-d" /> |
|
237 |
<arg value="${build.modules}" /> |
|
41936 | 238 |
<arg line="${javac.opts}" /> |
47217 | 239 |
<arg line="${xpatch.src.cmd}" /> |
240 |
<arg line="--module-source-path ." /> |
|
241 |
<arg line="@${build.dir}/sources.txt" /> |
|
36526 | 242 |
</exec> |
47217 | 243 |
<delete file="${build.dir}/sources.txt"/> |
36526 | 244 |
<delete> |
245 |
<fileset dir="${build.modules}" includes="**/module-info.class"/> |
|
246 |
</delete> |
|
47217 | 247 |
<!-- workaround for incremental compilation --> |
248 |
<copy todir="${build.prevsrc}" > |
|
249 |
<multirootfileset refid="source.fileset"/> |
|
250 |
</copy> |
|
36526 | 251 |
</target> |
252 |
||
253 |
<target name="build-all-tools" depends="build-all-classes, -def-build-tool"> |
|
254 |
<build-tool name="javac"/> |
|
255 |
<build-tool name="javadoc"/> |
|
256 |
<build-tool name="javap"/> |
|
257 |
<build-tool name="javah"/> |
|
258 |
<build-tool name="jdeps"/> |
|
259 |
<build-tool name="sjavac"/> |
|
260 |
<build-tool name="jshell"/> |
|
261 |
</target> |
|
262 |
||
263 |
<target name="jtreg" depends="build-all-tools,-def-jtreg"> |
|
264 |
<jtreg-tool name="all" tests="${jtreg.tests}"/> |
|
265 |
</target> |
|
266 |
||
267 |
<!-- |
|
268 |
**** IDE support |
|
269 |
--> |
|
270 |
||
271 |
<target name="idea" depends="-check-langtools.jdk.home"> |
|
272 |
<mkdir dir=".idea"/> |
|
273 |
<copy todir=".idea" > |
|
47217 | 274 |
<fileset dir="${make.dir}/intellij"> |
39177
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
275 |
<exclude name="**/src/**"/> |
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
276 |
<exclude name="**/utils/**"/> |
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
277 |
</fileset> |
36526 | 278 |
</copy> |
279 |
<condition property="idea.jtreg.home" value="${jtreg.home}" else = "[jtreg.home]"> |
|
280 |
<isset property="jtreg.home"/> |
|
281 |
</condition> |
|
282 |
<condition property="idea.target.jdk" value="${langtools.jdk.home}" else = "$JDKPath$"> |
|
283 |
<isset property="langtools.jdk.home"/> |
|
284 |
</condition> |
|
285 |
<replace file=".idea/ant.xml" token="@IDEA_TARGET_JDK@" value="${idea.target.jdk}"/> |
|
38522
c4fdb181cd64
8157326: Intellij langtools project should use shared run configurations
mcimadamore
parents:
38507
diff
changeset
|
286 |
<replace dir=".idea/runConfigurations" token="@IDEA_TARGET_JDK@" value="${idea.target.jdk}"/> |
c4fdb181cd64
8157326: Intellij langtools project should use shared run configurations
mcimadamore
parents:
38507
diff
changeset
|
287 |
<replace dir=".idea/runConfigurations" token="@XPATCH@" value="${xpatch.cmd}"/> |
40510
722c82994682
8164481: Remove jtreg run configurations from langtools idea project
mcimadamore
parents:
39177
diff
changeset
|
288 |
<replace file=".idea/misc.xml" token="@IDEA_JTREG_HOME@" value="${idea.jtreg.home}"/> |
722c82994682
8164481: Remove jtreg run configurations from langtools idea project
mcimadamore
parents:
39177
diff
changeset
|
289 |
<replace file=".idea/misc.xml" token="@IDEA_TARGET_JDK@" value="${idea.target.jdk}"/> |
722c82994682
8164481: Remove jtreg run configurations from langtools idea project
mcimadamore
parents:
39177
diff
changeset
|
290 |
<replace file=".idea/misc.xml" token="@XPATCH@" value="${xpatch.cmd}"/> |
36526 | 291 |
<mkdir dir=".idea/classes"/> |
38507
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
292 |
<javac source="${javac.build.source}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
293 |
target="${javac.build.target}" |
47217 | 294 |
srcdir="${make.dir}/intellij/src" |
36526 | 295 |
destdir=".idea/classes"/> |
296 |
</target> |
|
297 |
||
298 |
<!-- |
|
299 |
**** Utility definitions |
|
300 |
--> |
|
301 |
||
302 |
<target name="-def-pparse"> |
|
303 |
<copy todir="${build.tools}/propertiesparser" > |
|
304 |
<fileset dir="${make.tools.dir}/propertiesparser" includes="**/resources/**"/> |
|
305 |
</copy> |
|
38507
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
306 |
<javac source="${javac.build.source}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
307 |
target="${javac.build.target}" |
36526 | 308 |
srcdir="${make.tools.dir}" |
309 |
includes="propertiesparser/* anttasks/PropertiesParser* anttasks/PathFileSet*" |
|
310 |
destdir="${build.tools}" |
|
311 |
classpath="${ant.core.lib}" |
|
312 |
bootclasspath="${langtools.jdk.home}/jre/lib/rt.jar" |
|
313 |
includeantruntime="false"> |
|
41519
612f31a9b42b
8167442: Langtools ant build not working after addition of -Xlint:exports
jlahoda
parents:
40599
diff
changeset
|
314 |
<compilerarg line="${javac.build.opts} -XDstringConcat=inline"/> |
36526 | 315 |
</javac> |
316 |
<taskdef name="pparse" |
|
317 |
classname="anttasks.PropertiesParserTask" |
|
318 |
classpath="${build.tools}"/> |
|
319 |
</target> |
|
320 |
||
321 |
<target name="-def-pcompile"> |
|
38507
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
322 |
<javac |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
323 |
source="${javac.build.source}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
324 |
target="${javac.build.target}" |
36526 | 325 |
srcdir="${make.tools.dir}" |
326 |
includes="compileproperties/* anttasks/CompileProperties* anttasks/PathFileSet*" |
|
327 |
destdir="${build.dir}/toolclasses/" |
|
328 |
classpath="${ant.core.lib}" |
|
329 |
includeantruntime="false"> |
|
41519
612f31a9b42b
8167442: Langtools ant build not working after addition of -Xlint:exports
jlahoda
parents:
40599
diff
changeset
|
330 |
<compilerarg line="${javac.build.opts} -XDstringConcat=inline"/> |
36526 | 331 |
</javac> |
332 |
<taskdef name="pcompile" |
|
333 |
classname="anttasks.CompilePropertiesTask" |
|
334 |
classpath="${build.tools}"/> |
|
335 |
</target> |
|
336 |
||
337 |
<target name="-def-build-tool"> |
|
338 |
<macrodef name="build-tool"> |
|
339 |
<attribute name="name"/> |
|
340 |
<attribute name="compilation.kind" default=""/> |
|
341 |
<attribute name="bin.dir" default="${build.bin}"/> |
|
342 |
<attribute name="java" default="${launcher.java}"/> |
|
343 |
<attribute name="main.class" default="${tool.@{name}.main.class}"/> |
|
37851
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
344 |
<attribute name="xpatch" default="${xpatch.cmd}"/> |
36526 | 345 |
<sequential> |
346 |
<mkdir dir="@{bin.dir}"/> |
|
347 |
<copy file="${make.dir}/launcher.sh-template" tofile="@{bin.dir}/@{name}"> |
|
348 |
<filterset begintoken="#" endtoken="#"> |
|
349 |
<filter token="PROGRAM" value="@{main.class}"/> |
|
350 |
<filter token="TARGET_JAVA" value="@{java}"/> |
|
351 |
<filter token="PS" value="${path.separator}"/> |
|
37851
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
352 |
<filter token="XPATCH" value="${xpatch.cmd}"/> |
36526 | 353 |
</filterset> |
354 |
</copy> |
|
355 |
<chmod file="@{bin.dir}/@{name}" perm="ugo+rx"/> |
|
356 |
</sequential> |
|
357 |
</macrodef> |
|
358 |
</target> |
|
359 |
||
360 |
<target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home,-check-langtools.jdk.home"> |
|
361 |
<taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"> |
|
362 |
<classpath> |
|
363 |
<pathelement location="${jtreg.home}/lib/jtreg.jar"/> |
|
364 |
<pathelement location="${jtreg.home}/lib/javatest.jar"/> |
|
365 |
</classpath> |
|
366 |
</taskdef> |
|
367 |
<macrodef name="jtreg-tool"> |
|
368 |
<attribute name="name"/> |
|
369 |
<attribute name="tests"/> |
|
370 |
<attribute name="jdk" default="${langtools.jdk.home}"/> |
|
371 |
<attribute name="agentvm" default="true"/> |
|
372 |
<attribute name="verbose" default="${default.jtreg.verbose}"/> |
|
373 |
<attribute name="options" default="${other.jtreg.options}"/> |
|
44461
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
374 |
<attribute name="ignore" default="-keywords:!ignore -exclude:${test.dir}/ProblemList.txt"/> |
36526 | 375 |
<attribute name="jpda.jvmargs" default=""/> |
376 |
<attribute name="extra.jvmargs" default=""/> |
|
377 |
<attribute name="build.modules" default="${build.modules}"/> |
|
378 |
<sequential> |
|
379 |
<property name="coverage.options" value=""/> <!-- default --> |
|
380 |
<property name="coverage.classpath" value=""/> <!-- default --> |
|
381 |
<property name="default.jtreg.verbose" value="summary"/> <!-- default --> |
|
382 |
<property name="other.jtreg.options" value=""/> <!-- default --> |
|
383 |
<property name="jtreg.classfiles.to.modules" value="@{agentvm}"/> |
|
384 |
<jtreg |
|
385 |
dir="${test.dir}" |
|
386 |
workDir="${build.jtreg}/@{name}/work" |
|
387 |
reportDir="${build.jtreg}/@{name}/report" |
|
388 |
jdk="@{jdk}" |
|
389 |
agentvm="@{agentvm}" verbose="@{verbose}" |
|
390 |
failonerror="false" resultproperty="jtreg.@{name}.result" |
|
38609
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
391 |
vmoptions="${coverage.options} @{extra.jvmargs} ${xpatch.noquotes.cmd}"> |
36526 | 392 |
<arg value="-debug:@{jpda.jvmargs}"/> |
44461
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
393 |
<arg line="@{ignore}"/> |
36526 | 394 |
<arg line="@{options}"/> |
395 |
<arg line="@{tests}"/> |
|
396 |
</jtreg> |
|
397 |
<!-- the next two properties are for convenience, when only |
|
398 |
a single instance of jtreg will be invoked. --> |
|
399 |
<condition property="jtreg.passed"> |
|
400 |
<equals arg1="${jtreg.@{name}.result}" arg2="0"/> |
|
401 |
</condition> |
|
402 |
<property name="jtreg.report" value="${build.jtreg}/@{name}/report"/> |
|
403 |
</sequential> |
|
404 |
</macrodef> |
|
405 |
<property name="jtreg.defined" value="true"/> |
|
406 |
</target> |
|
10 | 407 |
</project> |