blob: c8598161cec67a6a310b1d58f5430736b0fca929 [file] [log] [blame]
J. Duke686d76f2007-12-01 00:00:00 +00001#
Kelly O'Hair76cc3912011-04-06 22:14:00 -07002# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
J. Duke686d76f2007-12-01 00:00:00 +00003# 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
Kelly O'Hair136614e2010-05-25 15:51:26 -07007# published by the Free Software Foundation. Oracle designates this
J. Duke686d76f2007-12-01 00:00:00 +00008# particular file as subject to the "Classpath" exception as provided
Kelly O'Hair136614e2010-05-25 15:51:26 -07009# by Oracle in the LICENSE file that accompanied this code.
J. Duke686d76f2007-12-01 00:00:00 +000010#
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#
Kelly O'Hair136614e2010-05-25 15:51:26 -070021# 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.
J. Duke686d76f2007-12-01 00:00:00 +000024#
25
Kelly O'Hair6377bd62008-03-09 15:47:58 -070026BUILD_PARENT_DIRECTORY=.
27
J. Duke686d76f2007-12-01 00:00:00 +000028ifndef TOPDIR
Kelly O'Hairfb56a9a2008-03-25 14:38:56 -070029 TOPDIR:=.
J. Duke686d76f2007-12-01 00:00:00 +000030endif
31
J. Duke686d76f2007-12-01 00:00:00 +000032ifndef JDK_TOPDIR
33 JDK_TOPDIR=$(TOPDIR)/jdk
34endif
35ifndef JDK_MAKE_SHARED_DIR
36 JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared
37endif
38
Kelly O'Hairfa892cf2008-08-06 14:57:13 -070039default: all
40
J. Duke686d76f2007-12-01 00:00:00 +000041include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk
J. Duke686d76f2007-12-01 00:00:00 +000042include ./make/Defs-internal.gmk
J. Duke686d76f2007-12-01 00:00:00 +000043include ./make/sanity-rules.gmk
J. Duke686d76f2007-12-01 00:00:00 +000044include ./make/hotspot-rules.gmk
45include ./make/langtools-rules.gmk
46include ./make/corba-rules.gmk
47include ./make/jaxp-rules.gmk
48include ./make/jaxws-rules.gmk
49include ./make/jdk-rules.gmk
50include ./make/install-rules.gmk
51include ./make/sponsors-rules.gmk
52include ./make/deploy-rules.gmk
53
Kelly O'Hair88990fd2011-01-05 17:24:58 -080054all:: sanity
Kelly O'Hairfa892cf2008-08-06 14:57:13 -070055
56ifeq ($(SKIP_FASTDEBUG_BUILD), false)
57 all:: fastdebug_build
58endif
59
60ifeq ($(SKIP_DEBUG_BUILD), false)
61 all:: debug_build
62endif
63
Kelly O'Hair179908e2008-08-17 09:56:25 -070064all:: all_product_build
65
Kelly O'Hairc64ee492011-03-09 16:26:38 -080066all_product_build::
67
Kelly O'Hairfa892cf2008-08-06 14:57:13 -070068# Everything for a full product build
Kelly O'Hairfa892cf2008-08-06 14:57:13 -070069ifeq ($(SKIP_PRODUCT_BUILD), false)
Fredrik Öhrström4eb68762011-02-28 10:56:10 +010070
Kelly O'Hairfa892cf2008-08-06 14:57:13 -070071 all_product_build:: product_build
72
73 ifeq ($(BUILD_INSTALL), true)
74 all_product_build:: $(INSTALL)
75 clobber:: install-clobber
76 endif
Fredrik Öhrström4eb68762011-02-28 10:56:10 +010077
Kelly O'Hairfa892cf2008-08-06 14:57:13 -070078 ifeq ($(BUILD_SPONSORS), true)
79 all_product_build:: $(SPONSORS)
80 clobber:: sponsors-clobber
81 endif
Fredrik Öhrström4eb68762011-02-28 10:56:10 +010082
Kelly O'Hairfa892cf2008-08-06 14:57:13 -070083 ifneq ($(SKIP_COMPARE_IMAGES), true)
84 all_product_build:: compare-image
85 endif
86
87endif
88
Fredrik Öhrström4eb68762011-02-28 10:56:10 +010089define StartTimer
90 $(MKDIR) -p $(BUILDTIMESDIR)
91 $(RM) $(BUILDTIMESDIR)/build_time_*
92 $(call RecordStartTime,TOTAL)
93endef
94
95define StopTimer
96 $(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,TOTAL) && $(call ReportBuildTimes,$1),)
97endef
Kelly O'Hairfa892cf2008-08-06 14:57:13 -070098
Kelly O'Hair0eca63f2010-06-21 11:00:15 -070099# Generic build of basic repo series
Kelly O'Hair4231fbb2011-04-26 16:30:00 -0700100generic_build_repo_series:: $(SOURCE_TIPS)
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700101 $(MKDIR) -p $(OUTPUTDIR)
J. Duke686d76f2007-12-01 00:00:00 +0000102 $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
Fredrik Öhrström4eb68762011-02-28 10:56:10 +0100103 @$(call StartTimer)
J. Duke686d76f2007-12-01 00:00:00 +0000104
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700105ifeq ($(BUILD_LANGTOOLS), true)
106 generic_build_repo_series:: langtools
107 clobber:: langtools-clobber
108endif
109
110ifeq ($(BUILD_CORBA), true)
111 generic_build_repo_series:: corba
112 clobber:: corba-clobber
113endif
114
115ifeq ($(BUILD_JAXP), true)
116 generic_build_repo_series:: jaxp
117 clobber:: jaxp-clobber
118endif
119
120ifeq ($(BUILD_JAXWS), true)
121 generic_build_repo_series:: jaxws
122 clobber:: jaxws-clobber
123endif
124
125ifeq ($(BUILD_HOTSPOT), true)
126 generic_build_repo_series:: $(HOTSPOT)
127 clobber:: hotspot-clobber
128endif
129
130ifeq ($(BUILD_JDK), true)
131 generic_build_repo_series:: $(JDK_JAVA_EXE)
132 clobber:: jdk-clobber
133endif
134
135ifeq ($(BUILD_DEPLOY), true)
136 generic_build_repo_series:: $(DEPLOY)
137 clobber:: deploy-clobber
138endif
139
Fredrik Öhrström4eb68762011-02-28 10:56:10 +0100140generic_build_repo_series::
141 @$(call StopTimer,$(if $(DEBUG_NAME),$(DEBUG_NAME)_build,all_product_build))
142
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700143# The debug build, fastdebug or debug. Needs special handling.
144# Note that debug builds do NOT do INSTALL steps, but must be done
145# after the product build and before the INSTALL step of the product build.
146#
147# DEBUG_NAME is fastdebug or debug
148# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
149# The resulting j2sdk-image is used by the install makefiles to create a
150# debug install bundle jdk-*-debug-** bundle (tar or zip)
151# which will install in the debug or fastdebug subdirectory of the
152# normal product install area.
153# The install process needs to know what the DEBUG_NAME is, so
154# look for INSTALL_DEBUG_NAME in the install rules.
155#
Kelly O'Hair0eca63f2010-06-21 11:00:15 -0700156# NOTE: On windows, do not use $(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME).
157# Due to the use of short paths in $(ABS_OUTPUTDIR), this may
158# not be the same location.
159#
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700160
161# Location of fresh bootdir output
162ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
163FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image
Kelly O'Hair0eca63f2010-06-21 11:00:15 -0700164FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME)/j2sdk-image
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700165
166create_fresh_product_bootdir: FRC
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700167 $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
Kelly O'Haird0c9ba32009-11-18 16:41:09 -0800168 GENERATE_DOCS=false \
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700169 BOOT_CYCLE_SETTINGS= \
170 build_product_image
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700171
172create_fresh_debug_bootdir: FRC
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700173 $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
Kelly O'Haird0c9ba32009-11-18 16:41:09 -0800174 GENERATE_DOCS=false \
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700175 BOOT_CYCLE_DEBUG_SETTINGS= \
176 build_debug_image
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700177
178create_fresh_fastdebug_bootdir: FRC
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700179 $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
Kelly O'Haird0c9ba32009-11-18 16:41:09 -0800180 GENERATE_DOCS=false \
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700181 BOOT_CYCLE_DEBUG_SETTINGS= \
182 build_fastdebug_image
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700183
184# Create boot image?
185ifeq ($(SKIP_BOOT_CYCLE),false)
186 ifneq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
187 DO_BOOT_CYCLE=true
188 endif
189endif
190
Fredrik Öhrström4eb68762011-02-28 10:56:10 +0100191
192
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700193ifeq ($(DO_BOOT_CYCLE),true)
194
195 # Create the bootdir to use in the build
196 product_build:: create_fresh_product_bootdir
197 debug_build:: create_fresh_debug_bootdir
198 fastdebug_build:: create_fresh_fastdebug_bootdir
199
200 # Define variables to be used now for the boot jdk
201 BOOT_CYCLE_SETTINGS= \
202 ALT_BOOTDIR=$(FRESH_BOOTDIR) \
203 ALT_JDK_IMPORT_PATH=$(FRESH_BOOTDIR)
204 BOOT_CYCLE_DEBUG_SETTINGS= \
205 ALT_BOOTDIR=$(FRESH_DEBUG_BOOTDIR) \
206 ALT_JDK_IMPORT_PATH=$(FRESH_DEBUG_BOOTDIR)
207
208else
209
210 # Use the supplied ALT_BOOTDIR as the boot
211 BOOT_CYCLE_SETTINGS=
212 BOOT_CYCLE_DEBUG_SETTINGS=
213
214endif
215
216build_product_image:
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700217 $(MAKE) \
218 SKIP_FASTDEBUG_BUILD=true \
219 SKIP_DEBUG_BUILD=true \
220 $(BOOT_CYCLE_SETTINGS) \
221 generic_build_repo_series
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700222
Kelly O'Hair0eca63f2010-06-21 11:00:15 -0700223# NOTE: On windows, do not use $(ABS_OUTPUTDIR)-$(DEBUG_NAME).
224# Due to the use of short paths in $(ABS_OUTPUTDIR), this may
225# not be the same location.
226
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700227generic_debug_build:
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700228 $(MAKE) \
Kelly O'Hair0eca63f2010-06-21 11:00:15 -0700229 ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME) \
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700230 DEBUG_NAME=$(DEBUG_NAME) \
Kelly O'Haird0c9ba32009-11-18 16:41:09 -0800231 GENERATE_DOCS=false \
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700232 $(BOOT_CYCLE_DEBUG_SETTINGS) \
233 generic_build_repo_series
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700234
235build_debug_image:
236 $(MAKE) DEBUG_NAME=debug generic_debug_build
237
238build_fastdebug_image:
239 $(MAKE) DEBUG_NAME=fastdebug generic_debug_build
240
241# Build final image
242product_build:: build_product_image
243debug_build:: build_debug_image
244fastdebug_build:: build_fastdebug_image
245
Kelly O'Hair4231fbb2011-04-26 16:30:00 -0700246# The source tips are stored with the relative path to the repo.
247# This file will be used when constructing the jdk image.
248source_tips: $(SOURCE_TIPS)
249 $(CAT) $<
250$(SOURCE_TIPS): FRC
251 @$(prep-target)
252 @$(call GetSourceTips)
253
Fredrik Öhrström4eb68762011-02-28 10:56:10 +0100254clobber:: REPORT_BUILD_TIMES=
255clobber::
J. Duke686d76f2007-12-01 00:00:00 +0000256 $(RM) -r $(OUTPUTDIR)/*
Kelly O'Hair0eca63f2010-06-21 11:00:15 -0700257 $(RM) -r $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-debug/*
258 $(RM) -r $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-fastdebug/*
J. Duke686d76f2007-12-01 00:00:00 +0000259 -($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE))
260
261clean: clobber
262
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700263#
264# Dev builds
265#
266
267dev : dev-build
268
269dev-build:
270 $(MAKE) DEV_ONLY=true all
271dev-sanity:
272 $(MAKE) DEV_ONLY=true sanity
273dev-clobber:
274 $(MAKE) DEV_ONLY=true clobber
J. Duke686d76f2007-12-01 00:00:00 +0000275
276#
277# Quick jdk verification build
278#
279jdk_only:
280 $(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all
281
282
283#
284# Quick jdk verification fastdebug build
285#
286jdk_fastdebug_only:
287 $(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \
288 BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build
289
290#
291# Quick deploy verification fastdebug build
292#
293deploy_fastdebug_only:
294 $(MAKE) \
295 DEBUG_NAME=fastdebug \
296 BUILD_HOTSPOT=false \
297 BUILD_JDK=false \
298 BUILD_LANGTOOLS=false \
299 BUILD_CORBA=false \
300 BUILD_JAXP=false \
301 BUILD_JAXWS=false \
302 BUILD_INSTALL=false \
303 BUILD_SPONSORS=false \
304 generic_debug_build
305
306#
307# Product build (skip debug builds)
308#
309product_only:
310 $(MAKE) SKIP_FASTDEBUG_BUILD=true all
311
312#
313# Check target
314#
315
316check: variable_check
317
318#
319# Help target
320#
321help: intro_help target_help variable_help notes_help examples_help
322
323# Intro help message
324intro_help:
325 @$(ECHO) "\
326Makefile for the JDK builds (all the JDK). \n\
327"
328
329# Target help
330target_help:
331 @$(ECHO) "\
332--- Common Targets --- \n\
333all -- build the core JDK (default target) \n\
334help -- Print out help information \n\
335check -- Check make variable values for correctness \n\
336sanity -- Perform detailed sanity checks on system and settings \n\
337fastdebug_build -- build the core JDK in 'fastdebug' mode (-g -O) \n\
338debug_build -- build the core JDK in 'debug' mode (-g) \n\
339clean -- remove all built and imported files \n\
340clobber -- same as clean \n\
341"
342
343# Variable help (only common ones used by this Makefile)
344variable_help: variable_help_intro variable_list variable_help_end
345variable_help_intro:
346 @$(ECHO) "--- Common Variables ---"
347variable_help_end:
348 @$(ECHO) " "
349
350# One line descriptions for the variables
351OUTPUTDIR.desc = Output directory
352PARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count
353SLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
354BOOTDIR.desc = JDK used to boot the build
355JDK_IMPORT_PATH.desc = JDK used to import components of the build
356COMPILER_PATH.desc = Compiler install directory
357CACERTS_FILE.desc = Location of certificates file
358DEVTOOLS_PATH.desc = Directory containing zip and gnumake
359CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
360DXSDK_PATH.desc = Root directory of DirectX SDK
J. Duke686d76f2007-12-01 00:00:00 +0000361
362# Make variables to print out (description and value)
363VARIABLE_PRINTVAL_LIST += \
364 OUTPUTDIR \
365 PARALLEL_COMPILE_JOBS \
366 SLASH_JAVA \
367 BOOTDIR \
368 JDK_IMPORT_PATH \
369 COMPILER_PATH \
370 CACERTS_FILE \
371 DEVTOOLS_PATH
372
373# Make variables that should refer to directories that exist
374VARIABLE_CHECKDIR_LIST += \
375 SLASH_JAVA \
376 BOOTDIR \
377 JDK_IMPORT_PATH \
378 COMPILER_PATH \
379 DEVTOOLS_PATH
380
381# Make variables that should refer to files that exist
382VARIABLE_CHECKFIL_LIST += \
383 CACERTS_FILE
384
385# Some are windows specific
386ifeq ($(PLATFORM), windows)
387
388VARIABLE_PRINTVAL_LIST += \
Kelly O'Hair5ef33b62011-01-14 14:04:19 -0800389 DXSDK_PATH
J. Duke686d76f2007-12-01 00:00:00 +0000390
391VARIABLE_CHECKDIR_LIST += \
Kelly O'Hair5ef33b62011-01-14 14:04:19 -0800392 DXSDK_PATH
J. Duke686d76f2007-12-01 00:00:00 +0000393
394endif
395
396# For pattern rules below, so all are treated the same
397DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
398DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
399DO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil)
400
401# Complete variable check
402variable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST)
403variable_list: $(DO_PRINTVAL_LIST) variable_check
404
405# Pattern rule for printing out a variable
406%.printval:
407 @$(ECHO) " ALT_$* - $($*.desc)"
408 @$(ECHO) " \t $*=$($*)"
409
410# Pattern rule for checking to see if a variable with a directory exists
411%.checkdir:
412 @if [ ! -d $($*) ] ; then \
413 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
414 fi
415
416# Pattern rule for checking to see if a variable with a file exists
417%.checkfil:
418 @if [ ! -f $($*) ] ; then \
419 $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
420 fi
421
422# Misc notes on help
423notes_help:
424 @$(ECHO) "\
425--- Notes --- \n\
426- All builds use same output directory unless overridden with \n\
427 \t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\
428 \t to use the clean target first. \n\
429- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\
430 \t builds or previous release JDK builds will work. \n\
431- The fastest builds have been when the sources and the BOOTDIR are on \n\
432 \t local disk. \n\
433"
434
435examples_help:
436 @$(ECHO) "\
437--- Examples --- \n\
438 $(MAKE) fastdebug_build \n\
439 $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
440 $(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug_build \n\
441 $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
442 $(MAKE) ALT_BOOTDIR=/opt/java/jdk1.5.0 \n\
443 $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.6.0 \n\
444"
445
446################################################################
Kelly O'Haird77b0512010-12-23 18:41:57 -0800447# Source bundling
J. Duke686d76f2007-12-01 00:00:00 +0000448################################################################
449ifeq ($(BUNDLE_RULES_AVAILABLE), true)
450 include $(BUNDLE_RULES)
451endif
452
453################################################################
Kelly O'Hair0eca63f2010-06-21 11:00:15 -0700454# rule to test
455################################################################
456
Kelly O'Haire0c099c2010-09-24 14:03:33 -0700457.NOTPARALLEL: test_run
Kelly O'Hair0eca63f2010-06-21 11:00:15 -0700458
Kelly O'Haire0c099c2010-09-24 14:03:33 -0700459test:
460 $(MAKE) test_run
461
462test_run: test_clean test_start test_summary
Kelly O'Hair0eca63f2010-06-21 11:00:15 -0700463
464test_start:
465 @$(ECHO) "Tests started at `$(DATE)`"
466
467test_clean:
468 $(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt
469
470test_summary: $(OUTPUTDIR)/test_failures.txt
471 @$(ECHO) "#################################################"
472 @$(ECHO) "Tests completed at `$(DATE)`"
473 @( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \
474 || $(ECHO) "No TEST STATS seen in log" )
475 @$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt"
476 @$(ECHO) "#################################################"
477 @if [ -s $< ] ; then \
478 $(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \
479 $(CAT) $<; \
480 exit 1; \
481 else \
482 $(ECHO) "Success! No failures detected"; \
483 fi
484
485# Get failure list from log
486$(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt
487 @$(RM) $@
Kelly O'Haire0c099c2010-09-24 14:03:33 -0700488 @( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) | $(NAWK) 'length>0' > $@
Kelly O'Hair0eca63f2010-06-21 11:00:15 -0700489
490# Get log file of all tests run
491JDK_TO_TEST := $(shell \
492 if [ -d "$(ABS_OUTPUTDIR)/j2sdk-image" ] ; then \
493 $(ECHO) "$(ABS_OUTPUTDIR)/j2sdk-image"; \
494 elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then \
495 $(ECHO) "$(ABS_OUTPUTDIR)"; \
496 elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then \
497 $(ECHO) "$(PRODUCT_HOME)"; \
498 fi \
499)
Kelly O'Haire0c099c2010-09-24 14:03:33 -0700500TEST_TARGETS=all
Kelly O'Hair0eca63f2010-06-21 11:00:15 -0700501$(OUTPUTDIR)/test_log.txt:
502 $(RM) $@
Kelly O'Haire0c099c2010-09-24 14:03:33 -0700503 ( $(CD) test && \
504 $(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) $(TEST_TARGETS) \
Kelly O'Hair0eca63f2010-06-21 11:00:15 -0700505 ) | tee $@
506
507################################################################
J. Duke686d76f2007-12-01 00:00:00 +0000508# JPRT rule to build
509################################################################
510
511include ./make/jprt.gmk
512
513################################################################
514# PHONY
515################################################################
516
Kelly O'Haire0c099c2010-09-24 14:03:33 -0700517.PHONY: all test test_run test_start test_summary test_clean \
Kelly O'Hairfa892cf2008-08-06 14:57:13 -0700518 generic_build_repo_series \
519 what clobber insane \
520 dev dev-build dev-sanity dev-clobber \
521 product_build \
522 fastdebug_build \
523 debug_build \
524 build_product_image \
525 build_debug_image \
526 build_fastdebug_image \
527 create_fresh_product_bootdir \
528 create_fresh_debug_bootdir \
529 create_fresh_fastdebug_bootdir \
530 generic_debug_build
J. Duke686d76f2007-12-01 00:00:00 +0000531
Kelly O'Hair6377bd62008-03-09 15:47:58 -0700532# Force target
533FRC:
534