author | alanb |
Tue, 02 Oct 2012 12:23:16 +0100 | |
changeset 14017 | 9fa1edaf97a3 |
parent 13703 | dd844a010010 |
child 14198 | 071fd6fd257d |
permissions | -rw-r--r-- |
2 | 1 |
# |
13703
dd844a010010
7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents:
13353
diff
changeset
|
2 |
# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
5 |
# This code is free software; you can redistribute it and/or modify it |
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
# |
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
5506 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# Makefile for building and packaging all of the JDK and the JRE. See |
|
28 |
# also included files. |
|
29 |
# |
|
30 |
||
31 |
BUILDDIR=. |
|
13703
dd844a010010
7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents:
13353
diff
changeset
|
32 |
|
2 | 33 |
include $(BUILDDIR)/common/Defs.gmk |
34 |
||
35 |
# |
|
36 |
# Make sure we are clear what the default target is |
|
37 |
# |
|
38 |
default_target: all |
|
39 |
||
40 |
# |
|
41 |
# Check target |
|
42 |
# |
|
43 |
||
44 |
check: variable_check |
|
45 |
||
46 |
# |
|
47 |
# Help target |
|
48 |
# |
|
49 |
help: intro_help target_help variable_help notes_help examples_help |
|
50 |
||
51 |
# Intro help message |
|
52 |
intro_help: |
|
53 |
@$(ECHO) "\ |
|
54 |
Makefile for the main JDK workspace. \n\ |
|
55 |
Default behavior is to use the BOOTDIR javac to bootstrap the build and \n\ |
|
56 |
import in pre-built components like the VM from the JDK_IMPORT_PATH. \n\ |
|
57 |
" |
|
58 |
||
59 |
# Target help |
|
60 |
target_help: |
|
61 |
@$(ECHO) "\ |
|
62 |
--- Common Targets --- \n\ |
|
63 |
all -- build the core JDK (default target) \n\ |
|
64 |
help -- Print out help information \n\ |
|
65 |
check -- Check make variable values for correctness \n\ |
|
66 |
sanity -- Perform detailed sanity checks on system and settings \n\ |
|
67 |
openjdk -- synonym for 'OPENJDK=true all' \n\ |
|
68 |
fastdebug -- build the core JDK in 'fastdebug' mode (-g -O) \n\ |
|
69 |
debug -- build the core JDK in 'debug' mode (-g) \n\ |
|
70 |
clean -- remove all built and imported files \n\ |
|
71 |
clobber -- same as clean \n\ |
|
72 |
docs -- run javadoc to generate the JDK documentation \n\ |
|
73 |
images -- build the jdk and jre image directories \n\ |
|
74 |
import -- copy in the pre-built components (e.g. VM) \n\ |
|
75 |
import_product -- copy in the product components \n\ |
|
76 |
import_fastdebug -- copy in the fastdebug components \n\ |
|
77 |
import_debug -- copy in the debug components \n\ |
|
78 |
create_links -- create softlinks in Solaris 32bit build to 64bit dirs \n\ |
|
79 |
" |
|
80 |
||
81 |
# Variable help (only common ones used by this workspace) |
|
82 |
variable_help: variable_help_intro variable_list variable_help_end |
|
83 |
variable_help_intro: |
|
84 |
@$(ECHO) "--- Common Variables ---" |
|
85 |
variable_help_end: |
|
86 |
@$(ECHO) " " |
|
87 |
||
88 |
# One line descriptions for the variables |
|
89 |
OUTPUTDIR.desc = Output directory |
|
90 |
PARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count |
|
91 |
SLASH_JAVA.desc = Root of all build tools, e.g. /java or J: |
|
92 |
BOOTDIR.desc = JDK used to boot the build |
|
93 |
LANGTOOLS_DIST.desc = langtools dist area used to build |
|
94 |
CORBA_DIST.desc = corba dist area |
|
95 |
JAXP_DIST.desc = jaxp dist area |
|
96 |
JAXWS_DIST.desc = jaxws dist area |
|
97 |
JDK_IMPORT_PATH.desc = JDK used to import components of the build |
|
98 |
COMPILER_PATH.desc = Compiler install directory |
|
99 |
CACERTS_FILE.desc = Location of certificates file |
|
100 |
DEVTOOLS_PATH.desc = Directory containing zip and unzip |
|
101 |
CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files |
|
102 |
DXSDK_PATH.desc = Root directory of DirectX SDK |
|
103 |
||
104 |
# Make variables to print out (description and value) |
|
105 |
VARIABLE_PRINTVAL_LIST += \ |
|
106 |
OUTPUTDIR \ |
|
107 |
PARALLEL_COMPILE_JOBS \ |
|
108 |
SLASH_JAVA \ |
|
109 |
BOOTDIR \ |
|
110 |
LANGTOOLS_DIST \ |
|
111 |
JAXWS_DIST \ |
|
112 |
CORBA_DIST \ |
|
113 |
JAXP_DIST \ |
|
114 |
JDK_IMPORT_PATH \ |
|
115 |
COMPILER_PATH \ |
|
116 |
CACERTS_FILE \ |
|
117 |
DEVTOOLS_PATH |
|
118 |
||
119 |
# Make variables that should refer to directories that exist |
|
120 |
VARIABLE_CHECKDIR_LIST += \ |
|
121 |
SLASH_JAVA \ |
|
122 |
BOOTDIR \ |
|
123 |
JDK_IMPORT_PATH \ |
|
124 |
COMPILER_PATH \ |
|
125 |
DEVTOOLS_PATH |
|
126 |
||
127 |
# Make variables that should refer to files that exist |
|
128 |
VARIABLE_CHECKFIL_LIST += \ |
|
129 |
CACERTS_FILE |
|
130 |
||
131 |
# Some are windows specific |
|
132 |
ifeq ($(PLATFORM), windows) |
|
133 |
||
134 |
VARIABLE_PRINTVAL_LIST += \ |
|
8018
79ce40b4ab5e
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7666
diff
changeset
|
135 |
DXSDK_PATH |
2 | 136 |
|
137 |
VARIABLE_CHECKDIR_LIST += \ |
|
8018
79ce40b4ab5e
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7666
diff
changeset
|
138 |
DXSDK_PATH |
2 | 139 |
|
140 |
endif |
|
141 |
||
142 |
# For pattern rules below, so all are treated the same |
|
143 |
DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval) |
|
144 |
DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir) |
|
145 |
DO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil) |
|
146 |
||
147 |
# Complete variable check |
|
148 |
variable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST) |
|
149 |
variable_list: $(DO_PRINTVAL_LIST) variable_check |
|
150 |
||
151 |
# Pattern rule for printing out a variable |
|
152 |
%.printval: |
|
153 |
@$(ECHO) " ALT_$* - $($*.desc)" |
|
154 |
@$(ECHO) " \t $*=$($*)" |
|
155 |
||
156 |
# Pattern rule for checking to see if a variable with a directory exists |
|
157 |
%.checkdir: |
|
158 |
@if [ ! -d $($*) ] ; then \ |
|
159 |
$(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ |
|
160 |
fi |
|
161 |
||
162 |
# Pattern rule for checking to see if a variable with a file exists |
|
163 |
%.checkfil: |
|
164 |
@if [ ! -f $($*) ] ; then \ |
|
165 |
$(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ |
|
166 |
fi |
|
167 |
||
168 |
# Misc notes on help |
|
169 |
notes_help: |
|
170 |
@$(ECHO) "\ |
|
171 |
--- Notes --- \n\ |
|
172 |
- All builds use same output directory unless overridden with \n\ |
|
173 |
\t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\ |
|
174 |
\t to use the clean target first. \n\ |
|
175 |
- LANGTOOLS_DIST must refer to a langtools dist area, used to build. \n\ |
|
176 |
- CORBA_DIST must refer to a corba dist area. \n\ |
|
177 |
- JAXP_DIST must refer to a jaxp dist area. \n\ |
|
178 |
- JAXWS_DIST must refer to a jaxws dist area. \n\ |
|
179 |
- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\ |
|
180 |
\t builds or previous release JDK builds will work. \n\ |
|
181 |
- The 'debug' target and 'import_debug' only works when a debug promoted \n\ |
|
182 |
\t build is available, and they currently are not. \n\ |
|
183 |
- The fastest builds have been when the workspace and the BOOTDIR are on \n\ |
|
184 |
\t local disk. \n\ |
|
185 |
" |
|
186 |
||
187 |
examples_help: |
|
188 |
@$(ECHO) "\ |
|
189 |
--- Examples --- \n\ |
|
190 |
$(MAKE) fastdebug \n\ |
|
191 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\ |
|
192 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug images \n\ |
|
193 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar all docs images \n\ |
|
194 |
$(MAKE) ALT_BOOTDIR=/opt/java/jdk1.6.0 \n\ |
|
195 |
$(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.7.0 \n\ |
|
196 |
" |
|
197 |
||
198 |
# |
|
199 |
# 'all' target intro |
|
200 |
# |
|
11994
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
201 |
all:: |
2 | 202 |
@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: $(shell $(DATE) '+%y-%m-%d %H:%M') |
203 |
||
204 |
# Just in case anyone uses this old name, same as 'build' |
|
205 |
optimized: build |
|
206 |
||
207 |
openjdk: |
|
208 |
$(MAKE) OPENJDK=true all |
|
209 |
||
210 |
# |
|
211 |
# Special debug rules (You may also want to set ALT_OUTPUTDIR) |
|
212 |
# |
|
213 |
debug: |
|
214 |
$(MAKE) VARIANT=DBG all |
|
215 |
fastdebug: |
|
216 |
$(MAKE) VARIANT=DBG FASTDEBUG=true all |
|
217 |
||
218 |
# |
|
219 |
# Rules to re-import VM and other JDK files |
|
220 |
# |
|
221 |
import: |
|
222 |
$(CD) java/redist; $(MAKE) clean all |
|
223 |
||
224 |
import_fastdebug: |
|
225 |
$(MAKE) VARIANT=DBG FASTDEBUG=true import |
|
226 |
||
227 |
import_product: |
|
228 |
$(MAKE) VARIANT=OPT FASTDEBUG=false import |
|
229 |
||
230 |
# |
|
231 |
# Core. |
|
232 |
# |
|
233 |
||
234 |
all build:: sanity-all post-sanity-all |
|
235 |
||
4917
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4524
diff
changeset
|
236 |
SUBDIRS = tools java javax sun com |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11994
diff
changeset
|
237 |
ifeq ($(PLATFORM), macosx) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11994
diff
changeset
|
238 |
SUBDIRS += apple |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11994
diff
changeset
|
239 |
endif |
4917
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4524
diff
changeset
|
240 |
SUBDIRS_tools = launchers |
13353
a043d6778c4c
4650871: Classes in sunw.* should be removed from workspace and rt.jar
malenkov
parents:
12047
diff
changeset
|
241 |
SUBDIRS_misc = org jpda |
11994
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
242 |
|
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
243 |
# demos |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
244 |
ifndef NO_DEMOS |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
245 |
SUBDIRS_misc += mkdemo |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
246 |
endif |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
247 |
|
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
248 |
# samples |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
249 |
ifndef NO_SAMPLES |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
250 |
SUBDIRS_misc += mksample |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
251 |
endif |
4917
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4524
diff
changeset
|
252 |
|
7174
5a56e43d896c
6792706: Add JAR file to bootclasspath when using AggressiveOpts
ohair
parents:
6681
diff
changeset
|
253 |
# Alternate classes implementation |
5a56e43d896c
6792706: Add JAR file to bootclasspath when using AggressiveOpts
ohair
parents:
6681
diff
changeset
|
254 |
ifndef OPENJDK |
5a56e43d896c
6792706: Add JAR file to bootclasspath when using AggressiveOpts
ohair
parents:
6681
diff
changeset
|
255 |
SUBDIRS_misc += altclasses |
5a56e43d896c
6792706: Add JAR file to bootclasspath when using AggressiveOpts
ohair
parents:
6681
diff
changeset
|
256 |
endif |
5a56e43d896c
6792706: Add JAR file to bootclasspath when using AggressiveOpts
ohair
parents:
6681
diff
changeset
|
257 |
|
4917
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4524
diff
changeset
|
258 |
include $(BUILDDIR)/common/Subdirs.gmk |
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4524
diff
changeset
|
259 |
|
2 | 260 |
all build:: |
261 |
$(SUBDIRS-loop) |
|
262 |
||
263 |
clean clobber:: |
|
264 |
$(RM) -r $(OUTPUTDIR) |
|
265 |
||
266 |
# |
|
267 |
# Docs |
|
268 |
# |
|
269 |
OTHERSUBDIRS = docs |
|
270 |
docs:: sanity-docs post-sanity-docs |
|
271 |
$(OTHERSUBDIRS-loop) |
|
272 |
||
273 |
# |
|
274 |
# Release engineering targets. |
|
275 |
# |
|
276 |
include $(BUILDDIR)/common/Release.gmk |
|
13703
dd844a010010
7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents:
13353
diff
changeset
|
277 |
-include $(CUSTOM_MAKE_DIR)/Release.gmk |
2 | 278 |
|
279 |
# |
|
280 |
# Cscope targets. |
|
281 |
# |
|
282 |
include $(BUILDDIR)/common/Cscope.gmk |
|
283 |
||
284 |
# |
|
285 |
# Sanity checks. |
|
286 |
# |
|
287 |
include $(BUILDDIR)/common/Sanity.gmk |
|
288 |
||
289 |
$(OUTPUTDIR) $(TEMPDIR): |
|
290 |
$(MKDIR) -p $@ |
|
291 |
||
292 |
# this should be the last rule in this file: |
|
293 |
all:: |
|
294 |
@if [ -r $(WARNING_FILE) ]; then \ |
|
295 |
$(CAT) $(WARNING_FILE) ; \ |
|
296 |
fi |
|
297 |
@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build finished: $(shell $(DATE) '+%y-%m-%d %H:%M') |
|
298 |
||
299 |
# |
|
300 |
# Developer rule that links 32 and 64 bit builds on Solaris by creating |
|
301 |
# softlinks in the 32bit outputdir to the 64bit outputdir. |
|
302 |
# |
|
303 |
ifeq ($(PLATFORM), solaris) |
|
304 |
ifeq ($(ARCH_FAMILY), sparc) |
|
305 |
ARCH32 = sparc |
|
306 |
ARCH64 = sparcv9 |
|
307 |
else |
|
308 |
ARCH32 = i586 |
|
309 |
ARCH64 = amd64 |
|
310 |
endif |
|
311 |
OUTPUTDIR32 = $(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH32) |
|
312 |
OUTPUTDIR64 = $(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH64) |
|
313 |
endif |
|
314 |
||
315 |
create_links: |
|
316 |
ifeq ($(PLATFORM), solaris) |
|
317 |
@if [ -d $(OUTPUTDIR32) -a -d $(OUTPUTDIR64) ] ; then \ |
|
318 |
dirlist=`($(CD) $(OUTPUTDIR64); $(FIND) . -name $(ARCH64))`; \ |
|
319 |
for sd in $$dirlist ; do \ |
|
320 |
pdir=`$(DIRNAME) $$sd`; \ |
|
321 |
if [ -d $(OUTPUTDIR32)/$$pdir ] ; then \ |
|
322 |
echo "Creating link for $$sd"; \ |
|
323 |
(cd $(OUTPUTDIR32)/$$pdir; $(RM) $(ARCH64); \ |
|
324 |
$(LN) -s $(OUTPUTDIR64)/$$sd ); \ |
|
325 |
fi; \ |
|
326 |
done; \ |
|
327 |
else \ |
|
328 |
$(ECHO) "Build both 32 and 64 bit versions first"; \ |
|
329 |
fi |
|
330 |
else |
|
331 |
$(ECHO) "Rule $@ does not apply on $(PLATFORM)-$(ARCH)" |
|
332 |
endif |
|
333 |
||
334 |
# |
|
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
335 |
# Test rule |
2 | 336 |
# |
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
337 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
338 |
.NOTPARALLEL: test_run |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
339 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
340 |
test: |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
341 |
$(MAKE) test_run |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
342 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
343 |
test_run: test_clean test_start test_summary |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
344 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
345 |
test_start: |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
346 |
@$(ECHO) "Tests started at `$(DATE)`" |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
347 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
348 |
test_clean: |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
349 |
$(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt |
2 | 350 |
|
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
351 |
test_summary: $(OUTPUTDIR)/test_failures.txt |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
352 |
@$(ECHO) "#################################################" |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
353 |
@$(ECHO) "Tests completed at `$(DATE)`" |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
354 |
@( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
355 |
|| $(ECHO) "No TEST STATS seen in log" ) |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
356 |
@$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt" |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
357 |
@$(ECHO) "#################################################" |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
358 |
@if [ -s $< ] ; then \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
359 |
$(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
360 |
$(CAT) $<; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
361 |
exit 1; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
362 |
else \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
363 |
$(ECHO) "Success! No failures detected"; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
364 |
fi |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
365 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
366 |
# Get failure list from log |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
367 |
$(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
368 |
@$(RM) $@ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
369 |
@( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) | $(NAWK) 'length>0' > $@ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
370 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
371 |
# Get log file of all tests run |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
372 |
JDK_TO_TEST := $(shell \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
373 |
if [ -d "$(ABS_OUTPUTDIR)/j2sdk-image" ] ; then \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
374 |
$(ECHO) "$(ABS_OUTPUTDIR)/j2sdk-image"; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
375 |
elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
376 |
$(ECHO) "$(ABS_OUTPUTDIR)"; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
377 |
elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
378 |
$(ECHO) "$(PRODUCT_HOME)"; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
379 |
fi \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
380 |
) |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
381 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
382 |
TEST_TARGETS=jdk_all |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
383 |
$(OUTPUTDIR)/test_log.txt: |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
384 |
$(RM) $@ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
385 |
( $(CD) ../test && \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
386 |
$(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) $(TEST_TARGETS) \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
387 |
) | tee $@ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
388 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
389 |
# |
2 | 390 |
# JPRT rules |
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
391 |
# |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
392 |
|
2 | 393 |
include jprt.gmk |
394 |
||
395 |
# |
|
396 |
# Phonies to avoid accidents. |
|
397 |
# |
|
398 |
.PHONY: all build clean clobber optimized debug fastdebug create_links \ |
|
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
399 |
import import_product import_fastdebug import_debug \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
400 |
test test_run test_start test_clean test_summary |