author | jjg |
Wed, 12 Aug 2009 07:54:30 -0700 | |
changeset 3655 | f9ee66e780f4 |
parent 3654 | bb3c0eeec3cb |
child 3658 | 8ee720a52b7d |
permissions | -rw-r--r-- |
10 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- |
|
2212 | 3 |
Copyright 2007-2009 Sun Microsystems, Inc. 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 |
|
8 |
published by the Free Software Foundation. Sun designates this |
|
9 |
particular file as subject to the "Classpath" exception as provided |
|
10 |
by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
23 |
CA 95054 USA or visit www.sun.com if you need additional information or |
|
24 |
have any questions. |
|
25 |
--> |
|
26 |
||
27 |
<!-- |
|
28 |
This is the main build file for the complete langtools workspace. |
|
29 |
It is used both when working on the tools in NetBeans, and when building |
|
30 |
JDK itself, in which case it is invoked from the wrapper Makefile. |
|
31 |
--> |
|
32 |
||
33 |
<project name="langtools" default="build" basedir=".."> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
34 |
|
2850
307d7719ccb7
6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents:
2212
diff
changeset
|
35 |
<!-- Force full debuginfo for javac if the debug.classfiles |
307d7719ccb7
6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents:
2212
diff
changeset
|
36 |
property is set. This must be BEFORE the include of |
307d7719ccb7
6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents:
2212
diff
changeset
|
37 |
build.properties because it sets javac.debuglevel. --> |
307d7719ccb7
6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents:
2212
diff
changeset
|
38 |
<condition property="javac.debuglevel" value="source,lines,vars"> |
307d7719ccb7
6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents:
2212
diff
changeset
|
39 |
<equals arg1="${debug.classfiles}" arg2="true"/> |
307d7719ccb7
6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents:
2212
diff
changeset
|
40 |
</condition> |
307d7719ccb7
6837665: Deal with windows ant problem where commas in -D options do not work
aph
parents:
2212
diff
changeset
|
41 |
|
10 | 42 |
<!-- The following locations can be used to override default property values. --> |
43 |
||
44 |
<!-- Use this location for customizations specific to this instance of this workspace --> |
|
45 |
<property file="build.properties"/> |
|
46 |
||
47 |
<!-- Use this location for customizations common to all OpenJDK langtools workspaces --> |
|
48 |
<property file="${user.home}/.openjdk/${ant.project.name}-build.properties"/> |
|
49 |
||
50 |
<!-- Use this location for customizations common to all OpenJDK workspaces --> |
|
51 |
<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
|
52 |
|
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
53 |
<!-- Convenient shorthands for standard locations within the workspace. --> |
10 | 54 |
<property name="build.dir" location="build"/> |
55 |
<property name="build.bootstrap.dir" location="${build.dir}/bootstrap"/> |
|
56 |
<property name="build.coverage.dir" location="${build.dir}/coverage"/> |
|
57 |
<property name="build.classes.dir" location="${build.dir}/classes"/> |
|
58 |
<property name="build.gensrc.dir" location="${build.dir}/gensrc"/> |
|
59 |
<property name="build.javadoc.dir" location="${build.dir}/javadoc"/> |
|
60 |
<property name="build.jtreg.dir" location="${build.dir}/jtreg"/> |
|
61 |
<property name="build.toolclasses.dir" location="${build.dir}/toolclasses"/> |
|
62 |
<property name="dist.dir" location="dist"/> |
|
63 |
<property name="dist.bin.dir" location="${dist.dir}/bin"/> |
|
64 |
<property name="dist.coverage.dir" location="${dist.dir}/coverage"/> |
|
65 |
<property name="dist.findbugs.dir" location="${dist.dir}/findbugs"/> |
|
66 |
<property name="dist.lib.dir" location="${dist.dir}/lib"/> |
|
67 |
<property name="make.dir" location="make"/> |
|
68 |
<property name="make.tools.dir" location="${make.dir}/tools"/> |
|
69 |
<property name="src.dir" location="src"/> |
|
70 |
<property name="src.bin.dir" location="${src.dir}/share/bin"/> |
|
71 |
<property name="src.classes.dir" location="${src.dir}/share/classes"/> |
|
72 |
<property name="test.dir" location="test"/> |
|
73 |
||
74 |
<!-- java.marker is set to a marker file to check for within a Java install dir. |
|
75 |
The best file to check for across Solaris/Linux/Windows/MacOS is one of the |
|
76 |
executables; regrettably, that is OS-specific. --> |
|
77 |
<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
|
78 |
<os family="unix"/> |
10 | 79 |
</condition> |
80 |
<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
|
81 |
<os family="windows"/> |
10 | 82 |
</condition> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
83 |
|
10 | 84 |
<!-- 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
|
85 |
<property file="${make.dir}/build.properties"/> |
3654 | 86 |
|
87 |
<!-- 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
|
88 |
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
|
89 |
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
|
90 |
quietly default to simply use "java". --> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
91 |
<condition property="launcher.java" |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
92 |
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
|
93 |
<isset property="target.java.home"/> |
3654 | 94 |
</condition> |
95 |
||
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
96 |
|
10 | 97 |
<!-- Standard target to build deliverables for JDK build. --> |
98 |
||
99 |
<target name="build" depends="build-bootstrap-tools,build-all-classes"> |
|
100 |
<copy todir="${dist.dir}/bootstrap"> |
|
101 |
<fileset dir="${build.bootstrap.dir}" includes="bin/,lib/"/> |
|
102 |
</copy> |
|
103 |
<chmod dir="${dist.dir}/bootstrap/bin" perm="ugo+rx"> |
|
104 |
<include name="*"/> |
|
105 |
</chmod> |
|
106 |
<mkdir dir="${dist.lib.dir}"/> |
|
107 |
<jar file="${dist.lib.dir}/classes.jar" basedir="${build.classes.dir}"/> |
|
108 |
<zip file="${dist.lib.dir}/src.zip" basedir="${src.classes.dir}"/> |
|
109 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
110 |
|
10 | 111 |
<target name="build-bootstrap-tools" depends="build-bootstrap-javac,build-bootstrap-javadoc,build-bootstrap-doclets,build-bootstrap-javah"/> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
112 |
|
10 | 113 |
<target name="build-all-tools" depends="build-javac,build-javadoc,build-doclets,build-javah,build-javap,build-apt"/> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
114 |
|
10 | 115 |
<target name="build-all-classes" depends="build-classes-javac,build-classes-javadoc,build-classes-doclets,build-classes-javah,build-classes-javap,build-classes-apt"/> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
116 |
|
10 | 117 |
<!-- clean --> |
118 |
||
119 |
<target name="clean" description="Delete all generated files"> |
|
120 |
<delete dir="${build.dir}"/> |
|
121 |
<delete dir="${dist.dir}"/> |
|
122 |
</target> |
|
123 |
||
124 |
<!-- Additional targets for running tools on the build --> |
|
125 |
||
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
126 |
<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
|
127 |
<jtreg-tool name="all" tests="${jtreg.tests}"/> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
128 |
</target> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
129 |
|
10 | 130 |
<target name="findbugs" depends="-def-findbugs,build-all-tools"> |
131 |
<property name="findbugs.reportLevel" value="medium"/> |
|
132 |
<mkdir dir="${dist.findbugs.dir}"/> |
|
133 |
<findbugs |
|
134 |
home="${findbugs.home}" |
|
135 |
projectName="JDK langtools ${full.version}" |
|
136 |
output="xml" |
|
137 |
outputFile="${dist.findbugs.dir}/findbugs.xml" |
|
138 |
reportLevel="${findbugs.reportLevel}" |
|
139 |
failOnError="false" |
|
140 |
errorProperty="findbugs.all.errors" |
|
141 |
warningsProperty="findbugs.all.warnings" |
|
142 |
jvmargs="-Xmx512M"> |
|
143 |
<class location="${build.classes.dir}"/> |
|
144 |
<sourcePath> |
|
145 |
<pathelement location="${src.classes.dir}"/> |
|
146 |
</sourcePath> |
|
147 |
</findbugs> |
|
148 |
<exec executable="sh"> |
|
149 |
<arg value="${findbugs.home}/bin/convertXmlToText"/> |
|
150 |
<arg value="-longBugCodes"/> |
|
151 |
<arg value="-html:${findbugs.home}/src/xsl/fancy.xsl"/> |
|
152 |
<arg value="${dist.findbugs.dir}/findbugs.xml"/> |
|
153 |
<redirector output="${dist.findbugs.dir}/findbugs.html"/> |
|
727
cb50c1ae7bab
4075303: Use javap to enquire aboput a specific inner class
jjg
parents:
10
diff
changeset
|
154 |
</exec> |
10 | 155 |
</target> |
156 |
||
157 |
<target name="coverage" depends="-def-cobertura,build-all-classes,instrument-classes,jtreg,coverage-report"/> |
|
158 |
||
159 |
<target name="instrument-classes" depends="-def-cobertura"> |
|
160 |
<!-- only define the following property when we want coverage info --> |
|
161 |
<path id="coverage.classpath"> |
|
162 |
<pathelement location="${build.coverage.dir}/classes"/> |
|
163 |
<path refid="cobertura.classpath"/> |
|
164 |
</path> |
|
165 |
<property name="coverage.options" value="-Dnet.sourceforge.cobertura.datafile=${build.coverage.dir}/cobertura.ser"/> |
|
166 |
<property name="coverage.classpath" refid="coverage.classpath"/> |
|
167 |
<mkdir dir="${build.coverage.dir}/classes"/> |
|
168 |
<delete file="${build.coverage.dir}/cobertura.ser"/> |
|
169 |
<cobertura-instrument todir="${build.coverage.dir}/classes" |
|
170 |
datafile="${build.coverage.dir}/cobertura.ser"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
171 |
<fileset dir="${build.classes.dir}" |
10 | 172 |
includes="**/*.class" excludes="**/resources/*.class"/> |
173 |
</cobertura-instrument> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
174 |
</target> |
10 | 175 |
|
176 |
<target name="coverage-report" depends="-def-cobertura"> |
|
177 |
<mkdir dir="${dist.coverage.dir}"/> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
178 |
<cobertura-report |
10 | 179 |
srcdir="${src.classes.dir}" |
180 |
destdir="${dist.coverage.dir}" |
|
181 |
datafile="${build.coverage.dir}/cobertura.ser"/> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
182 |
<cobertura-report |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
183 |
format="xml" |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
184 |
srcdir="${src.classes.dir}" |
10 | 185 |
destdir="${dist.coverage.dir}" |
186 |
datafile="${build.coverage.dir}/cobertura.ser"/> |
|
187 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
188 |
|
10 | 189 |
<!-- javac targets --> |
190 |
||
191 |
<target name="build-bootstrap-javac" depends="-def-build-bootstrap-tool"> |
|
192 |
<build-bootstrap-tool name="javac" includes="${javac.includes}"/> |
|
193 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
194 |
|
10 | 195 |
<target name="build-classes-javac" depends="build-bootstrap-javac"> |
196 |
<build-classes name="javac" includes="${javac.includes}"/> |
|
197 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
198 |
|
10 | 199 |
<target name="build-javac" depends="build-bootstrap-javac"> |
200 |
<build-tool name="javac" includes="${javac.includes}"/> |
|
201 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
202 |
|
10 | 203 |
<target name="javadoc-javac" depends="build-javac,-def-javadoc-tool"> |
204 |
<javadoc-tool name="javac" includes="${javac.includes}" options="${javadoc.jls3.option}"/> |
|
205 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
206 |
|
10 | 207 |
<target name="jtreg-javac" depends="build-javac,-def-jtreg"> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
208 |
<jtreg-tool name="javac" tests="${javac.tests}"/> |
10 | 209 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
210 |
|
10 | 211 |
<target name="findbugs-javac" depends="build-javac,-def-findbugs"> |
212 |
<findbugs-tool name="javac"/> |
|
213 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
214 |
|
10 | 215 |
<target name="javac" depends="build-javac,jtreg-javac,findbugs-javac"/> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
216 |
|
10 | 217 |
<!-- javadoc targets --> |
218 |
||
219 |
<target name="build-bootstrap-javadoc" depends="build-bootstrap-javac"> |
|
220 |
<build-bootstrap-tool name="javadoc" |
|
221 |
includes="${javadoc.includes}" |
|
222 |
jarclasspath="javac.jar doclets.jar"/> |
|
223 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
224 |
|
10 | 225 |
<target name="build-classes-javadoc" depends="build-classes-javac"> |
226 |
<build-classes name="javadoc" includes="${javadoc.includes}"/> |
|
227 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
228 |
|
10 | 229 |
<target name="build-javadoc" depends="build-javac"> |
230 |
<build-tool name="javadoc" |
|
231 |
includes="${javadoc.includes}" |
|
232 |
jarclasspath="javac.jar doclets.jar"/> |
|
233 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
234 |
|
10 | 235 |
<target name="javadoc-javadoc" depends="build-javadoc,-def-javadoc-tool"> |
236 |
<javadoc-tool name="javadoc" includes="${javadoc.includes}"/> |
|
237 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
238 |
|
10 | 239 |
<target name="jtreg-javadoc" depends="build-javadoc,-def-jtreg"> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
240 |
<jtreg-tool name="javadoc" tests="${javadoc.tests}"/> |
10 | 241 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
242 |
|
10 | 243 |
<target name="findbugs-javadoc" depends="build-javadoc,-def-findbugs"> |
244 |
<findbugs-tool name="javadoc"/> |
|
245 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
246 |
|
10 | 247 |
<target name="javadoc" depends="build-javadoc,jtreg-javadoc,findbugs-javadoc"/> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
248 |
|
10 | 249 |
<!-- doclets targets --> |
250 |
||
251 |
<target name="build-bootstrap-doclets" depends="build-bootstrap-javadoc,-def-build-bootstrap-jar"> |
|
252 |
<build-bootstrap-jar name="doclets" |
|
253 |
includes="${doclets.includes}" |
|
254 |
jarmainclass="com.sun.tools.javadoc.Main" |
|
255 |
jarclasspath="javadoc.jar"/> |
|
256 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
257 |
|
10 | 258 |
<target name="build-classes-doclets" depends="build-classes-javadoc"> |
259 |
<build-classes name="doclets" includes="${doclets.includes}"/> |
|
260 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
261 |
|
10 | 262 |
<target name="build-doclets" depends="build-javadoc"> |
263 |
<!-- just jar, no bin for doclets --> |
|
264 |
<build-jar name="doclets" |
|
265 |
includes="${doclets.includes}" |
|
266 |
jarclasspath="javadoc.jar"/> |
|
267 |
</target> |
|
268 |
||
269 |
<!-- (no javadoc for doclets) --> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
270 |
|
10 | 271 |
<target name="jtreg-doclets" depends="build-doclets,-def-jtreg"> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
272 |
<jtreg-tool name="doclets" tests="${doclets.tests}"/> |
10 | 273 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
274 |
|
10 | 275 |
<target name="findbugs-doclets" depends="build-doclets,-def-findbugs"> |
276 |
<findbugs-tool name="doclets"/> |
|
277 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
278 |
|
10 | 279 |
<target name="doclets" depends="build-doclets,jtreg-doclets,findbugs-doclets"/> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
280 |
|
10 | 281 |
<!-- javah targets --> |
282 |
||
283 |
<target name="build-bootstrap-javah" depends="build-bootstrap-javadoc"> |
|
284 |
<build-bootstrap-tool name="javah" |
|
285 |
includes="${javah.includes}" |
|
286 |
jarclasspath="javadoc.jar doclets.jar javac.jar"/> |
|
287 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
288 |
|
10 | 289 |
<target name="build-javah" depends="build-javadoc"> |
290 |
<build-tool name="javah" |
|
291 |
includes="${javah.includes}" |
|
292 |
jarclasspath="javadoc.jar doclets.jar javac.jar"/> |
|
293 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
294 |
|
10 | 295 |
<target name="build-classes-javah" depends="build-classes-javadoc"> |
296 |
<build-classes name="javah" includes="${javah.includes}"/> |
|
297 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
298 |
|
10 | 299 |
<!-- (no javadoc for javah) --> |
300 |
||
301 |
<target name="jtreg-javah" depends="build-javah,-def-jtreg"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
302 |
<jtreg-tool name="javah" tests="${javah.tests}"/> |
10 | 303 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
304 |
|
10 | 305 |
<target name="findbugs-javah" depends="build-javah,-def-findbugs"> |
306 |
<findbugs-tool name="javah"/> |
|
307 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
308 |
|
10 | 309 |
<target name="javah" depends="build-javah,jtreg-javah,findbugs-javah"/> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
310 |
|
10 | 311 |
<!-- javap targets --> |
312 |
||
313 |
<target name="build-bootstrap-javap" depends="-def-build-bootstrap-tool"> |
|
314 |
<build-bootstrap-tool name="javap" |
|
315 |
includes="${javap.includes}" |
|
316 |
jarmainclass="sun.tools.javap.Main"/> |
|
317 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
318 |
|
727
cb50c1ae7bab
4075303: Use javap to enquire aboput a specific inner class
jjg
parents:
10
diff
changeset
|
319 |
<target name="build-classes-javap" depends="build-classes-javac"> |
10 | 320 |
<build-classes name="javap" includes="${javap.includes}"/> |
321 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
322 |
|
727
cb50c1ae7bab
4075303: Use javap to enquire aboput a specific inner class
jjg
parents:
10
diff
changeset
|
323 |
<target name="build-javap" depends="build-javac"> |
10 | 324 |
<build-tool name="javap" |
325 |
includes="${javap.includes}" |
|
2987 | 326 |
jarmainclass="com.sun.tools.javap.Main" |
727
cb50c1ae7bab
4075303: Use javap to enquire aboput a specific inner class
jjg
parents:
10
diff
changeset
|
327 |
jarclasspath="javac.jar"/> |
10 | 328 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
329 |
|
10 | 330 |
<!-- (no javadoc for javap) --> |
331 |
||
332 |
<target name="jtreg-javap" depends="build-javap,-def-jtreg"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
333 |
<jtreg-tool name="javap" tests="${javap.tests}"/> |
10 | 334 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
335 |
|
10 | 336 |
<target name="findbugs-javap" depends="build-javap,-def-findbugs"> |
337 |
<findbugs-tool name="javap"/> |
|
338 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
339 |
|
10 | 340 |
<target name="javap" depends="build-javap,jtreg-javap,findbugs-javap"/> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
341 |
|
10 | 342 |
<!-- apt targets --> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
343 |
|
10 | 344 |
<target name="build-bootstrap-apt" depends="build-bootstrap-javac"> |
345 |
<build-bootstrap-tool name="apt" |
|
346 |
includes="${apt.includes}" |
|
347 |
jarclasspath="javac.jar"/> |
|
348 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
349 |
|
10 | 350 |
<target name="build-apt" depends="build-javac"> |
351 |
<build-tool name="apt" |
|
352 |
includes="${apt.includes}" |
|
353 |
jarclasspath="javac.jar"/> |
|
354 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
355 |
|
10 | 356 |
<target name="build-classes-apt" depends="build-classes-javac"> |
357 |
<build-classes name="apt" includes="${apt.includes}"/> |
|
358 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
359 |
|
10 | 360 |
<target name="javadoc-apt" depends="build-apt,-def-javadoc-tool"> |
361 |
<javadoc-tool name="apt" includes="${apt.includes}"/> |
|
362 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
363 |
|
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
364 |
|
10 | 365 |
<target name="jtreg-apt" depends="build-apt,-def-jtreg"> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
366 |
<jtreg-tool name="apt" tests="${apt.tests}"/> |
10 | 367 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
368 |
|
10 | 369 |
<target name="findbugs-apt" depends="build-apt,-def-findbugs"> |
370 |
<findbugs-tool name="apt"/> |
|
371 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
372 |
|
10 | 373 |
<target name="apt" depends="build-apt,jtreg-apt,findbugs-apt"/> |
374 |
||
375 |
<!-- Check targets --> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
376 |
|
10 | 377 |
<target name="-check-boot.java.home" depends="-def-check"> |
378 |
<check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/> |
|
379 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
380 |
|
10 | 381 |
<target name="-check-target.java.home" depends="-def-check"> |
382 |
<check name="target java" property="target.java.home" marker="${java.marker}"/> |
|
383 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
384 |
|
10 | 385 |
<target name="-check-cobertura.home" depends="-def-check"> |
386 |
<check name="cobertura" property="cobertura.home" marker="cobertura.jar"/> |
|
387 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
388 |
|
10 | 389 |
<target name="-check-findbugs.home" depends="-def-check"> |
390 |
<check name="findbugs" property="findbugs.home" marker="lib/findbugs.jar"/> |
|
391 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
392 |
|
10 | 393 |
<target name="-check-jtreg.home" depends="-def-check"> |
394 |
<check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/> |
|
395 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
396 |
|
10 | 397 |
<!-- Ant macro and preset defs --> |
398 |
||
399 |
<target name="-def-build-tool" depends="-def-build-jar"> |
|
400 |
<macrodef name="build-tool"> |
|
401 |
<attribute name="name"/> |
|
402 |
<attribute name="includes"/> |
|
403 |
<attribute name="excludes" default="**/package-info.java"/> |
|
404 |
<attribute name="bin.dir" default="${dist.bin.dir}"/> |
|
405 |
<attribute name="classes.dir" default="${build.classes.dir}"/> |
|
406 |
<attribute name="gensrc.dir" default="${build.gensrc.dir}"/> |
|
407 |
<attribute name="lib.dir" default="${dist.lib.dir}"/> |
|
3654 | 408 |
<attribute name="java" default="${launcher.java}"/> |
3564
2db7ecd6bcd6
6870591: langtools build sets javac.bootclasspath incorrectly
jjg
parents:
2988
diff
changeset
|
409 |
<attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/> |
1871
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
410 |
<attribute name="javac.java.home" default="${boot.java.home}"/> |
2982 | 411 |
<attribute name="javac.source" default="${javac.source}"/> |
10 | 412 |
<attribute name="javac.target" default="${javac.target}"/> |
413 |
<attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/> |
|
414 |
<attribute name="jarclasspath" default=""/> |
|
415 |
<attribute name="release" default="${release}"/> |
|
416 |
<attribute name="full.version" default="${full.version}"/> |
|
417 |
<sequential> |
|
418 |
<build-jar |
|
419 |
name="@{name}" |
|
420 |
gensrc.dir="@{gensrc.dir}" |
|
421 |
classes.dir="@{classes.dir}" |
|
422 |
lib.dir="@{lib.dir}" |
|
423 |
includes="@{includes}" |
|
424 |
excludes="@{excludes}" |
|
425 |
jarmainclass="@{jarmainclass}" |
|
426 |
jarclasspath="@{jarclasspath}" |
|
427 |
release="@{release}" |
|
428 |
full.version="@{full.version}" |
|
429 |
javac.bootclasspath="@{javac.bootclasspath}" |
|
2982 | 430 |
javac.source="@{javac.source}" |
10 | 431 |
javac.target="@{javac.target}" |
432 |
/> |
|
433 |
<mkdir dir="@{bin.dir}"/> |
|
434 |
<copy file="${src.bin.dir}/launcher.sh-template" tofile="@{bin.dir}/@{name}"> |
|
435 |
<filterset begintoken="#" endtoken="#"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
436 |
<filter token="PROGRAM" value="@{name}"/> |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
437 |
<filter token="TARGET_JAVA" value="@{java}"/> |
10 | 438 |
</filterset> |
439 |
</copy> |
|
440 |
<chmod file="@{bin.dir}/@{name}" perm="ugo+rx"/> |
|
441 |
</sequential> |
|
442 |
</macrodef> |
|
443 |
</target> |
|
444 |
||
445 |
<target name="-def-build-jar" depends="-def-build-classes"> |
|
446 |
<macrodef name="build-jar"> |
|
447 |
<attribute name="name"/> |
|
448 |
<attribute name="includes"/> |
|
449 |
<attribute name="excludes" default="**/package-info.java"/> |
|
450 |
<attribute name="classes.dir" default="${build.classes.dir}"/> |
|
451 |
<attribute name="gensrc.dir" default="${build.gensrc.dir}"/> |
|
452 |
<attribute name="lib.dir" default="${dist.lib.dir}"/> |
|
3564
2db7ecd6bcd6
6870591: langtools build sets javac.bootclasspath incorrectly
jjg
parents:
2988
diff
changeset
|
453 |
<attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/> |
1871
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
454 |
<attribute name="javac.java.home" default="${boot.java.home}"/> |
2982 | 455 |
<attribute name="javac.source" default="${javac.source}"/> |
10 | 456 |
<attribute name="javac.target" default="${javac.target}"/> |
457 |
<attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/> |
|
458 |
<attribute name="jarclasspath" default=""/> |
|
459 |
<attribute name="release" default="${release}"/> |
|
460 |
<attribute name="full.version" default="${full.version}"/> |
|
461 |
<sequential> |
|
462 |
<build-classes |
|
463 |
name="@{name}" |
|
464 |
gensrc.dir="@{gensrc.dir}" |
|
465 |
classes.dir="@{classes.dir}" |
|
466 |
includes="@{includes}" |
|
467 |
excludes="@{excludes}" |
|
468 |
release="@{release}" |
|
469 |
full.version="@{full.version}" |
|
470 |
javac.bootclasspath="@{javac.bootclasspath}" |
|
2982 | 471 |
javac.source="@{javac.source}" |
10 | 472 |
javac.target="@{javac.target}" |
473 |
/> |
|
474 |
<mkdir dir="@{lib.dir}"/> |
|
475 |
<jar destfile="@{lib.dir}/@{name}.jar" |
|
476 |
basedir="@{classes.dir}" |
|
477 |
includes="@{includes}"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
478 |
<manifest> |
10 | 479 |
<attribute name="Main-Class" value="@{jarmainclass}"/> |
480 |
<attribute name="Class-Path" value="@{jarclasspath}"/> |
|
481 |
</manifest> |
|
482 |
</jar> |
|
483 |
</sequential> |
|
484 |
</macrodef> |
|
485 |
</target> |
|
486 |
||
487 |
<target name="-def-build-classes" depends="-def-pcompile"> |
|
488 |
<macrodef name="build-classes"> |
|
489 |
<attribute name="name"/> |
|
490 |
<attribute name="includes"/> |
|
491 |
<attribute name="excludes" default="**/package-info.java"/> |
|
492 |
<attribute name="classes.dir" default="${build.classes.dir}"/> |
|
493 |
<attribute name="gensrc.dir" default="${build.gensrc.dir}"/> |
|
494 |
<attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/> |
|
1871
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
495 |
<attribute name="javac.java.home" default="${boot.java.home}"/> |
2982 | 496 |
<attribute name="javac.source" default="${javac.source}"/> |
10 | 497 |
<attribute name="javac.target" default="${javac.target}"/> |
498 |
<attribute name="release" default="${release}"/> |
|
499 |
<attribute name="full.version" default="${full.version}"/> |
|
500 |
<sequential> |
|
501 |
<mkdir dir="@{gensrc.dir}"/> |
|
502 |
<mkdir dir="@{classes.dir}"/> |
|
503 |
<pcompile srcdir="${src.classes.dir}" |
|
504 |
destdir="@{gensrc.dir}" |
|
505 |
includes="@{includes}"/> |
|
506 |
<copy todir="@{gensrc.dir}"> |
|
727
cb50c1ae7bab
4075303: Use javap to enquire aboput a specific inner class
jjg
parents:
10
diff
changeset
|
507 |
<fileset dir="${src.classes.dir}" includes="@{includes}"/> |
10 | 508 |
<globmapper from="*.properties-template" to="*.properties"/> |
509 |
<filterset begintoken="$(" endtoken=")"> |
|
510 |
<filter token="JDK_VERSION" value="${jdk.version}"/> |
|
511 |
<filter token="RELEASE" value="@{release}"/> |
|
512 |
<filter token="FULL_VERSION" value="@{full.version}"/> |
|
513 |
</filterset> |
|
514 |
</copy> |
|
515 |
<pcompile srcdir="@{gensrc.dir}" |
|
516 |
destdir="@{gensrc.dir}" |
|
517 |
includes="**/*.properties"/> |
|
518 |
<javac fork="true" |
|
1871
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
519 |
executable="@{javac.java.home}/bin/javac" |
10 | 520 |
srcdir="@{gensrc.dir}" |
521 |
destdir="@{classes.dir}" |
|
522 |
includes="@{includes}" |
|
523 |
sourcepath="" |
|
524 |
includeAntRuntime="no" |
|
2982 | 525 |
source="@{javac.source}" |
10 | 526 |
target="@{javac.target}"> |
527 |
<compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/> |
|
528 |
<compilerarg line="${javac.version.opt}"/> |
|
529 |
<compilerarg line="-Xlint"/> |
|
530 |
</javac> |
|
531 |
<javac fork="true" |
|
1871
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
532 |
executable="@{javac.java.home}/bin/javac" |
10 | 533 |
srcdir="${src.classes.dir}" |
534 |
destdir="@{classes.dir}" |
|
535 |
includes="@{includes}" |
|
536 |
excludes="@{excludes}" |
|
537 |
sourcepath="" |
|
538 |
includeAntRuntime="no" |
|
2982 | 539 |
source="@{javac.source}" |
10 | 540 |
target="@{javac.target}" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
541 |
debug="${javac.debug}" |
10 | 542 |
debuglevel="${javac.debuglevel}"> |
543 |
<compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/> |
|
544 |
<compilerarg value="-Xbootclasspath/p:@{classes.dir}"/> |
|
545 |
<compilerarg line="${javac.no.jdk.warnings}"/> |
|
546 |
<compilerarg line="${javac.version.opt}"/> |
|
547 |
<compilerarg line="${javac.lint.opts}"/> |
|
548 |
</javac> |
|
549 |
<copy todir="@{classes.dir}"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
550 |
<fileset dir="${src.classes.dir}"> |
10 | 551 |
<include name="@{includes}"/> |
552 |
<exclude name="**/*.java"/> |
|
553 |
<exclude name="**/*.properties"/> |
|
554 |
<exclude name="**/*-template"/> |
|
555 |
<exclude name="**/package.html"/> |
|
556 |
</fileset> |
|
557 |
</copy> |
|
558 |
</sequential> |
|
559 |
</macrodef> |
|
560 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
561 |
|
10 | 562 |
<target name="-def-build-bootstrap-tool" depends="-check-boot.java.home,-def-build-tool"> |
563 |
<presetdef name="build-bootstrap-tool"> |
|
564 |
<build-tool |
|
2982 | 565 |
javac.source="${boot.javac.source}" |
10 | 566 |
javac.target="${boot.javac.target}" |
567 |
gensrc.dir="${build.bootstrap.dir}/gensrc" |
|
568 |
classes.dir="${build.bootstrap.dir}/classes" |
|
569 |
bin.dir="${build.bootstrap.dir}/bin" |
|
570 |
lib.dir="${build.bootstrap.dir}/lib" |
|
1872 | 571 |
java="${boot.java}" |
10 | 572 |
javac.bootclasspath="" |
573 |
release="${bootstrap.release}" |
|
574 |
full.version="${bootstrap.full.version}"/> |
|
575 |
</presetdef> |
|
576 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
577 |
|
10 | 578 |
<target name="-def-build-bootstrap-jar" depends="-def-build-jar"> |
579 |
<presetdef name="build-bootstrap-jar"> |
|
580 |
<build-jar |
|
2982 | 581 |
javac.source="${boot.javac.source}" |
10 | 582 |
javac.target="${boot.javac.target}" |
583 |
gensrc.dir="${build.bootstrap.dir}/gensrc" |
|
584 |
classes.dir="${build.bootstrap.dir}/classes" |
|
585 |
lib.dir="${build.bootstrap.dir}/lib" |
|
586 |
javac.bootclasspath="" |
|
587 |
release="${bootstrap.release}" |
|
588 |
full.version="${bootstrap.full.version}"/> |
|
589 |
</presetdef> |
|
590 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
591 |
|
10 | 592 |
<target name="-def-pcompile"> |
593 |
<mkdir dir="${build.toolclasses.dir}"/> |
|
1871
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
594 |
<javac fork="true" |
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
595 |
executable="${boot.java.home}/bin/javac" |
9bb6518238ff
6795030: Files in langtools build can be compiled ignoring java.home settings
jjg
parents:
735
diff
changeset
|
596 |
srcdir="${make.tools.dir}/CompileProperties" |
10 | 597 |
destdir="${build.toolclasses.dir}/" |
598 |
classpath="${ant.home}/lib/ant.jar"/> |
|
599 |
<taskdef name="pcompile" |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
600 |
classname="CompilePropertiesTask" |
10 | 601 |
classpath="${build.toolclasses.dir}/"/> |
602 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
603 |
|
10 | 604 |
<target name="-def-javadoc-tool" depends="-check-target.java.home"> |
605 |
<macrodef name="javadoc-tool"> |
|
606 |
<attribute name="name"/> |
|
607 |
<attribute name="includes"/> |
|
608 |
<attribute name="options" default=""/> |
|
609 |
<attribute name="source" default="1.5"/> <!-- FIXME --> |
|
610 |
<sequential> |
|
611 |
<property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project --> |
|
612 |
<!-- Note: even with this default value, includes |
|
613 |
from src.classes.dir get javadoc'd; see packageset below --> |
|
614 |
<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
|
615 |
<javadoc |
10 | 616 |
executable="${target.java.home}/bin/javadoc" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
617 |
destdir="${build.javadoc.dir}/@{name}" |
10 | 618 |
source="@{source}" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
619 |
windowtitle="UNOFFICIAL" |
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
620 |
failonerror="true" |
10 | 621 |
use="true" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
622 |
author="false" |
10 | 623 |
version="false" |
624 |
packagenames="${javadoc.packagenames}" > |
|
625 |
<header><![CDATA[<strong>Unofficial Javadoc</strong> generated from developer sources for preview purposes only]]></header> |
|
626 |
<arg line="@{options}"/> |
|
627 |
<bootclasspath> |
|
628 |
<path location="${build.classes.dir}"/> |
|
629 |
<path location="${target.java.home}/jre/lib/rt.jar"/> |
|
630 |
</bootclasspath> |
|
631 |
<sourcepath> |
|
632 |
<pathelement location="${src.classes.dir}"/> |
|
633 |
</sourcepath> |
|
634 |
<!-- XXX just <fileset> (restricted further to **/*.java) and no <packageset> --> |
|
635 |
<!-- means that {@link some.package} will not work, which is no good. --> |
|
636 |
<!-- (It correctly skips excluded single classes, but not if packageset is also included, --> |
|
637 |
<!-- which also causes duplicates in the class index for included files.) --> |
|
638 |
<packageset dir="${src.classes.dir}" includes="@{includes}"> |
|
639 |
<or> |
|
640 |
<filename name="java/"/> |
|
641 |
<filename name="javax/"/> |
|
642 |
<filename name="com/sun/javadoc/"/> |
|
643 |
<filename name="com/sun/mirror/"/> |
|
644 |
<filename name="com/sun/source/"/> |
|
645 |
</or> |
|
646 |
</packageset> |
|
647 |
</javadoc> |
|
648 |
</sequential> |
|
649 |
</macrodef> |
|
650 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
651 |
|
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
652 |
<target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home,-check-target.java.home"> |
10 | 653 |
<taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"> |
654 |
<classpath> |
|
655 |
<pathelement location="${jtreg.home}/lib/jtreg.jar"/> |
|
656 |
<pathelement location="${jtreg.home}/lib/javatest.jar"/> |
|
657 |
</classpath> |
|
658 |
</taskdef> |
|
659 |
<macrodef name="jtreg-tool"> |
|
660 |
<attribute name="name"/> |
|
661 |
<attribute name="tests"/> |
|
662 |
<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
|
663 |
<attribute name="samevm" default="true"/> |
10 | 664 |
<attribute name="verbose" default="summary"/> |
665 |
<attribute name="options" default=""/> |
|
666 |
<attribute name="keywords" default="-keywords:!ignore"/> |
|
667 |
<attribute name="jpda.jvmargs" default=""/> |
|
668 |
<sequential> |
|
669 |
<property name="coverage.options" value=""/> <!-- default --> |
|
670 |
<property name="coverage.classpath" value=""/> <!-- default --> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
671 |
<jtreg |
10 | 672 |
dir="${test.dir}" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
673 |
workDir="${build.jtreg.dir}/@{name}/work" |
10 | 674 |
reportDir="${build.jtreg.dir}/@{name}/report" |
675 |
jdk="@{jdk}" |
|
676 |
samevm="@{samevm}" verbose="@{verbose}" |
|
677 |
failonerror="false" resultproperty="jtreg.@{name}.result" |
|
678 |
javacoptions="-g" |
|
679 |
vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}:${build.classes.dir} @{jpda.jvmargs}"> |
|
680 |
<arg line="@{keywords}"/> |
|
681 |
<arg line="@{options}"/> |
|
682 |
<arg line="@{tests}"/> |
|
683 |
</jtreg> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
684 |
<!-- the next two properties are for convenience, when only |
10 | 685 |
a single instance of jtreg will be invoked. --> |
686 |
<condition property="jtreg.passed"> |
|
1873
658385834998
6795365: NetBeans projects in langtools repository are not NB6.5-friendly
jjg
parents:
1872
diff
changeset
|
687 |
<equals arg1="${jtreg.@{name}.result}" arg2="0"/> |
10 | 688 |
</condition> |
689 |
<property name="jtreg.report" value="${build.jtreg.dir}/@{name}/report"/> |
|
690 |
</sequential> |
|
691 |
</macrodef> |
|
692 |
<property name="jtreg.defined" value="true"/> |
|
693 |
</target> |
|
694 |
||
695 |
<target name="-def-cobertura" depends="-check-cobertura.home"> |
|
696 |
<path id="cobertura.classpath"> |
|
697 |
<fileset dir="${cobertura.home}"> |
|
698 |
<include name="cobertura.jar"/> |
|
699 |
<include name="lib/**/*.jar"/> |
|
700 |
</fileset> |
|
701 |
</path> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
702 |
<taskdef classpathref="cobertura.classpath" resource="tasks.properties"/> |
10 | 703 |
</target> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
704 |
|
10 | 705 |
<target name="-def-findbugs" unless="findbugs.defined" depends="-check-findbugs.home"> |
706 |
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"> |
|
707 |
<classpath> |
|
708 |
<pathelement location="${findbugs.home}/lib/findbugs.jar"/> |
|
709 |
</classpath> |
|
710 |
</taskdef> |
|
711 |
<macrodef name="findbugs-tool"> |
|
712 |
<attribute name="name"/> |
|
713 |
<attribute name="output" default="emacs"/> |
|
714 |
<attribute name="outputFile" default=""/> |
|
715 |
<attribute name="reportLevel" default="high"/> |
|
716 |
<sequential> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
717 |
<findbugs |
10 | 718 |
home="${findbugs.home}" |
719 |
output="@{output}" |
|
720 |
outputFile="@{outputFile}" |
|
721 |
reportLevel="@{reportLevel}" |
|
722 |
failOnError="false" |
|
723 |
errorProperty="findbugs.@{name}.errors" |
|
724 |
warningsProperty="findbugs.@{name}.warnings" |
|
725 |
jvmargs="-Xmx512M" > |
|
726 |
<class location="${dist.dir}/lib/@{name}.jar"/> |
|
727 |
<auxClasspath> |
|
728 |
<pathelement location="${build.classes.dir}"/> |
|
729 |
</auxClasspath> |
|
730 |
<sourcePath> |
|
731 |
<pathelement location="${src.classes.dir}"/> |
|
732 |
</sourcePath> |
|
733 |
</findbugs> |
|
734 |
</sequential> |
|
735 |
</macrodef> |
|
736 |
<property name="findbugs.defined" value="true"/> |
|
737 |
</target> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
738 |
|
10 | 739 |
<target name="-def-check"> |
740 |
<macrodef name="check"> |
|
741 |
<attribute name="name"/> |
|
742 |
<attribute name="property"/> |
|
743 |
<attribute name="marker"/> |
|
744 |
<sequential> |
|
745 |
<fail message="Cannot locate @{name}: please set @{property} to its location"> |
|
746 |
<condition> |
|
747 |
<not> |
|
748 |
<isset property="@{property}"/> |
|
749 |
</not> |
|
750 |
</condition> |
|
751 |
</fail> |
|
752 |
<fail message="@{name} is not installed in ${@{property}}"> |
|
753 |
<condition> |
|
754 |
<not> |
|
755 |
<available file="${@{property}}/@{marker}"/> |
|
756 |
</not> |
|
757 |
</condition> |
|
758 |
</fail> |
|
759 |
</sequential> |
|
760 |
</macrodef> |
|
761 |
</target> |
|
762 |
||
763 |
<!-- standard JDK target --> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
764 |
<target name="sanity" |
10 | 765 |
description="display settings of congiguration values"> |
766 |
<echo level="info">ant.home = ${ant.home}</echo> |
|
767 |
<echo level="info">boot.java.home = ${boot.java.home}</echo> |
|
768 |
<echo level="info">target.java.home = ${target.java.home}</echo> |
|
769 |
<echo level="info">jtreg.home = ${jtreg.home}</echo> |
|
770 |
<echo level="info">findbugs.home = ${findbugs.home}</echo> |
|
771 |
</target> |
|
772 |
||
773 |
<!-- useful debugging targets --> |
|
774 |
<target name="diagnostics"> |
|
775 |
<diagnostics/> |
|
776 |
</target> |
|
777 |
||
778 |
<target name="post-sanity" depends="-def-jtreg,sanity,build" |
|
779 |
description="perform basic validation after a standard build"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
780 |
<jtreg |
10 | 781 |
dir="make/test" |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
782 |
workDir="${build.jtreg.dir}/post-sanity/work" |
10 | 783 |
reportDir="${build.jtreg.dir}/post-sanity/report" |
784 |
jdk="${target.java.home}" |
|
785 |
verbose="summary" |
|
786 |
failonerror="false" resultproperty="jtreg.post-sanity.result"> |
|
787 |
</jtreg> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
788 |
|
10 | 789 |
</target> |
790 |
</project> |
|
791 |