author | tschatzl |
Wed, 11 Sep 2019 10:19:09 +0200 | |
changeset 58081 | 8b08eaf9a0eb |
parent 52804 | 28094715ae71 |
permissions | -rw-r--r-- |
10 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- |
|
52804
28094715ae71
8214718: Update missing copyright year in build system
ihse
parents:
51565
diff
changeset
|
3 |
~ Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. |
36526 | 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 |
48406 | 44 |
|-bin (scripts to invoke various tools, javac etc.) |
36526 | 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 value="-d" /> |
|
236 |
<arg value="${build.modules}" /> |
|
41936 | 237 |
<arg line="${javac.opts}" /> |
47217 | 238 |
<arg line="${xpatch.src.cmd}" /> |
239 |
<arg line="--module-source-path ." /> |
|
240 |
<arg line="@${build.dir}/sources.txt" /> |
|
36526 | 241 |
</exec> |
47217 | 242 |
<delete file="${build.dir}/sources.txt"/> |
36526 | 243 |
<delete> |
244 |
<fileset dir="${build.modules}" includes="**/module-info.class"/> |
|
245 |
</delete> |
|
47217 | 246 |
<!-- workaround for incremental compilation --> |
247 |
<copy todir="${build.prevsrc}" > |
|
248 |
<multirootfileset refid="source.fileset"/> |
|
249 |
</copy> |
|
36526 | 250 |
</target> |
251 |
||
252 |
<target name="build-all-tools" depends="build-all-classes, -def-build-tool"> |
|
253 |
<build-tool name="javac"/> |
|
254 |
<build-tool name="javadoc"/> |
|
255 |
<build-tool name="javap"/> |
|
256 |
<build-tool name="jdeps"/> |
|
257 |
<build-tool name="sjavac"/> |
|
258 |
<build-tool name="jshell"/> |
|
259 |
</target> |
|
260 |
||
261 |
<target name="jtreg" depends="build-all-tools,-def-jtreg"> |
|
262 |
<jtreg-tool name="all" tests="${jtreg.tests}"/> |
|
263 |
</target> |
|
264 |
||
265 |
<!-- |
|
266 |
**** IDE support |
|
267 |
--> |
|
268 |
||
269 |
<target name="idea" depends="-check-langtools.jdk.home"> |
|
270 |
<mkdir dir=".idea"/> |
|
271 |
<copy todir=".idea" > |
|
51565
7e5f08c619e3
8209064: Make intellij support more robust after changes for 2018.2
mcimadamore
parents:
51266
diff
changeset
|
272 |
<fileset dir="${make.dir}/intellij/template"> |
39177
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
273 |
<exclude name="**/src/**"/> |
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
274 |
<exclude name="**/utils/**"/> |
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
275 |
</fileset> |
36526 | 276 |
</copy> |
277 |
<condition property="idea.jtreg.home" value="${jtreg.home}" else = "[jtreg.home]"> |
|
278 |
<isset property="jtreg.home"/> |
|
279 |
</condition> |
|
280 |
<condition property="idea.target.jdk" value="${langtools.jdk.home}" else = "$JDKPath$"> |
|
281 |
<isset property="langtools.jdk.home"/> |
|
282 |
</condition> |
|
283 |
<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
|
284 |
<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
|
285 |
<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
|
286 |
<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
|
287 |
<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
|
288 |
<replace file=".idea/misc.xml" token="@XPATCH@" value="${xpatch.cmd}"/> |
36526 | 289 |
<mkdir dir=".idea/classes"/> |
38507
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
290 |
<javac source="${javac.build.source}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
291 |
target="${javac.build.target}" |
51565
7e5f08c619e3
8209064: Make intellij support more robust after changes for 2018.2
mcimadamore
parents:
51266
diff
changeset
|
292 |
srcdir="${make.dir}/intellij/template/src" |
36526 | 293 |
destdir=".idea/classes"/> |
294 |
</target> |
|
295 |
||
296 |
<!-- |
|
297 |
**** Utility definitions |
|
298 |
--> |
|
299 |
||
300 |
<target name="-def-pparse"> |
|
301 |
<copy todir="${build.tools}/propertiesparser" > |
|
302 |
<fileset dir="${make.tools.dir}/propertiesparser" includes="**/resources/**"/> |
|
303 |
</copy> |
|
38507
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
304 |
<javac source="${javac.build.source}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
305 |
target="${javac.build.target}" |
36526 | 306 |
srcdir="${make.tools.dir}" |
307 |
includes="propertiesparser/* anttasks/PropertiesParser* anttasks/PathFileSet*" |
|
308 |
destdir="${build.tools}" |
|
309 |
classpath="${ant.core.lib}" |
|
310 |
bootclasspath="${langtools.jdk.home}/jre/lib/rt.jar" |
|
311 |
includeantruntime="false"> |
|
41519
612f31a9b42b
8167442: Langtools ant build not working after addition of -Xlint:exports
jlahoda
parents:
40599
diff
changeset
|
312 |
<compilerarg line="${javac.build.opts} -XDstringConcat=inline"/> |
36526 | 313 |
</javac> |
314 |
<taskdef name="pparse" |
|
315 |
classname="anttasks.PropertiesParserTask" |
|
316 |
classpath="${build.tools}"/> |
|
317 |
</target> |
|
318 |
||
319 |
<target name="-def-pcompile"> |
|
38507
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
320 |
<javac |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
321 |
source="${javac.build.source}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
322 |
target="${javac.build.target}" |
36526 | 323 |
srcdir="${make.tools.dir}" |
324 |
includes="compileproperties/* anttasks/CompileProperties* anttasks/PathFileSet*" |
|
325 |
destdir="${build.dir}/toolclasses/" |
|
326 |
classpath="${ant.core.lib}" |
|
327 |
includeantruntime="false"> |
|
41519
612f31a9b42b
8167442: Langtools ant build not working after addition of -Xlint:exports
jlahoda
parents:
40599
diff
changeset
|
328 |
<compilerarg line="${javac.build.opts} -XDstringConcat=inline"/> |
36526 | 329 |
</javac> |
330 |
<taskdef name="pcompile" |
|
331 |
classname="anttasks.CompilePropertiesTask" |
|
332 |
classpath="${build.tools}"/> |
|
333 |
</target> |
|
334 |
||
335 |
<target name="-def-build-tool"> |
|
336 |
<macrodef name="build-tool"> |
|
337 |
<attribute name="name"/> |
|
338 |
<attribute name="compilation.kind" default=""/> |
|
339 |
<attribute name="bin.dir" default="${build.bin}"/> |
|
340 |
<attribute name="java" default="${launcher.java}"/> |
|
341 |
<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
|
342 |
<attribute name="xpatch" default="${xpatch.cmd}"/> |
36526 | 343 |
<sequential> |
344 |
<mkdir dir="@{bin.dir}"/> |
|
345 |
<copy file="${make.dir}/launcher.sh-template" tofile="@{bin.dir}/@{name}"> |
|
346 |
<filterset begintoken="#" endtoken="#"> |
|
347 |
<filter token="PROGRAM" value="@{main.class}"/> |
|
348 |
<filter token="TARGET_JAVA" value="@{java}"/> |
|
349 |
<filter token="PS" value="${path.separator}"/> |
|
37851
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
350 |
<filter token="XPATCH" value="${xpatch.cmd}"/> |
36526 | 351 |
</filterset> |
352 |
</copy> |
|
353 |
<chmod file="@{bin.dir}/@{name}" perm="ugo+rx"/> |
|
354 |
</sequential> |
|
355 |
</macrodef> |
|
356 |
</target> |
|
357 |
||
358 |
<target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home,-check-langtools.jdk.home"> |
|
359 |
<taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"> |
|
360 |
<classpath> |
|
361 |
<pathelement location="${jtreg.home}/lib/jtreg.jar"/> |
|
362 |
<pathelement location="${jtreg.home}/lib/javatest.jar"/> |
|
363 |
</classpath> |
|
364 |
</taskdef> |
|
365 |
<macrodef name="jtreg-tool"> |
|
366 |
<attribute name="name"/> |
|
367 |
<attribute name="tests"/> |
|
368 |
<attribute name="jdk" default="${langtools.jdk.home}"/> |
|
369 |
<attribute name="agentvm" default="true"/> |
|
370 |
<attribute name="verbose" default="${default.jtreg.verbose}"/> |
|
371 |
<attribute name="options" default="${other.jtreg.options}"/> |
|
44461
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
372 |
<attribute name="ignore" default="-keywords:!ignore -exclude:${test.dir}/ProblemList.txt"/> |
36526 | 373 |
<attribute name="jpda.jvmargs" default=""/> |
374 |
<attribute name="extra.jvmargs" default=""/> |
|
375 |
<attribute name="build.modules" default="${build.modules}"/> |
|
376 |
<sequential> |
|
377 |
<property name="coverage.options" value=""/> <!-- default --> |
|
378 |
<property name="coverage.classpath" value=""/> <!-- default --> |
|
379 |
<property name="default.jtreg.verbose" value="summary"/> <!-- default --> |
|
380 |
<property name="other.jtreg.options" value=""/> <!-- default --> |
|
381 |
<property name="jtreg.classfiles.to.modules" value="@{agentvm}"/> |
|
382 |
<jtreg |
|
383 |
dir="${test.dir}" |
|
384 |
workDir="${build.jtreg}/@{name}/work" |
|
385 |
reportDir="${build.jtreg}/@{name}/report" |
|
386 |
jdk="@{jdk}" |
|
387 |
agentvm="@{agentvm}" verbose="@{verbose}" |
|
388 |
failonerror="false" resultproperty="jtreg.@{name}.result" |
|
38609
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
389 |
vmoptions="${coverage.options} @{extra.jvmargs} ${xpatch.noquotes.cmd}"> |
36526 | 390 |
<arg value="-debug:@{jpda.jvmargs}"/> |
44461
8e5061e5b34b
8177667: Langtools ant build has issues with Windows file separators
mcimadamore
parents:
41936
diff
changeset
|
391 |
<arg line="@{ignore}"/> |
36526 | 392 |
<arg line="@{options}"/> |
393 |
<arg line="@{tests}"/> |
|
394 |
</jtreg> |
|
395 |
<!-- the next two properties are for convenience, when only |
|
396 |
a single instance of jtreg will be invoked. --> |
|
397 |
<condition property="jtreg.passed"> |
|
398 |
<equals arg1="${jtreg.@{name}.result}" arg2="0"/> |
|
399 |
</condition> |
|
400 |
<property name="jtreg.report" value="${build.jtreg}/@{name}/report"/> |
|
401 |
</sequential> |
|
402 |
</macrodef> |
|
403 |
<property name="jtreg.defined" value="true"/> |
|
404 |
</target> |
|
10 | 405 |
</project> |