author | cfang |
Tue, 05 May 2009 11:02:10 -0700 | |
changeset 2745 | 60853c6a93b7 |
parent 2099 | a9be2da8a8f2 |
child 2905 | 4fa83b3a1b96 |
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 |
||
19 | 31 |
ifdef OPENJDK |
32 |
ifneq ($(OPENJDK),true) |
|
33 |
x:=$(error "OPENJDK (if defined) can only be set to true") |
|
34 |
endif |
|
35 |
endif |
|
36 |
||
0 | 37 |
# Define absolute paths to TOPDIRs |
38 |
ABS_CONTROL_TOPDIR:=$(call OptFullPath,"$(CONTROL_TOPDIR)") |
|
39 |
ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)") |
|
40 |
ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)") |
|
41 |
ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)") |
|
42 |
ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)") |
|
43 |
ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)") |
|
44 |
ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)") |
|
45 |
ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)") |
|
46 |
ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)") |
|
47 |
ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)") |
|
48 |
||
49 |
# Macro to return true or false if a file exists and is readable |
|
50 |
define MkExists |
|
51 |
$(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi) |
|
52 |
endef |
|
53 |
||
54 |
HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile) |
|
55 |
ifndef BUILD_HOTSPOT |
|
56 |
ifdef ALT_HOTSPOT_IMPORT_PATH |
|
57 |
BUILD_HOTSPOT := false |
|
58 |
else |
|
59 |
BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE) |
|
60 |
endif |
|
61 |
endif |
|
62 |
||
63 |
LANGTOOLS_SRC_AVAILABLE := $(call MkExists,$(LANGTOOLS_TOPDIR)/make/Makefile) |
|
64 |
ifndef BUILD_LANGTOOLS |
|
65 |
ifdef ALT_LANGTOOLS_DIST |
|
66 |
BUILD_LANGTOOLS := false |
|
67 |
else |
|
68 |
BUILD_LANGTOOLS := $(LANGTOOLS_SRC_AVAILABLE) |
|
69 |
endif |
|
70 |
endif |
|
71 |
||
72 |
CORBA_SRC_AVAILABLE := $(call MkExists,$(CORBA_TOPDIR)/make/Makefile) |
|
73 |
ifndef BUILD_CORBA |
|
74 |
ifdef ALT_CORBA_DIST |
|
75 |
BUILD_CORBA := false |
|
76 |
else |
|
77 |
BUILD_CORBA := $(CORBA_SRC_AVAILABLE) |
|
78 |
endif |
|
79 |
endif |
|
80 |
||
81 |
JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile) |
|
82 |
ifndef BUILD_JAXP |
|
83 |
ifdef ALT_JAXP_DIST |
|
84 |
BUILD_JAXP := false |
|
85 |
else |
|
86 |
BUILD_JAXP := $(JAXP_SRC_AVAILABLE) |
|
87 |
endif |
|
88 |
endif |
|
89 |
||
90 |
JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile) |
|
91 |
ifndef BUILD_JAXWS |
|
92 |
ifdef ALT_JAXWS_DIST |
|
93 |
BUILD_JAXWS := false |
|
94 |
else |
|
95 |
BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE) |
|
96 |
endif |
|
97 |
endif |
|
98 |
||
99 |
JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile) |
|
100 |
ifndef BUILD_JDK |
|
101 |
BUILD_JDK := $(JDK_SRC_AVAILABLE) |
|
102 |
endif |
|
103 |
ifeq ($(JDK_SRC_AVAILABLE),true) |
|
104 |
JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed) |
|
19 | 105 |
ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false) |
106 |
OPENJDK = true |
|
0 | 107 |
endif |
108 |
endif |
|
109 |
||
110 |
DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile) |
|
111 |
ifndef BUILD_DEPLOY |
|
112 |
BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE) |
|
113 |
endif |
|
114 |
||
115 |
INSTALL_SRC_AVAILABLE := $(call MkExists,$(INSTALL_TOPDIR)/make/Makefile) |
|
116 |
ifndef BUILD_INSTALL |
|
117 |
ifdef DEV_ONLY |
|
118 |
BUILD_INSTALL := false |
|
119 |
else |
|
120 |
BUILD_INSTALL := $(INSTALL_SRC_AVAILABLE) |
|
121 |
endif |
|
122 |
endif |
|
123 |
||
124 |
SPONSORS_SRC_AVAILABLE := $(call MkExists,$(SPONSORS_TOPDIR)/make/Makefile) |
|
125 |
ifndef BUILD_SPONSORS |
|
126 |
ifdef DEV_ONLY |
|
127 |
BUILD_SPONSORS := false |
|
128 |
else |
|
129 |
BUILD_SPONSORS := $(SPONSORS_SRC_AVAILABLE) |
|
130 |
endif |
|
131 |
endif |
|
132 |
||
133 |
||
134 |
# Do we build the source and openjdk binary plug bundles? |
|
135 |
BUNDLE_RULES = $(JDK_TOPDIR)/make/closed/bundles.gmk |
|
136 |
BUNDLE_RULES_AVAILABLE := $(call MkExists,$(BUNDLE_RULES)) |
|
137 |
||
138 |
# Current things we do NOT build for OPENJDK |
|
139 |
ifdef OPENJDK |
|
140 |
BUILD_DEPLOY = false |
|
141 |
BUILD_INSTALL = false |
|
142 |
BUILD_SPONSORS = false |
|
143 |
BUNDLE_RULES_AVAILABLE := false |
|
144 |
# These could be over-ridden on the command line or in environment |
|
145 |
ifndef SKIP_FASTDEBUG_BUILD |
|
146 |
SKIP_FASTDEBUG_BUILD = true |
|
147 |
endif |
|
148 |
ifndef SKIP_DEBUG_BUILD |
|
149 |
SKIP_DEBUG_BUILD = true |
|
150 |
endif |
|
151 |
ifndef SKIP_COMPARE_IMAGES |
|
152 |
SKIP_COMPARE_IMAGES = true |
|
153 |
endif |
|
154 |
SKIP_OPENJDK_BUILD = true |
|
155 |
else |
|
156 |
ifndef SKIP_OPENJDK_BUILD |
|
18
d840592860e4
6675289: Make default production build NOT include an openjdk build
ohair
parents:
16
diff
changeset
|
157 |
#SKIP_OPENJDK_BUILD = false |
d840592860e4
6675289: Make default production build NOT include an openjdk build
ohair
parents:
16
diff
changeset
|
158 |
# 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
|
159 |
SKIP_OPENJDK_BUILD = true |
0 | 160 |
endif |
161 |
endif |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
162 |
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
|
163 |
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
|
164 |
endif |
0 | 165 |
|
166 |
# Solaris 64 bit builds are not complete enough to ever do this |
|
167 |
ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) |
|
168 |
SKIP_OPENJDK_BUILD = true |
|
169 |
endif |
|
170 |
||
171 |
# Many reasons why we would want to skip the comparison to previous jdk |
|
172 |
ifndef SKIP_COMPARE_IMAGES |
|
173 |
ifeq ($(BUILD_JDK), false) |
|
174 |
SKIP_COMPARE_IMAGES = true |
|
175 |
endif |
|
176 |
ifeq ($(BUILD_DEPLOY), false) |
|
177 |
SKIP_COMPARE_IMAGES = true |
|
178 |
endif |
|
179 |
ifeq ($(BUILD_INSTALL), false) |
|
180 |
SKIP_COMPARE_IMAGES = true |
|
181 |
endif |
|
182 |
ifdef DEV_ONLY |
|
183 |
SKIP_COMPARE_IMAGES = true |
|
184 |
endif |
|
185 |
endif |
|
186 |
||
187 |
# Select defaults if these are not set to true or false |
|
188 |
ifndef SKIP_DEBUG_BUILD |
|
189 |
SKIP_DEBUG_BUILD=true |
|
190 |
endif |
|
191 |
ifndef SKIP_FASTDEBUG_BUILD |
|
192 |
SKIP_FASTDEBUG_BUILD=false |
|
193 |
endif |
|
194 |
||
195 |
# Output directory for hotspot build |
|
196 |
HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot |
|
197 |
||
198 |
# If we are building components |
|
199 |
ifndef ALT_LANGTOOLS_DIST |
|
200 |
LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools |
|
201 |
ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist |
|
202 |
endif |
|
203 |
ifndef ALT_CORBA_DIST |
|
204 |
CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba |
|
205 |
ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist |
|
206 |
endif |
|
207 |
ifndef ALT_JAXP_DIST |
|
208 |
JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp |
|
209 |
ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist |
|
210 |
endif |
|
211 |
ifndef ALT_JAXWS_DIST |
|
212 |
JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws |
|
213 |
ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist |
|
214 |
endif |
|
215 |
||
216 |
# Common make arguments (supplied to all component builds) |
|
217 |
COMMON_BUILD_ARGUMENTS = \ |
|
218 |
JDK_TOPDIR=$(ABS_JDK_TOPDIR) \ |
|
219 |
JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \ |
|
220 |
EXTERNALSANITYCONTROL=true \ |
|
221 |
TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \ |
|
222 |
MILESTONE=$(MILESTONE) \ |
|
223 |
BUILD_NUMBER=$(BUILD_NUMBER) \ |
|
224 |
JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \ |
|
225 |
FULL_VERSION=$(FULL_VERSION) \ |
|
226 |
PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \ |
|
227 |
JDK_VERSION=$(JDK_VERSION) \ |
|
228 |
JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \ |
|
229 |
JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \ |
|
230 |
JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \ |
|
575
8ad8d219b074
6710904: COMMON_BUILD_ARGUMENTS needs PREVIOUS_..._VERSION settings
martin
parents:
19
diff
changeset
|
231 |
JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) \ |
8ad8d219b074
6710904: COMMON_BUILD_ARGUMENTS needs PREVIOUS_..._VERSION settings
martin
parents:
19
diff
changeset
|
232 |
PREVIOUS_MAJOR_VERSION=$(PREVIOUS_MAJOR_VERSION) \ |
8ad8d219b074
6710904: COMMON_BUILD_ARGUMENTS needs PREVIOUS_..._VERSION settings
martin
parents:
19
diff
changeset
|
233 |
PREVIOUS_MINOR_VERSION=$(PREVIOUS_MINOR_VERSION) \ |
8ad8d219b074
6710904: COMMON_BUILD_ARGUMENTS needs PREVIOUS_..._VERSION settings
martin
parents:
19
diff
changeset
|
234 |
PREVIOUS_MICRO_VERSION=$(PREVIOUS_MICRO_VERSION) |
0 | 235 |
|
236 |
ifdef ARCH_DATA_MODEL |
|
237 |
COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) |
|
238 |
endif |
|
239 |
||
240 |
ifeq ($(DEBUG_NAME), debug) |
|
241 |
COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true |
|
242 |
endif |
|
243 |
||
244 |
ifeq ($(DEBUG_NAME), fastdebug) |
|
245 |
COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true |
|
246 |
endif |
|
247 |
||
248 |
ifdef COOKED_JDK_UPDATE_VERSION |
|
249 |
COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION) |
|
250 |
endif |
|
251 |
||
252 |
ifdef COOKED_BUILD_NUMBER |
|
253 |
COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER) |
|
254 |
endif |
|
255 |
||
256 |
ifdef ANT_HOME |
|
257 |
COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)" |
|
258 |
endif |
|
259 |