author | duke |
Wed, 05 Jul 2017 18:31:28 +0200 | |
changeset 14608 | 722307087f28 |
parent 13697 | 5262b00bc10c |
child 15064 | 049338f0fb4e |
permissions | -rw-r--r-- |
0 | 1 |
# |
13697 | 2 |
# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 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 |
|
5499 | 7 |
# published by the Free Software Foundation. Oracle designates this |
0 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5499 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
0 | 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 |
# |
|
5499 | 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. |
|
0 | 24 |
# |
25 |
||
13697 | 26 |
# If NEWBUILD is defined, use the new build-infra Makefiles and configure. |
27 |
# See NewMakefile.gmk for more information. |
|
28 |
||
29 |
ifeq ($(NEWBUILD),true) |
|
30 |
||
31 |
# The new top level Makefile |
|
32 |
include NewMakefile.gmk |
|
33 |
||
34 |
else # Original Makefile logic |
|
35 |
||
17
bb9f330cd95a
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
16
diff
changeset
|
36 |
BUILD_PARENT_DIRECTORY=. |
bb9f330cd95a
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
16
diff
changeset
|
37 |
|
9618 | 38 |
# Basename of any originally supplied ALT_OUTPUTDIR directory |
39 |
ifndef ORIG_OUTPUTDIR_BASENAME |
|
40 |
ifdef ALT_OUTPUTDIR |
|
41 |
ORIG_OUTPUTDIR_BASENAME := $(shell basename $(ALT_OUTPUTDIR)) |
|
42 |
else |
|
43 |
ORIG_OUTPUTDIR_BASENAME = $(PLATFORM)-$(ARCH) |
|
44 |
endif |
|
45 |
endif |
|
46 |
export ORIG_OUTPUTDIR_BASENAME |
|
47 |
||
48 |
# The three possible directories created for output (3 build flavors) |
|
49 |
OUTPUTDIR_BASENAME- = $(ORIG_OUTPUTDIR_BASENAME) |
|
50 |
OUTPUTDIR_BASENAME-debug = $(ORIG_OUTPUTDIR_BASENAME)-debug |
|
51 |
OUTPUTDIR_BASENAME-fastdebug = $(ORIG_OUTPUTDIR_BASENAME)-fastdebug |
|
52 |
||
53 |
# Relative path to a debug output area |
|
54 |
REL_JDK_OUTPUTDIR = ../$(OUTPUTDIR_BASENAME-$(DEBUG_NAME)) |
|
55 |
||
56 |
# The created jdk image directory |
|
57 |
JDK_IMAGE_DIRNAME = j2sdk-image |
|
58 |
JDK_IMAGE_DIR = $(OUTPUTDIR)/$(JDK_IMAGE_DIRNAME) |
|
59 |
ABS_JDK_IMAGE_DIR = $(ABS_OUTPUTDIR)/$(JDK_IMAGE_DIRNAME) |
|
60 |
||
61 |
# Relative path from an output directory to the image directory |
|
62 |
REL_JDK_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-$(DEBUG_NAME))/$(JDK_IMAGE_DIRNAME) |
|
63 |
REL_JDK_DEBUG_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-debug)/$(JDK_IMAGE_DIRNAME) |
|
64 |
REL_JDK_FASTDEBUG_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-fastdebug)/$(JDK_IMAGE_DIRNAME) |
|
65 |
||
0 | 66 |
ifndef TOPDIR |
20 | 67 |
TOPDIR:=. |
0 | 68 |
endif |
69 |
||
70 |
ifndef JDK_TOPDIR |
|
71 |
JDK_TOPDIR=$(TOPDIR)/jdk |
|
72 |
endif |
|
73 |
ifndef JDK_MAKE_SHARED_DIR |
|
74 |
JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared |
|
75 |
endif |
|
76 |
||
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
77 |
default: all |
0 | 78 |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
79 |
include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
80 |
include ./make/Defs-internal.gmk |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
81 |
include ./make/sanity-rules.gmk |
0 | 82 |
include ./make/hotspot-rules.gmk |
83 |
include ./make/langtools-rules.gmk |
|
84 |
include ./make/corba-rules.gmk |
|
85 |
include ./make/jaxp-rules.gmk |
|
86 |
include ./make/jaxws-rules.gmk |
|
87 |
include ./make/jdk-rules.gmk |
|
88 |
include ./make/install-rules.gmk |
|
89 |
include ./make/sponsors-rules.gmk |
|
90 |
include ./make/deploy-rules.gmk |
|
91 |
||
7873
4ff5acee11e8
7009969: Remove SKIP_OPENJDK_BUILD from top Makefile
ohair
parents:
7652
diff
changeset
|
92 |
all:: sanity |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
93 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
94 |
ifeq ($(SKIP_FASTDEBUG_BUILD), false) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
95 |
all:: fastdebug_build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
96 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
97 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
98 |
ifeq ($(SKIP_DEBUG_BUILD), false) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
99 |
all:: debug_build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
100 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
101 |
|
948 | 102 |
all:: all_product_build |
103 |
||
8445 | 104 |
all_product_build:: |
105 |
||
8441 | 106 |
# Everything for a full product build |
107 |
ifeq ($(SKIP_PRODUCT_BUILD), false) |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
108 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
109 |
all_product_build:: product_build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
110 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
111 |
ifeq ($(BUILD_INSTALL), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
112 |
all_product_build:: $(INSTALL) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
113 |
clobber:: install-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
114 |
endif |
8441 | 115 |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
116 |
ifeq ($(BUILD_SPONSORS), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
117 |
all_product_build:: $(SPONSORS) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
118 |
clobber:: sponsors-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
119 |
endif |
8441 | 120 |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
121 |
ifneq ($(SKIP_COMPARE_IMAGES), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
122 |
all_product_build:: compare-image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
123 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
124 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
125 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
126 |
|
8441 | 127 |
define StartTimer |
128 |
$(MKDIR) -p $(BUILDTIMESDIR) |
|
129 |
$(RM) $(BUILDTIMESDIR)/build_time_* |
|
130 |
$(call RecordStartTime,TOTAL) |
|
131 |
endef |
|
132 |
||
133 |
define StopTimer |
|
134 |
$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,TOTAL) && $(call ReportBuildTimes,$1),) |
|
135 |
endef |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
136 |
|
5743 | 137 |
# Generic build of basic repo series |
9309 | 138 |
generic_build_repo_series:: $(SOURCE_TIPS) |
9618 | 139 |
$(MKDIR) -p $(JDK_IMAGE_DIR) |
8441 | 140 |
@$(call StartTimer) |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
141 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
142 |
ifeq ($(BUILD_LANGTOOLS), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
143 |
generic_build_repo_series:: langtools |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
144 |
clobber:: langtools-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
145 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
146 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
147 |
ifeq ($(BUILD_CORBA), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
148 |
generic_build_repo_series:: corba |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
149 |
clobber:: corba-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
150 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
151 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
152 |
ifeq ($(BUILD_JAXP), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
153 |
generic_build_repo_series:: jaxp |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
154 |
clobber:: jaxp-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
155 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
156 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
157 |
ifeq ($(BUILD_JAXWS), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
158 |
generic_build_repo_series:: jaxws |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
159 |
clobber:: jaxws-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
160 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
161 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
162 |
ifeq ($(BUILD_HOTSPOT), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
163 |
generic_build_repo_series:: $(HOTSPOT) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
164 |
clobber:: hotspot-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
165 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
166 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
167 |
ifeq ($(BUILD_JDK), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
168 |
generic_build_repo_series:: $(JDK_JAVA_EXE) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
169 |
clobber:: jdk-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
170 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
171 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
172 |
ifeq ($(BUILD_DEPLOY), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
173 |
generic_build_repo_series:: $(DEPLOY) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
174 |
clobber:: deploy-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
175 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
176 |
|
8441 | 177 |
generic_build_repo_series:: |
178 |
@$(call StopTimer,$(if $(DEBUG_NAME),$(DEBUG_NAME)_build,all_product_build)) |
|
179 |
||
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
180 |
# The debug build, fastdebug or debug. Needs special handling. |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
181 |
# Note that debug builds do NOT do INSTALL steps, but must be done |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
182 |
# after the product build and before the INSTALL step of the product build. |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
183 |
# |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
184 |
# DEBUG_NAME is fastdebug or debug |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
185 |
# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix |
9618 | 186 |
# The resulting image directory (j2sdk-image) is used by the install makefiles |
187 |
# to create a debug install bundle jdk-*-debug-** bundle (tar or zip) |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
188 |
# which will install in the debug or fastdebug subdirectory of the |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
189 |
# normal product install area. |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
190 |
# The install process needs to know what the DEBUG_NAME is, so |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
191 |
# look for INSTALL_DEBUG_NAME in the install rules. |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
192 |
# |
5743 | 193 |
# NOTE: On windows, do not use $(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME). |
194 |
# Due to the use of short paths in $(ABS_OUTPUTDIR), this may |
|
195 |
# not be the same location. |
|
196 |
# |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
197 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
198 |
# Location of fresh bootdir output |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
199 |
ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk |
9618 | 200 |
FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/$(JDK_IMAGE_DIRNAME) |
201 |
FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/$(REL_JDK_IMAGE_DIR) |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
202 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
203 |
create_fresh_product_bootdir: FRC |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
204 |
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \ |
4309
39ca605f0647
6727046: Add message when docs are skipped in control build
ohair
parents:
2099
diff
changeset
|
205 |
GENERATE_DOCS=false \ |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
206 |
BOOT_CYCLE_SETTINGS= \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
207 |
build_product_image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
208 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
209 |
create_fresh_debug_bootdir: FRC |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
210 |
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \ |
4309
39ca605f0647
6727046: Add message when docs are skipped in control build
ohair
parents:
2099
diff
changeset
|
211 |
GENERATE_DOCS=false \ |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
212 |
BOOT_CYCLE_DEBUG_SETTINGS= \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
213 |
build_debug_image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
214 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
215 |
create_fresh_fastdebug_bootdir: FRC |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
216 |
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \ |
4309
39ca605f0647
6727046: Add message when docs are skipped in control build
ohair
parents:
2099
diff
changeset
|
217 |
GENERATE_DOCS=false \ |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
218 |
BOOT_CYCLE_DEBUG_SETTINGS= \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
219 |
build_fastdebug_image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
220 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
221 |
# Create boot image? |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
222 |
ifeq ($(SKIP_BOOT_CYCLE),false) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
223 |
ifneq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
224 |
DO_BOOT_CYCLE=true |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
225 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
226 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
227 |
|
8441 | 228 |
|
229 |
||
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
230 |
ifeq ($(DO_BOOT_CYCLE),true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
231 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
232 |
# Create the bootdir to use in the build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
233 |
product_build:: create_fresh_product_bootdir |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
234 |
debug_build:: create_fresh_debug_bootdir |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
235 |
fastdebug_build:: create_fresh_fastdebug_bootdir |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
236 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
237 |
# Define variables to be used now for the boot jdk |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
238 |
BOOT_CYCLE_SETTINGS= \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
239 |
ALT_BOOTDIR=$(FRESH_BOOTDIR) \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
240 |
ALT_JDK_IMPORT_PATH=$(FRESH_BOOTDIR) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
241 |
BOOT_CYCLE_DEBUG_SETTINGS= \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
242 |
ALT_BOOTDIR=$(FRESH_DEBUG_BOOTDIR) \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
243 |
ALT_JDK_IMPORT_PATH=$(FRESH_DEBUG_BOOTDIR) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
244 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
245 |
else |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
246 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
247 |
# Use the supplied ALT_BOOTDIR as the boot |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
248 |
BOOT_CYCLE_SETTINGS= |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
249 |
BOOT_CYCLE_DEBUG_SETTINGS= |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
250 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
251 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
252 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
253 |
build_product_image: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
254 |
$(MAKE) \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
255 |
SKIP_FASTDEBUG_BUILD=true \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
256 |
SKIP_DEBUG_BUILD=true \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
257 |
$(BOOT_CYCLE_SETTINGS) \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
258 |
generic_build_repo_series |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
259 |
|
5743 | 260 |
# NOTE: On windows, do not use $(ABS_OUTPUTDIR)-$(DEBUG_NAME). |
261 |
# Due to the use of short paths in $(ABS_OUTPUTDIR), this may |
|
262 |
# not be the same location. |
|
263 |
||
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
264 |
generic_debug_build: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
265 |
$(MAKE) \ |
9618 | 266 |
ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)/$(REL_JDK_OUTPUTDIR) \ |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
267 |
DEBUG_NAME=$(DEBUG_NAME) \ |
4309
39ca605f0647
6727046: Add message when docs are skipped in control build
ohair
parents:
2099
diff
changeset
|
268 |
GENERATE_DOCS=false \ |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
269 |
$(BOOT_CYCLE_DEBUG_SETTINGS) \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
270 |
generic_build_repo_series |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
271 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
272 |
build_debug_image: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
273 |
$(MAKE) DEBUG_NAME=debug generic_debug_build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
274 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
275 |
build_fastdebug_image: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
276 |
$(MAKE) DEBUG_NAME=fastdebug generic_debug_build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
277 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
278 |
# Build final image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
279 |
product_build:: build_product_image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
280 |
debug_build:: build_debug_image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
281 |
fastdebug_build:: build_fastdebug_image |
0 | 282 |
|
9309 | 283 |
# The source tips are stored with the relative path to the repo. |
284 |
# This file will be used when constructing the jdk image. |
|
285 |
source_tips: $(SOURCE_TIPS) |
|
286 |
$(CAT) $< |
|
287 |
$(SOURCE_TIPS): FRC |
|
288 |
@$(prep-target) |
|
289 |
@$(call GetSourceTips) |
|
290 |
||
8441 | 291 |
clobber:: REPORT_BUILD_TIMES= |
292 |
clobber:: |
|
0 | 293 |
$(RM) -r $(OUTPUTDIR)/* |
294 |
-($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE)) |
|
295 |
||
296 |
clean: clobber |
|
297 |
||
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
298 |
# |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
299 |
# Dev builds |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
300 |
# |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
301 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
302 |
dev : dev-build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
303 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
304 |
dev-build: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
305 |
$(MAKE) DEV_ONLY=true all |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
306 |
dev-sanity: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
307 |
$(MAKE) DEV_ONLY=true sanity |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
308 |
dev-clobber: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
309 |
$(MAKE) DEV_ONLY=true clobber |
0 | 310 |
|
311 |
# |
|
312 |
# Quick jdk verification build |
|
313 |
# |
|
314 |
jdk_only: |
|
315 |
$(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all |
|
316 |
||
317 |
||
318 |
# |
|
319 |
# Quick jdk verification fastdebug build |
|
320 |
# |
|
321 |
jdk_fastdebug_only: |
|
322 |
$(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \ |
|
323 |
BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build |
|
324 |
||
325 |
# |
|
326 |
# Quick deploy verification fastdebug build |
|
327 |
# |
|
328 |
deploy_fastdebug_only: |
|
329 |
$(MAKE) \ |
|
330 |
DEBUG_NAME=fastdebug \ |
|
331 |
BUILD_HOTSPOT=false \ |
|
332 |
BUILD_JDK=false \ |
|
333 |
BUILD_LANGTOOLS=false \ |
|
334 |
BUILD_CORBA=false \ |
|
335 |
BUILD_JAXP=false \ |
|
336 |
BUILD_JAXWS=false \ |
|
337 |
BUILD_INSTALL=false \ |
|
338 |
BUILD_SPONSORS=false \ |
|
339 |
generic_debug_build |
|
340 |
||
341 |
# |
|
342 |
# Product build (skip debug builds) |
|
343 |
# |
|
344 |
product_only: |
|
345 |
$(MAKE) SKIP_FASTDEBUG_BUILD=true all |
|
346 |
||
347 |
# |
|
348 |
# Check target |
|
349 |
# |
|
350 |
||
351 |
check: variable_check |
|
352 |
||
353 |
# |
|
354 |
# Help target |
|
355 |
# |
|
356 |
help: intro_help target_help variable_help notes_help examples_help |
|
357 |
||
358 |
# Intro help message |
|
359 |
intro_help: |
|
360 |
@$(ECHO) "\ |
|
361 |
Makefile for the JDK builds (all the JDK). \n\ |
|
362 |
" |
|
363 |
||
364 |
# Target help |
|
365 |
target_help: |
|
366 |
@$(ECHO) "\ |
|
367 |
--- Common Targets --- \n\ |
|
368 |
all -- build the core JDK (default target) \n\ |
|
369 |
help -- Print out help information \n\ |
|
370 |
check -- Check make variable values for correctness \n\ |
|
371 |
sanity -- Perform detailed sanity checks on system and settings \n\ |
|
372 |
fastdebug_build -- build the core JDK in 'fastdebug' mode (-g -O) \n\ |
|
373 |
debug_build -- build the core JDK in 'debug' mode (-g) \n\ |
|
374 |
clean -- remove all built and imported files \n\ |
|
375 |
clobber -- same as clean \n\ |
|
376 |
" |
|
377 |
||
378 |
# Variable help (only common ones used by this Makefile) |
|
379 |
variable_help: variable_help_intro variable_list variable_help_end |
|
380 |
variable_help_intro: |
|
381 |
@$(ECHO) "--- Common Variables ---" |
|
382 |
variable_help_end: |
|
383 |
@$(ECHO) " " |
|
384 |
||
385 |
# One line descriptions for the variables |
|
386 |
OUTPUTDIR.desc = Output directory |
|
387 |
PARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count |
|
388 |
SLASH_JAVA.desc = Root of all build tools, e.g. /java or J: |
|
389 |
BOOTDIR.desc = JDK used to boot the build |
|
390 |
JDK_IMPORT_PATH.desc = JDK used to import components of the build |
|
391 |
COMPILER_PATH.desc = Compiler install directory |
|
392 |
CACERTS_FILE.desc = Location of certificates file |
|
393 |
DEVTOOLS_PATH.desc = Directory containing zip and gnumake |
|
394 |
CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files |
|
395 |
DXSDK_PATH.desc = Root directory of DirectX SDK |
|
396 |
||
397 |
# Make variables to print out (description and value) |
|
398 |
VARIABLE_PRINTVAL_LIST += \ |
|
399 |
OUTPUTDIR \ |
|
400 |
PARALLEL_COMPILE_JOBS \ |
|
401 |
SLASH_JAVA \ |
|
402 |
BOOTDIR \ |
|
403 |
JDK_IMPORT_PATH \ |
|
404 |
COMPILER_PATH \ |
|
405 |
CACERTS_FILE \ |
|
406 |
DEVTOOLS_PATH |
|
407 |
||
408 |
# Make variables that should refer to directories that exist |
|
409 |
VARIABLE_CHECKDIR_LIST += \ |
|
410 |
SLASH_JAVA \ |
|
411 |
BOOTDIR \ |
|
412 |
JDK_IMPORT_PATH \ |
|
413 |
COMPILER_PATH \ |
|
414 |
DEVTOOLS_PATH |
|
415 |
||
416 |
# Make variables that should refer to files that exist |
|
417 |
VARIABLE_CHECKFIL_LIST += \ |
|
418 |
CACERTS_FILE |
|
419 |
||
420 |
# Some are windows specific |
|
421 |
ifeq ($(PLATFORM), windows) |
|
422 |
||
423 |
VARIABLE_PRINTVAL_LIST += \ |
|
7876
c2a288bdcca1
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7873
diff
changeset
|
424 |
DXSDK_PATH |
0 | 425 |
|
426 |
VARIABLE_CHECKDIR_LIST += \ |
|
7876
c2a288bdcca1
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7873
diff
changeset
|
427 |
DXSDK_PATH |
0 | 428 |
|
429 |
endif |
|
430 |
||
431 |
# For pattern rules below, so all are treated the same |
|
432 |
DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval) |
|
433 |
DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir) |
|
434 |
DO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil) |
|
435 |
||
436 |
# Complete variable check |
|
437 |
variable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST) |
|
438 |
variable_list: $(DO_PRINTVAL_LIST) variable_check |
|
439 |
||
440 |
# Pattern rule for printing out a variable |
|
441 |
%.printval: |
|
442 |
@$(ECHO) " ALT_$* - $($*.desc)" |
|
443 |
@$(ECHO) " \t $*=$($*)" |
|
444 |
||
445 |
# Pattern rule for checking to see if a variable with a directory exists |
|
446 |
%.checkdir: |
|
447 |
@if [ ! -d $($*) ] ; then \ |
|
448 |
$(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ |
|
449 |
fi |
|
450 |
||
451 |
# Pattern rule for checking to see if a variable with a file exists |
|
452 |
%.checkfil: |
|
453 |
@if [ ! -f $($*) ] ; then \ |
|
454 |
$(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ |
|
455 |
fi |
|
456 |
||
457 |
# Misc notes on help |
|
458 |
notes_help: |
|
459 |
@$(ECHO) "\ |
|
460 |
--- Notes --- \n\ |
|
461 |
- All builds use same output directory unless overridden with \n\ |
|
462 |
\t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\ |
|
463 |
\t to use the clean target first. \n\ |
|
464 |
- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\ |
|
465 |
\t builds or previous release JDK builds will work. \n\ |
|
466 |
- The fastest builds have been when the sources and the BOOTDIR are on \n\ |
|
467 |
\t local disk. \n\ |
|
468 |
" |
|
469 |
||
470 |
examples_help: |
|
471 |
@$(ECHO) "\ |
|
472 |
--- Examples --- \n\ |
|
473 |
$(MAKE) fastdebug_build \n\ |
|
474 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\ |
|
475 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug_build \n\ |
|
476 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\ |
|
477 |
$(MAKE) ALT_BOOTDIR=/opt/java/jdk1.5.0 \n\ |
|
478 |
$(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.6.0 \n\ |
|
479 |
" |
|
480 |
||
481 |
################################################################ |
|
7652
803a0c91a1a2
7008723: Remove binary plugs creation and use from openjdk
ohair
parents:
7649
diff
changeset
|
482 |
# Source bundling |
0 | 483 |
################################################################ |
484 |
ifeq ($(BUNDLE_RULES_AVAILABLE), true) |
|
485 |
include $(BUNDLE_RULES) |
|
486 |
endif |
|
487 |
||
488 |
################################################################ |
|
5743 | 489 |
# rule to test |
490 |
################################################################ |
|
491 |
||
6623
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
492 |
.NOTPARALLEL: test_run |
5743 | 493 |
|
6623
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
494 |
test: |
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
495 |
$(MAKE) test_run |
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
496 |
|
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
497 |
test_run: test_clean test_start test_summary |
5743 | 498 |
|
499 |
test_start: |
|
500 |
@$(ECHO) "Tests started at `$(DATE)`" |
|
501 |
||
502 |
test_clean: |
|
503 |
$(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt |
|
504 |
||
505 |
test_summary: $(OUTPUTDIR)/test_failures.txt |
|
506 |
@$(ECHO) "#################################################" |
|
507 |
@$(ECHO) "Tests completed at `$(DATE)`" |
|
508 |
@( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \ |
|
509 |
|| $(ECHO) "No TEST STATS seen in log" ) |
|
510 |
@$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt" |
|
511 |
@$(ECHO) "#################################################" |
|
512 |
@if [ -s $< ] ; then \ |
|
513 |
$(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \ |
|
514 |
$(CAT) $<; \ |
|
515 |
exit 1; \ |
|
516 |
else \ |
|
517 |
$(ECHO) "Success! No failures detected"; \ |
|
518 |
fi |
|
519 |
||
520 |
# Get failure list from log |
|
521 |
$(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt |
|
522 |
@$(RM) $@ |
|
6623
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
523 |
@( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) | $(NAWK) 'length>0' > $@ |
5743 | 524 |
|
525 |
# Get log file of all tests run |
|
526 |
JDK_TO_TEST := $(shell \ |
|
9618 | 527 |
if [ -d "$(ABS_JDK_IMAGE_DIR)" ] ; then \ |
528 |
$(ECHO) "$(ABS_JDK_IMAGE_DIR)"; \ |
|
5743 | 529 |
elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then \ |
530 |
$(ECHO) "$(ABS_OUTPUTDIR)"; \ |
|
531 |
elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then \ |
|
532 |
$(ECHO) "$(PRODUCT_HOME)"; \ |
|
533 |
fi \ |
|
534 |
) |
|
6623
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
535 |
TEST_TARGETS=all |
5743 | 536 |
$(OUTPUTDIR)/test_log.txt: |
537 |
$(RM) $@ |
|
6623
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
538 |
( $(CD) test && \ |
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
539 |
$(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) $(TEST_TARGETS) \ |
5743 | 540 |
) | tee $@ |
541 |
||
542 |
################################################################ |
|
0 | 543 |
# JPRT rule to build |
544 |
################################################################ |
|
545 |
||
546 |
include ./make/jprt.gmk |
|
547 |
||
548 |
################################################################ |
|
549 |
# PHONY |
|
550 |
################################################################ |
|
551 |
||
6623
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
552 |
.PHONY: all test test_run test_start test_summary test_clean \ |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
553 |
generic_build_repo_series \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
554 |
what clobber insane \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
555 |
dev dev-build dev-sanity dev-clobber \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
556 |
product_build \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
557 |
fastdebug_build \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
558 |
debug_build \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
559 |
build_product_image \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
560 |
build_debug_image \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
561 |
build_fastdebug_image \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
562 |
create_fresh_product_bootdir \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
563 |
create_fresh_debug_bootdir \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
564 |
create_fresh_fastdebug_bootdir \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
565 |
generic_debug_build |
0 | 566 |
|
17
bb9f330cd95a
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
16
diff
changeset
|
567 |
# Force target |
bb9f330cd95a
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
16
diff
changeset
|
568 |
FRC: |
bb9f330cd95a
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
16
diff
changeset
|
569 |
|
13697 | 570 |
endif # Original Makefile logic |
571 |