author | alanb |
Fri, 09 Oct 2009 09:59:54 +0100 | |
changeset 4039 | afadb206ca44 |
parent 3789 | 2040d99c6f14 |
child 4309 | 39ca605f0647 |
permissions | -rw-r--r-- |
0 | 1 |
# |
2099 | 2 |
# Copyright 1995-2009 Sun Microsystems, Inc. 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 |
|
7 |
# published by the Free Software Foundation. Sun designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 |
# CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 |
# have any questions. |
|
24 |
# |
|
25 |
||
26 |
# |
|
27 |
# Common variables used by all the Java makefiles. This file should |
|
28 |
# not contain rules. |
|
29 |
# |
|
30 |
||
3789
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
31 |
# Indicate that we are visiting a separate repo or component |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
32 |
define MakeStart |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
33 |
$(PRINTF) "\n\n%s\n%s\n##### %-60.60s #####\n%s\n" \ |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
34 |
"########################################################################" \ |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
35 |
"########################################################################" \ |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
36 |
"Entering $1 for target $2" \ |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
37 |
"########################################################################" |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
38 |
endef |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
39 |
|
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
40 |
define MakeFinish |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
41 |
$(PRINTF) "%s\n##### %-60.60s #####\n%s\n%s\n\n" \ |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
42 |
"########################################################################" \ |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
43 |
"Leaving $1 for target $2" \ |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
44 |
"########################################################################" \ |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
45 |
"########################################################################" |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
46 |
endef |
2040d99c6f14
6855174: Improve log output when builds transition from one workspace to another
ohair
parents:
3571
diff
changeset
|
47 |
|
19 | 48 |
ifdef OPENJDK |
49 |
ifneq ($(OPENJDK),true) |
|
50 |
x:=$(error "OPENJDK (if defined) can only be set to true") |
|
51 |
endif |
|
52 |
endif |
|
53 |
||
0 | 54 |
# Define absolute paths to TOPDIRs |
55 |
ABS_CONTROL_TOPDIR:=$(call OptFullPath,"$(CONTROL_TOPDIR)") |
|
56 |
ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)") |
|
57 |
ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)") |
|
58 |
ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)") |
|
59 |
ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)") |
|
60 |
ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)") |
|
61 |
ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)") |
|
62 |
ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)") |
|
63 |
ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)") |
|
64 |
ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)") |
|
65 |
||
66 |
# Macro to return true or false if a file exists and is readable |
|
67 |
define MkExists |
|
68 |
$(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi) |
|
69 |
endef |
|
70 |
||
71 |
HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile) |
|
72 |
ifndef BUILD_HOTSPOT |
|
73 |
ifdef ALT_HOTSPOT_IMPORT_PATH |
|
74 |
BUILD_HOTSPOT := false |
|
75 |
else |
|
76 |
BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE) |
|
77 |
endif |
|
78 |
endif |
|
79 |
||
80 |
LANGTOOLS_SRC_AVAILABLE := $(call MkExists,$(LANGTOOLS_TOPDIR)/make/Makefile) |
|
81 |
ifndef BUILD_LANGTOOLS |
|
82 |
ifdef ALT_LANGTOOLS_DIST |
|
83 |
BUILD_LANGTOOLS := false |
|
84 |
else |
|
85 |
BUILD_LANGTOOLS := $(LANGTOOLS_SRC_AVAILABLE) |
|
86 |
endif |
|
87 |
endif |
|
88 |
||
89 |
CORBA_SRC_AVAILABLE := $(call MkExists,$(CORBA_TOPDIR)/make/Makefile) |
|
90 |
ifndef BUILD_CORBA |
|
91 |
ifdef ALT_CORBA_DIST |
|
92 |
BUILD_CORBA := false |
|
93 |
else |
|
94 |
BUILD_CORBA := $(CORBA_SRC_AVAILABLE) |
|
95 |
endif |
|
96 |
endif |
|
97 |
||
98 |
JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile) |
|
99 |
ifndef BUILD_JAXP |
|
100 |
ifdef ALT_JAXP_DIST |
|
101 |
BUILD_JAXP := false |
|
102 |
else |
|
103 |
BUILD_JAXP := $(JAXP_SRC_AVAILABLE) |
|
104 |
endif |
|
105 |
endif |
|
106 |
||
107 |
JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile) |
|
108 |
ifndef BUILD_JAXWS |
|
109 |
ifdef ALT_JAXWS_DIST |
|
110 |
BUILD_JAXWS := false |
|
111 |
else |
|
112 |
BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE) |
|
113 |
endif |
|
114 |
endif |
|
115 |
||
116 |
JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile) |
|
117 |
ifndef BUILD_JDK |
|
118 |
BUILD_JDK := $(JDK_SRC_AVAILABLE) |
|
119 |
endif |
|
120 |
ifeq ($(JDK_SRC_AVAILABLE),true) |
|
121 |
JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed) |
|
19 | 122 |
ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false) |
123 |
OPENJDK = true |
|
0 | 124 |
endif |
125 |
endif |
|
126 |
||
127 |
DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile) |
|
128 |
ifndef BUILD_DEPLOY |
|
129 |
BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE) |
|
130 |
endif |
|
131 |
||
132 |
INSTALL_SRC_AVAILABLE := $(call MkExists,$(INSTALL_TOPDIR)/make/Makefile) |
|
133 |
ifndef BUILD_INSTALL |
|
134 |
ifdef DEV_ONLY |
|
135 |
BUILD_INSTALL := false |
|
136 |
else |
|
137 |
BUILD_INSTALL := $(INSTALL_SRC_AVAILABLE) |
|
138 |
endif |
|
139 |
endif |
|
140 |
||
141 |
SPONSORS_SRC_AVAILABLE := $(call MkExists,$(SPONSORS_TOPDIR)/make/Makefile) |
|
142 |
ifndef BUILD_SPONSORS |
|
143 |
ifdef DEV_ONLY |
|
144 |
BUILD_SPONSORS := false |
|
145 |
else |
|
146 |
BUILD_SPONSORS := $(SPONSORS_SRC_AVAILABLE) |
|
147 |
endif |
|
148 |
endif |
|
149 |
||
150 |
||
151 |
# Do we build the source and openjdk binary plug bundles? |
|
152 |
BUNDLE_RULES = $(JDK_TOPDIR)/make/closed/bundles.gmk |
|
3571
764028d95393
6872177: JCE framework and provider builds broken following -target 7 changes
wetmore
parents:
3040
diff
changeset
|
153 |
ifeq ($(SKIP_BUNDLES_BUILD), true) |
764028d95393
6872177: JCE framework and provider builds broken following -target 7 changes
wetmore
parents:
3040
diff
changeset
|
154 |
BUNDLE_RULES_AVAILABLE := false |
764028d95393
6872177: JCE framework and provider builds broken following -target 7 changes
wetmore
parents:
3040
diff
changeset
|
155 |
else |
764028d95393
6872177: JCE framework and provider builds broken following -target 7 changes
wetmore
parents:
3040
diff
changeset
|
156 |
BUNDLE_RULES_AVAILABLE := $(call MkExists,$(BUNDLE_RULES)) |
764028d95393
6872177: JCE framework and provider builds broken following -target 7 changes
wetmore
parents:
3040
diff
changeset
|
157 |
endif |
0 | 158 |
|
159 |
# Current things we do NOT build for OPENJDK |
|
160 |
ifdef OPENJDK |
|
161 |
BUILD_DEPLOY = false |
|
162 |
BUILD_INSTALL = false |
|
163 |
BUILD_SPONSORS = false |
|
164 |
BUNDLE_RULES_AVAILABLE := false |
|
165 |
# These could be over-ridden on the command line or in environment |
|
166 |
ifndef SKIP_FASTDEBUG_BUILD |
|
167 |
SKIP_FASTDEBUG_BUILD = true |
|
168 |
endif |
|
169 |
ifndef SKIP_DEBUG_BUILD |
|
170 |
SKIP_DEBUG_BUILD = true |
|
171 |
endif |
|
172 |
ifndef SKIP_COMPARE_IMAGES |
|
173 |
SKIP_COMPARE_IMAGES = true |
|
174 |
endif |
|
175 |
SKIP_OPENJDK_BUILD = true |
|
176 |
else |
|
3040
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
177 |
|
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
178 |
# Various non-OPENJDK reasons to NOT build the deploy repository |
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
179 |
ifeq ($(ARCH), ia64) |
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
180 |
BUILD_DEPLOY=false |
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
181 |
endif |
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
182 |
ifeq ($(ARCH), sparcv9) |
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
183 |
BUILD_DEPLOY=false |
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
184 |
endif |
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
185 |
ifeq ($(ARCH), amd64) |
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
186 |
ifeq ($(PLATFORM), solaris) |
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
187 |
BUILD_DEPLOY=false |
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
188 |
endif |
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
189 |
endif |
48f8548b018b
6857805: Fix openjdk builds to avoid building deploy repository
ohair
parents:
2905
diff
changeset
|
190 |
|
0 | 191 |
ifndef SKIP_OPENJDK_BUILD |
18
d840592860e4
6675289: Make default production build NOT include an openjdk build
ohair
parents:
16
diff
changeset
|
192 |
#SKIP_OPENJDK_BUILD = false |
d840592860e4
6675289: Make default production build NOT include an openjdk build
ohair
parents:
16
diff
changeset
|
193 |
# Until 6675289 is resolved, or this feature is removed. |
d840592860e4
6675289: Make default production build NOT include an openjdk build
ohair
parents:
16
diff
changeset
|
194 |
SKIP_OPENJDK_BUILD = true |
0 | 195 |
endif |
196 |
endif |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
197 |
ifndef SKIP_PRODUCT_BUILD |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
198 |
SKIP_PRODUCT_BUILD = false |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
199 |
endif |
0 | 200 |
|
201 |
# Solaris 64 bit builds are not complete enough to ever do this |
|
202 |
ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) |
|
203 |
SKIP_OPENJDK_BUILD = true |
|
204 |
endif |
|
205 |
||
206 |
# Many reasons why we would want to skip the comparison to previous jdk |
|
207 |
ifndef SKIP_COMPARE_IMAGES |
|
208 |
ifeq ($(BUILD_JDK), false) |
|
209 |
SKIP_COMPARE_IMAGES = true |
|
210 |
endif |
|
211 |
ifeq ($(BUILD_DEPLOY), false) |
|
212 |
SKIP_COMPARE_IMAGES = true |
|
213 |
endif |
|
214 |
ifeq ($(BUILD_INSTALL), false) |
|
215 |
SKIP_COMPARE_IMAGES = true |
|
216 |
endif |
|
217 |
ifdef DEV_ONLY |
|
218 |
SKIP_COMPARE_IMAGES = true |
|
219 |
endif |
|
220 |
endif |
|
221 |
||
222 |
# Select defaults if these are not set to true or false |
|
223 |
ifndef SKIP_DEBUG_BUILD |
|
224 |
SKIP_DEBUG_BUILD=true |
|
225 |
endif |
|
226 |
ifndef SKIP_FASTDEBUG_BUILD |
|
227 |
SKIP_FASTDEBUG_BUILD=false |
|
228 |
endif |
|
229 |
||
230 |
# Output directory for hotspot build |
|
231 |
HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot |
|
232 |
||
233 |
# If we are building components |
|
234 |
ifndef ALT_LANGTOOLS_DIST |
|
235 |
LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools |
|
236 |
ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist |
|
237 |
endif |
|
238 |
ifndef ALT_CORBA_DIST |
|
239 |
CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba |
|
240 |
ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist |
|
241 |
endif |
|
242 |
ifndef ALT_JAXP_DIST |
|
243 |
JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp |
|
244 |
ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist |
|
245 |
endif |
|
246 |
ifndef ALT_JAXWS_DIST |
|
247 |
JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws |
|
248 |
ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist |
|
249 |
endif |
|
250 |
||
251 |
# Common make arguments (supplied to all component builds) |
|
252 |
COMMON_BUILD_ARGUMENTS = \ |
|
253 |
JDK_TOPDIR=$(ABS_JDK_TOPDIR) \ |
|
254 |
JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \ |
|
255 |
EXTERNALSANITYCONTROL=true \ |
|
2905 | 256 |
SOURCE_LANGUAGE_VERSION=$(SOURCE_LANGUAGE_VERSION) \ |
0 | 257 |
TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \ |
258 |
MILESTONE=$(MILESTONE) \ |
|
259 |
BUILD_NUMBER=$(BUILD_NUMBER) \ |
|
260 |
JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \ |
|
261 |
FULL_VERSION=$(FULL_VERSION) \ |
|
262 |
PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \ |
|
263 |
JDK_VERSION=$(JDK_VERSION) \ |
|
264 |
JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \ |
|
265 |
JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \ |
|
266 |
JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \ |
|
575
8ad8d219b074
6710904: COMMON_BUILD_ARGUMENTS needs PREVIOUS_..._VERSION settings
martin
parents:
19
diff
changeset
|
267 |
JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) \ |
8ad8d219b074
6710904: COMMON_BUILD_ARGUMENTS needs PREVIOUS_..._VERSION settings
martin
parents:
19
diff
changeset
|
268 |
PREVIOUS_MAJOR_VERSION=$(PREVIOUS_MAJOR_VERSION) \ |
8ad8d219b074
6710904: COMMON_BUILD_ARGUMENTS needs PREVIOUS_..._VERSION settings
martin
parents:
19
diff
changeset
|
269 |
PREVIOUS_MINOR_VERSION=$(PREVIOUS_MINOR_VERSION) \ |
8ad8d219b074
6710904: COMMON_BUILD_ARGUMENTS needs PREVIOUS_..._VERSION settings
martin
parents:
19
diff
changeset
|
270 |
PREVIOUS_MICRO_VERSION=$(PREVIOUS_MICRO_VERSION) |
0 | 271 |
|
272 |
ifdef ARCH_DATA_MODEL |
|
273 |
COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) |
|
274 |
endif |
|
275 |
||
276 |
ifeq ($(DEBUG_NAME), debug) |
|
277 |
COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true |
|
278 |
endif |
|
279 |
||
280 |
ifeq ($(DEBUG_NAME), fastdebug) |
|
281 |
COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true |
|
282 |
endif |
|
283 |
||
284 |
ifdef COOKED_JDK_UPDATE_VERSION |
|
285 |
COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION) |
|
286 |
endif |
|
287 |
||
288 |
ifdef COOKED_BUILD_NUMBER |
|
289 |
COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER) |
|
290 |
endif |
|
291 |
||
292 |
ifdef ANT_HOME |
|
293 |
COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)" |
|
294 |
endif |
|
295 |