1 | #
|
---|
2 | # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
|
---|
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
|
---|
7 | # published by the Free Software Foundation. Oracle designates this
|
---|
8 | # particular file as subject to the "Classpath" exception as provided
|
---|
9 | # by Oracle in the LICENSE file that accompanied this code.
|
---|
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 | #
|
---|
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.
|
---|
24 | #
|
---|
25 |
|
---|
26 | BUILD_PARENT_DIRECTORY=.
|
---|
27 |
|
---|
28 | ifndef TOPDIR
|
---|
29 | TOPDIR:=.
|
---|
30 | endif
|
---|
31 |
|
---|
32 | ifndef JDK_TOPDIR
|
---|
33 | JDK_TOPDIR=$(TOPDIR)/jdk
|
---|
34 | endif
|
---|
35 | ifndef JDK_MAKE_SHARED_DIR
|
---|
36 | JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared
|
---|
37 | endif
|
---|
38 |
|
---|
39 | # For start and finish echo lines
|
---|
40 | TITLE_TEXT = Control $(PLATFORM) $(ARCH) $(RELEASE)
|
---|
41 | DATE_STAMP = `$(DATE) '+%y-%m-%d %H:%M'`
|
---|
42 | START_ECHO = echo "$(TITLE_TEXT) $@ build started: $(DATE_STAMP)"
|
---|
43 | FINISH_ECHO = echo "$(TITLE_TEXT) $@ build finished: $(DATE_STAMP)"
|
---|
44 |
|
---|
45 | default: all
|
---|
46 |
|
---|
47 | include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk
|
---|
48 | include ./make/Defs-internal.gmk
|
---|
49 | include ./make/sanity-rules.gmk
|
---|
50 | include ./make/hotspot-rules.gmk
|
---|
51 | include ./make/langtools-rules.gmk
|
---|
52 | include ./make/corba-rules.gmk
|
---|
53 | include ./make/jaxp-rules.gmk
|
---|
54 | include ./make/jaxws-rules.gmk
|
---|
55 | include ./make/jdk-rules.gmk
|
---|
56 |
|
---|
57 | # What "all" means
|
---|
58 | all::
|
---|
59 | @$(START_ECHO)
|
---|
60 |
|
---|
61 | all:: sanity
|
---|
62 |
|
---|
63 | ifeq ($(SKIP_FASTDEBUG_BUILD), false)
|
---|
64 | all:: fastdebug_build
|
---|
65 | endif
|
---|
66 |
|
---|
67 | ifeq ($(SKIP_DEBUG_BUILD), false)
|
---|
68 | all:: debug_build
|
---|
69 | endif
|
---|
70 |
|
---|
71 | all:: all_product_build
|
---|
72 |
|
---|
73 | all::
|
---|
74 | @$(FINISH_ECHO)
|
---|
75 |
|
---|
76 | # Everything for a full product build
|
---|
77 | all_product_build::
|
---|
78 | @$(START_ECHO)
|
---|
79 |
|
---|
80 | ifeq ($(SKIP_PRODUCT_BUILD), false)
|
---|
81 |
|
---|
82 | all_product_build:: product_build
|
---|
83 |
|
---|
84 | ifneq ($(SKIP_COMPARE_IMAGES), true)
|
---|
85 | all_product_build:: compare-image
|
---|
86 | endif
|
---|
87 |
|
---|
88 | endif
|
---|
89 |
|
---|
90 | all_product_build::
|
---|
91 | @$(FINISH_ECHO)
|
---|
92 |
|
---|
93 | # Generis build of basic repo series
|
---|
94 | generic_build_repo_series::
|
---|
95 | $(MKDIR) -p $(OUTPUTDIR)
|
---|
96 | $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
|
---|
97 |
|
---|
98 | ifeq ($(BUILD_LANGTOOLS), true)
|
---|
99 | generic_build_repo_series:: langtools
|
---|
100 | clobber:: langtools-clobber
|
---|
101 | endif
|
---|
102 |
|
---|
103 | ifeq ($(BUILD_CORBA), true)
|
---|
104 | generic_build_repo_series:: corba
|
---|
105 | clobber:: corba-clobber
|
---|
106 | endif
|
---|
107 |
|
---|
108 | ifeq ($(BUILD_JAXP), true)
|
---|
109 | generic_build_repo_series:: jaxp
|
---|
110 | clobber:: jaxp-clobber
|
---|
111 | endif
|
---|
112 |
|
---|
113 | ifeq ($(BUILD_JAXWS), true)
|
---|
114 | generic_build_repo_series:: jaxws
|
---|
115 | clobber:: jaxws-clobber
|
---|
116 | endif
|
---|
117 |
|
---|
118 | ifeq ($(BUILD_HOTSPOT), true)
|
---|
119 | generic_build_repo_series:: $(HOTSPOT)
|
---|
120 | clobber:: hotspot-clobber
|
---|
121 | endif
|
---|
122 |
|
---|
123 | ifeq ($(BUILD_JDK), true)
|
---|
124 | generic_build_repo_series:: $(JDK_JAVA_EXE)
|
---|
125 | clobber:: jdk-clobber
|
---|
126 | endif
|
---|
127 |
|
---|
128 | # The debug build, fastdebug or debug. Needs special handling.
|
---|
129 | #
|
---|
130 | # DEBUG_NAME is fastdebug or debug
|
---|
131 | # ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
|
---|
132 | #
|
---|
133 | # NOTE: On windows, do not use $(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME).
|
---|
134 | # Due to the use of short paths in $(ABS_OUTPUTDIR), this may
|
---|
135 | # not be the same location.
|
---|
136 | #
|
---|
137 |
|
---|
138 | # Location of fresh bootdir output
|
---|
139 | ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
|
---|
140 | FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image
|
---|
141 | FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME)/j2sdk-image
|
---|
142 |
|
---|
143 | create_fresh_product_bootdir: FRC
|
---|
144 | @$(START_ECHO)
|
---|
145 | $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
|
---|
146 | GENERATE_DOCS=false \
|
---|
147 | BOOT_CYCLE_SETTINGS= \
|
---|
148 | build_product_image
|
---|
149 | @$(FINISH_ECHO)
|
---|
150 |
|
---|
151 | create_fresh_debug_bootdir: FRC
|
---|
152 | @$(START_ECHO)
|
---|
153 | $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
|
---|
154 | GENERATE_DOCS=false \
|
---|
155 | BOOT_CYCLE_DEBUG_SETTINGS= \
|
---|
156 | build_debug_image
|
---|
157 | @$(FINISH_ECHO)
|
---|
158 |
|
---|
159 | create_fresh_fastdebug_bootdir: FRC
|
---|
160 | @$(START_ECHO)
|
---|
161 | $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
|
---|
162 | GENERATE_DOCS=false \
|
---|
163 | BOOT_CYCLE_DEBUG_SETTINGS= \
|
---|
164 | build_fastdebug_image
|
---|
165 | @$(FINISH_ECHO)
|
---|
166 |
|
---|
167 | # Create boot image?
|
---|
168 | ifeq ($(SKIP_BOOT_CYCLE),false)
|
---|
169 | ifneq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
|
---|
170 | DO_BOOT_CYCLE=true
|
---|
171 | endif
|
---|
172 | endif
|
---|
173 |
|
---|
174 | ifeq ($(DO_BOOT_CYCLE),true)
|
---|
175 |
|
---|
176 | # Create the bootdir to use in the build
|
---|
177 | product_build:: create_fresh_product_bootdir
|
---|
178 | debug_build:: create_fresh_debug_bootdir
|
---|
179 | fastdebug_build:: create_fresh_fastdebug_bootdir
|
---|
180 |
|
---|
181 | # Define variables to be used now for the boot jdk
|
---|
182 | BOOT_CYCLE_SETTINGS= \
|
---|
183 | ALT_BOOTDIR=$(FRESH_BOOTDIR) \
|
---|
184 | ALT_JDK_IMPORT_PATH=$(FRESH_BOOTDIR)
|
---|
185 | BOOT_CYCLE_DEBUG_SETTINGS= \
|
---|
186 | ALT_BOOTDIR=$(FRESH_DEBUG_BOOTDIR) \
|
---|
187 | ALT_JDK_IMPORT_PATH=$(FRESH_DEBUG_BOOTDIR)
|
---|
188 |
|
---|
189 | else
|
---|
190 |
|
---|
191 | # Use the supplied ALT_BOOTDIR as the boot
|
---|
192 | BOOT_CYCLE_SETTINGS=
|
---|
193 | BOOT_CYCLE_DEBUG_SETTINGS=
|
---|
194 |
|
---|
195 | endif
|
---|
196 |
|
---|
197 | build_product_image:
|
---|
198 | @$(START_ECHO)
|
---|
199 | $(MAKE) \
|
---|
200 | SKIP_FASTDEBUG_BUILD=true \
|
---|
201 | SKIP_DEBUG_BUILD=true \
|
---|
202 | $(BOOT_CYCLE_SETTINGS) \
|
---|
203 | generic_build_repo_series
|
---|
204 | @$(FINISH_ECHO)
|
---|
205 |
|
---|
206 | # NOTE: On windows, do not use $(ABS_OUTPUTDIR)-$(DEBUG_NAME).
|
---|
207 | # Due to the use of short paths in $(ABS_OUTPUTDIR), this may
|
---|
208 | # not be the same location.
|
---|
209 |
|
---|
210 | generic_debug_build:
|
---|
211 | @$(START_ECHO)
|
---|
212 | $(MAKE) \
|
---|
213 | ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME) \
|
---|
214 | DEBUG_NAME=$(DEBUG_NAME) \
|
---|
215 | GENERATE_DOCS=false \
|
---|
216 | $(BOOT_CYCLE_DEBUG_SETTINGS) \
|
---|
217 | generic_build_repo_series
|
---|
218 | @$(FINISH_ECHO)
|
---|
219 |
|
---|
220 | build_debug_image:
|
---|
221 | $(MAKE) DEBUG_NAME=debug generic_debug_build
|
---|
222 |
|
---|
223 | build_fastdebug_image:
|
---|
224 | $(MAKE) DEBUG_NAME=fastdebug generic_debug_build
|
---|
225 |
|
---|
226 | # Build final image
|
---|
227 | product_build:: build_product_image
|
---|
228 | debug_build:: build_debug_image
|
---|
229 | fastdebug_build:: build_fastdebug_image
|
---|
230 |
|
---|
231 | clobber::
|
---|
232 | $(RM) -r $(OUTPUTDIR)/*
|
---|
233 | $(RM) -r $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-debug/*
|
---|
234 | $(RM) -r $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-fastdebug/*
|
---|
235 | -($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE))
|
---|
236 |
|
---|
237 | clean: clobber
|
---|
238 |
|
---|
239 | #
|
---|
240 | # Dev builds
|
---|
241 | #
|
---|
242 |
|
---|
243 | dev : dev-build
|
---|
244 |
|
---|
245 | dev-build:
|
---|
246 | $(MAKE) DEV_ONLY=true all
|
---|
247 | dev-sanity:
|
---|
248 | $(MAKE) DEV_ONLY=true sanity
|
---|
249 | dev-clobber:
|
---|
250 | $(MAKE) DEV_ONLY=true clobber
|
---|
251 |
|
---|
252 | #
|
---|
253 | # Quick jdk verification build
|
---|
254 | #
|
---|
255 | jdk_only:
|
---|
256 | $(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all
|
---|
257 |
|
---|
258 |
|
---|
259 | #
|
---|
260 | # Quick jdk verification fastdebug build
|
---|
261 | #
|
---|
262 | jdk_fastdebug_only:
|
---|
263 | $(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false generic_debug_build
|
---|
264 |
|
---|
265 | #
|
---|
266 | # Product build (skip debug builds)
|
---|
267 | #
|
---|
268 | product_only:
|
---|
269 | $(MAKE) SKIP_FASTDEBUG_BUILD=true all
|
---|
270 |
|
---|
271 | #
|
---|
272 | # Check target
|
---|
273 | #
|
---|
274 |
|
---|
275 | check: variable_check
|
---|
276 |
|
---|
277 | #
|
---|
278 | # Help target
|
---|
279 | #
|
---|
280 | help: intro_help target_help variable_help notes_help examples_help
|
---|
281 |
|
---|
282 | # Intro help message
|
---|
283 | intro_help:
|
---|
284 | @$(ECHO) "\
|
---|
285 | Makefile for the JDK builds (all the JDK). \n\
|
---|
286 | "
|
---|
287 |
|
---|
288 | # Target help
|
---|
289 | target_help:
|
---|
290 | @$(ECHO) "\
|
---|
291 | --- Common Targets --- \n\
|
---|
292 | all -- build the core JDK (default target) \n\
|
---|
293 | help -- Print out help information \n\
|
---|
294 | check -- Check make variable values for correctness \n\
|
---|
295 | sanity -- Perform detailed sanity checks on system and settings \n\
|
---|
296 | fastdebug_build -- build the core JDK in 'fastdebug' mode (-g -O) \n\
|
---|
297 | debug_build -- build the core JDK in 'debug' mode (-g) \n\
|
---|
298 | clean -- remove all built and imported files \n\
|
---|
299 | clobber -- same as clean \n\
|
---|
300 | "
|
---|
301 |
|
---|
302 | # Variable help (only common ones used by this Makefile)
|
---|
303 | variable_help: variable_help_intro variable_list variable_help_end
|
---|
304 | variable_help_intro:
|
---|
305 | @$(ECHO) "--- Common Variables ---"
|
---|
306 | variable_help_end:
|
---|
307 | @$(ECHO) " "
|
---|
308 |
|
---|
309 | # One line descriptions for the variables
|
---|
310 | OUTPUTDIR.desc = Output directory
|
---|
311 | PARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count
|
---|
312 | SLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
|
---|
313 | BOOTDIR.desc = JDK used to boot the build
|
---|
314 | JDK_IMPORT_PATH.desc = JDK used to import components of the build
|
---|
315 | COMPILER_PATH.desc = Compiler install directory
|
---|
316 | CACERTS_FILE.desc = Location of certificates file
|
---|
317 | DEVTOOLS_PATH.desc = Directory containing zip and gnumake
|
---|
318 | CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
|
---|
319 | DXSDK_PATH.desc = Root directory of DirectX SDK
|
---|
320 | MSDEVTOOLS_PATH.desc = Root directory of VC++ tools (e.g. rc.exe)
|
---|
321 | MSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll
|
---|
322 | ODINSDK_PATH.desc = Root directory of Odin32 SDK (OS/2)
|
---|
323 |
|
---|
324 | # Make variables to print out (description and value)
|
---|
325 | VARIABLE_PRINTVAL_LIST += \
|
---|
326 | OUTPUTDIR \
|
---|
327 | PARALLEL_COMPILE_JOBS \
|
---|
328 | SLASH_JAVA \
|
---|
329 | BOOTDIR \
|
---|
330 | JDK_IMPORT_PATH \
|
---|
331 | COMPILER_PATH \
|
---|
332 | CACERTS_FILE \
|
---|
333 | DEVTOOLS_PATH
|
---|
334 |
|
---|
335 | # Make variables that should refer to directories that exist
|
---|
336 | VARIABLE_CHECKDIR_LIST += \
|
---|
337 | SLASH_JAVA \
|
---|
338 | BOOTDIR \
|
---|
339 | JDK_IMPORT_PATH \
|
---|
340 | COMPILER_PATH \
|
---|
341 | DEVTOOLS_PATH
|
---|
342 |
|
---|
343 | # Make variables that should refer to files that exist
|
---|
344 | VARIABLE_CHECKFIL_LIST += \
|
---|
345 | CACERTS_FILE
|
---|
346 |
|
---|
347 | # Some are windows specific
|
---|
348 | ifeq ($(PLATFORM), windows)
|
---|
349 |
|
---|
350 | VARIABLE_PRINTVAL_LIST += \
|
---|
351 | DXSDK_PATH \
|
---|
352 | MSDEVTOOLS_PATH \
|
---|
353 | MSVCRT_DLL_PATH
|
---|
354 |
|
---|
355 | VARIABLE_CHECKDIR_LIST += \
|
---|
356 | DXSDK_PATH \
|
---|
357 | MSDEVTOOLS_PATH \
|
---|
358 | MSVCRT_DLL_PATH
|
---|
359 |
|
---|
360 | endif
|
---|
361 |
|
---|
362 | # Some are OS/2 specific
|
---|
363 | ifeq ($(PLATFORM), os2)
|
---|
364 |
|
---|
365 | VARIABLE_PRINTVAL_LIST += \
|
---|
366 | ODINSDK_PATH
|
---|
367 |
|
---|
368 | VARIABLE_CHECKDIR_LIST += \
|
---|
369 | ODINSDK_PATH
|
---|
370 |
|
---|
371 | endif
|
---|
372 |
|
---|
373 | # For pattern rules below, so all are treated the same
|
---|
374 | DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
|
---|
375 | DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
|
---|
376 | DO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil)
|
---|
377 |
|
---|
378 | # Complete variable check
|
---|
379 | variable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST)
|
---|
380 | variable_list: $(DO_PRINTVAL_LIST) variable_check
|
---|
381 |
|
---|
382 | # Pattern rule for printing out a variable
|
---|
383 | %.printval:
|
---|
384 | @$(ECHO) " ALT_$* - $($*.desc)"
|
---|
385 | @$(ECHO) " \t $*=$($*)"
|
---|
386 |
|
---|
387 | # Pattern rule for checking to see if a variable with a directory exists
|
---|
388 | %.checkdir:
|
---|
389 | @if [ ! -d $($*) ] ; then \
|
---|
390 | $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
|
---|
391 | fi
|
---|
392 |
|
---|
393 | # Pattern rule for checking to see if a variable with a file exists
|
---|
394 | %.checkfil:
|
---|
395 | @if [ ! -f $($*) ] ; then \
|
---|
396 | $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
|
---|
397 | fi
|
---|
398 |
|
---|
399 | # Misc notes on help
|
---|
400 | notes_help:
|
---|
401 | @$(ECHO) "\
|
---|
402 | --- Notes --- \n\
|
---|
403 | - All builds use same output directory unless overridden with \n\
|
---|
404 | \t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\
|
---|
405 | \t to use the clean target first. \n\
|
---|
406 | - JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\
|
---|
407 | \t builds or previous release JDK builds will work. \n\
|
---|
408 | - The fastest builds have been when the sources and the BOOTDIR are on \n\
|
---|
409 | \t local disk. \n\
|
---|
410 | "
|
---|
411 |
|
---|
412 | examples_help:
|
---|
413 | @$(ECHO) "\
|
---|
414 | --- Examples --- \n\
|
---|
415 | $(MAKE) fastdebug_build \n\
|
---|
416 | $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
|
---|
417 | $(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug_build \n\
|
---|
418 | $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
|
---|
419 | $(MAKE) ALT_BOOTDIR=/opt/java/jdk1.5.0 \n\
|
---|
420 | $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.6.0 \n\
|
---|
421 | "
|
---|
422 |
|
---|
423 | ################################################################
|
---|
424 | # Cycle build. Build the jdk, use it to build the jdk again.
|
---|
425 | ################################################################
|
---|
426 |
|
---|
427 | ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
|
---|
428 |
|
---|
429 | boot_cycle:
|
---|
430 | $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build
|
---|
431 | $(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build
|
---|
432 |
|
---|
433 | ################################################################
|
---|
434 | # rule to test
|
---|
435 | ################################################################
|
---|
436 |
|
---|
437 | .NOTPARALLEL: test
|
---|
438 |
|
---|
439 | test: test_clean test_start test_summary
|
---|
440 |
|
---|
441 | test_start:
|
---|
442 | @$(ECHO) "Tests started at `$(DATE)`"
|
---|
443 |
|
---|
444 | test_clean:
|
---|
445 | $(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt
|
---|
446 |
|
---|
447 | test_summary: $(OUTPUTDIR)/test_failures.txt
|
---|
448 | @$(ECHO) "#################################################"
|
---|
449 | @$(ECHO) "Tests completed at `$(DATE)`"
|
---|
450 | @( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \
|
---|
451 | || $(ECHO) "No TEST STATS seen in log" )
|
---|
452 | @$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt"
|
---|
453 | @$(ECHO) "#################################################"
|
---|
454 | @if [ -s $< ] ; then \
|
---|
455 | $(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \
|
---|
456 | $(CAT) $<; \
|
---|
457 | exit 1; \
|
---|
458 | else \
|
---|
459 | $(ECHO) "Success! No failures detected"; \
|
---|
460 | fi
|
---|
461 |
|
---|
462 | # Get failure list from log
|
---|
463 | $(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt
|
---|
464 | @$(RM) $@
|
---|
465 | @( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) > $@
|
---|
466 |
|
---|
467 | # Get log file of all tests run
|
---|
468 | JDK_TO_TEST := $(shell \
|
---|
469 | if [ -d "$(ABS_OUTPUTDIR)/j2sdk-image" ] ; then \
|
---|
470 | $(ECHO) "$(ABS_OUTPUTDIR)/j2sdk-image"; \
|
---|
471 | elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then \
|
---|
472 | $(ECHO) "$(ABS_OUTPUTDIR)"; \
|
---|
473 | elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then \
|
---|
474 | $(ECHO) "$(PRODUCT_HOME)"; \
|
---|
475 | fi \
|
---|
476 | )
|
---|
477 | $(OUTPUTDIR)/test_log.txt:
|
---|
478 | $(RM) $@
|
---|
479 | ( $(CD) test && \
|
---|
480 | $(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) \
|
---|
481 | ) | tee $@
|
---|
482 |
|
---|
483 | ################################################################
|
---|
484 | # JPRT rule to build
|
---|
485 | ################################################################
|
---|
486 |
|
---|
487 | include ./make/jprt.gmk
|
---|
488 |
|
---|
489 | ################################################################
|
---|
490 | # PHONY
|
---|
491 | ################################################################
|
---|
492 |
|
---|
493 | .PHONY: all test test_start test_summary test_clean \
|
---|
494 | generic_build_repo_series \
|
---|
495 | what clobber insane \
|
---|
496 | dev dev-build dev-sanity dev-clobber \
|
---|
497 | product_build \
|
---|
498 | fastdebug_build \
|
---|
499 | debug_build \
|
---|
500 | build_product_image \
|
---|
501 | build_debug_image \
|
---|
502 | build_fastdebug_image \
|
---|
503 | create_fresh_product_bootdir \
|
---|
504 | create_fresh_debug_bootdir \
|
---|
505 | create_fresh_fastdebug_bootdir \
|
---|
506 | generic_debug_build
|
---|
507 |
|
---|
508 | # Force target
|
---|
509 | FRC:
|
---|
510 |
|
---|