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