author | xdono |
Thu, 17 Jul 2008 11:28:31 -0700 | |
changeset 820 | 23747d00a7cd |
parent 668 | 982030fabc32 |
child 874 | 638ddad10e12 |
permissions | -rw-r--r-- |
0 | 1 |
# |
668 | 2 |
# Copyright 1995-2008 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 |
|
162 |
||
163 |
# Solaris 64 bit builds are not complete enough to ever do this |
|
164 |
ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) |
|
165 |
SKIP_OPENJDK_BUILD = true |
|
166 |
endif |
|
167 |
||
168 |
# Many reasons why we would want to skip the comparison to previous jdk |
|
169 |
ifndef SKIP_COMPARE_IMAGES |
|
170 |
ifeq ($(BUILD_JDK), false) |
|
171 |
SKIP_COMPARE_IMAGES = true |
|
172 |
endif |
|
173 |
ifeq ($(BUILD_DEPLOY), false) |
|
174 |
SKIP_COMPARE_IMAGES = true |
|
175 |
endif |
|
176 |
ifeq ($(BUILD_INSTALL), false) |
|
177 |
SKIP_COMPARE_IMAGES = true |
|
178 |
endif |
|
179 |
ifdef DEV_ONLY |
|
180 |
SKIP_COMPARE_IMAGES = true |
|
181 |
endif |
|
182 |
endif |
|
183 |
||
184 |
# Select defaults if these are not set to true or false |
|
185 |
ifndef SKIP_DEBUG_BUILD |
|
186 |
SKIP_DEBUG_BUILD=true |
|
187 |
endif |
|
188 |
ifndef SKIP_FASTDEBUG_BUILD |
|
189 |
SKIP_FASTDEBUG_BUILD=false |
|
190 |
endif |
|
191 |
||
192 |
# Output directory for hotspot build |
|
193 |
HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot |
|
194 |
||
195 |
# If we are building components |
|
196 |
ifndef ALT_LANGTOOLS_DIST |
|
197 |
LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools |
|
198 |
ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist |
|
199 |
endif |
|
200 |
ifndef ALT_CORBA_DIST |
|
201 |
CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba |
|
202 |
ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist |
|
203 |
endif |
|
204 |
ifndef ALT_JAXP_DIST |
|
205 |
JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp |
|
206 |
ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist |
|
207 |
endif |
|
208 |
ifndef ALT_JAXWS_DIST |
|
209 |
JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws |
|
210 |
ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist |
|
211 |
endif |
|
212 |
||
213 |
# Common make arguments (supplied to all component builds) |
|
214 |
COMMON_BUILD_ARGUMENTS = \ |
|
215 |
JDK_TOPDIR=$(ABS_JDK_TOPDIR) \ |
|
216 |
JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \ |
|
217 |
EXTERNALSANITYCONTROL=true \ |
|
218 |
TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \ |
|
219 |
MILESTONE=$(MILESTONE) \ |
|
220 |
BUILD_NUMBER=$(BUILD_NUMBER) \ |
|
221 |
JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \ |
|
222 |
FULL_VERSION=$(FULL_VERSION) \ |
|
223 |
PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \ |
|
224 |
JDK_VERSION=$(JDK_VERSION) \ |
|
225 |
JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \ |
|
226 |
JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \ |
|
227 |
JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \ |
|
575
8ad8d219b074
6710904: COMMON_BUILD_ARGUMENTS needs PREVIOUS_..._VERSION settings
martin
parents:
19
diff
changeset
|
228 |
JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) \ |
8ad8d219b074
6710904: COMMON_BUILD_ARGUMENTS needs PREVIOUS_..._VERSION settings
martin
parents:
19
diff
changeset
|
229 |
PREVIOUS_MAJOR_VERSION=$(PREVIOUS_MAJOR_VERSION) \ |
8ad8d219b074
6710904: COMMON_BUILD_ARGUMENTS needs PREVIOUS_..._VERSION settings
martin
parents:
19
diff
changeset
|
230 |
PREVIOUS_MINOR_VERSION=$(PREVIOUS_MINOR_VERSION) \ |
8ad8d219b074
6710904: COMMON_BUILD_ARGUMENTS needs PREVIOUS_..._VERSION settings
martin
parents:
19
diff
changeset
|
231 |
PREVIOUS_MICRO_VERSION=$(PREVIOUS_MICRO_VERSION) |
0 | 232 |
|
233 |
ifdef ARCH_DATA_MODEL |
|
234 |
COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) |
|
235 |
endif |
|
236 |
||
237 |
ifeq ($(DEBUG_NAME), debug) |
|
238 |
COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true |
|
239 |
endif |
|
240 |
||
241 |
ifeq ($(DEBUG_NAME), fastdebug) |
|
242 |
COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true |
|
243 |
endif |
|
244 |
||
245 |
ifdef COOKED_JDK_UPDATE_VERSION |
|
246 |
COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION) |
|
247 |
endif |
|
248 |
||
249 |
ifdef COOKED_BUILD_NUMBER |
|
250 |
COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER) |
|
251 |
endif |
|
252 |
||
253 |
ifdef ANT_HOME |
|
254 |
COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)" |
|
255 |
endif |
|
256 |
||
257 |
ifdef FINDBUGS_HOME |
|
258 |
COMMON_BUILD_ARGUMENTS += FINDBUGS_HOME="$(FINDBUGS_HOME)" |
|
259 |
endif |
|
260 |
||
261 |