Fri, 14 Aug 2009 17:29:31 -0700
6872177: JCE framework and provider builds broken following -target 7 changes
Reviewed-by: ohair
1 #
2 # Copyright 1995-2009 Sun Microsystems, Inc. All Rights Reserved.
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 #
26 #
27 # Common variables used by all the Java makefiles. This file should
28 # not contain rules.
29 #
31 ifdef OPENJDK
32 ifneq ($(OPENJDK),true)
33 x:=$(error "OPENJDK (if defined) can only be set to true")
34 endif
35 endif
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)")
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
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
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
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
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
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
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)
105 ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false)
106 OPENJDK = true
107 endif
108 endif
110 DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile)
111 ifndef BUILD_DEPLOY
112 BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE)
113 endif
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
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
134 # Do we build the source and openjdk binary plug bundles?
135 BUNDLE_RULES = $(JDK_TOPDIR)/make/closed/bundles.gmk
136 ifeq ($(SKIP_BUNDLES_BUILD), true)
137 BUNDLE_RULES_AVAILABLE := false
138 else
139 BUNDLE_RULES_AVAILABLE := $(call MkExists,$(BUNDLE_RULES))
140 endif
142 # Current things we do NOT build for OPENJDK
143 ifdef OPENJDK
144 BUILD_DEPLOY = false
145 BUILD_INSTALL = false
146 BUILD_SPONSORS = false
147 BUNDLE_RULES_AVAILABLE := false
148 # These could be over-ridden on the command line or in environment
149 ifndef SKIP_FASTDEBUG_BUILD
150 SKIP_FASTDEBUG_BUILD = true
151 endif
152 ifndef SKIP_DEBUG_BUILD
153 SKIP_DEBUG_BUILD = true
154 endif
155 ifndef SKIP_COMPARE_IMAGES
156 SKIP_COMPARE_IMAGES = true
157 endif
158 SKIP_OPENJDK_BUILD = true
159 else
161 # Various non-OPENJDK reasons to NOT build the deploy repository
162 ifeq ($(ARCH), ia64)
163 BUILD_DEPLOY=false
164 endif
165 ifeq ($(ARCH), sparcv9)
166 BUILD_DEPLOY=false
167 endif
168 ifeq ($(ARCH), amd64)
169 ifeq ($(PLATFORM), solaris)
170 BUILD_DEPLOY=false
171 endif
172 endif
174 ifndef SKIP_OPENJDK_BUILD
175 #SKIP_OPENJDK_BUILD = false
176 # Until 6675289 is resolved, or this feature is removed.
177 SKIP_OPENJDK_BUILD = true
178 endif
179 endif
180 ifndef SKIP_PRODUCT_BUILD
181 SKIP_PRODUCT_BUILD = false
182 endif
184 # Solaris 64 bit builds are not complete enough to ever do this
185 ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
186 SKIP_OPENJDK_BUILD = true
187 endif
189 # Many reasons why we would want to skip the comparison to previous jdk
190 ifndef SKIP_COMPARE_IMAGES
191 ifeq ($(BUILD_JDK), false)
192 SKIP_COMPARE_IMAGES = true
193 endif
194 ifeq ($(BUILD_DEPLOY), false)
195 SKIP_COMPARE_IMAGES = true
196 endif
197 ifeq ($(BUILD_INSTALL), false)
198 SKIP_COMPARE_IMAGES = true
199 endif
200 ifdef DEV_ONLY
201 SKIP_COMPARE_IMAGES = true
202 endif
203 endif
205 # Select defaults if these are not set to true or false
206 ifndef SKIP_DEBUG_BUILD
207 SKIP_DEBUG_BUILD=true
208 endif
209 ifndef SKIP_FASTDEBUG_BUILD
210 SKIP_FASTDEBUG_BUILD=false
211 endif
213 # Output directory for hotspot build
214 HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot
216 # If we are building components
217 ifndef ALT_LANGTOOLS_DIST
218 LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools
219 ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist
220 endif
221 ifndef ALT_CORBA_DIST
222 CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba
223 ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist
224 endif
225 ifndef ALT_JAXP_DIST
226 JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp
227 ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist
228 endif
229 ifndef ALT_JAXWS_DIST
230 JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws
231 ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist
232 endif
234 # Common make arguments (supplied to all component builds)
235 COMMON_BUILD_ARGUMENTS = \
236 JDK_TOPDIR=$(ABS_JDK_TOPDIR) \
237 JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \
238 EXTERNALSANITYCONTROL=true \
239 SOURCE_LANGUAGE_VERSION=$(SOURCE_LANGUAGE_VERSION) \
240 TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \
241 MILESTONE=$(MILESTONE) \
242 BUILD_NUMBER=$(BUILD_NUMBER) \
243 JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \
244 FULL_VERSION=$(FULL_VERSION) \
245 PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \
246 JDK_VERSION=$(JDK_VERSION) \
247 JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \
248 JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \
249 JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \
250 JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) \
251 PREVIOUS_MAJOR_VERSION=$(PREVIOUS_MAJOR_VERSION) \
252 PREVIOUS_MINOR_VERSION=$(PREVIOUS_MINOR_VERSION) \
253 PREVIOUS_MICRO_VERSION=$(PREVIOUS_MICRO_VERSION)
255 ifdef ARCH_DATA_MODEL
256 COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)
257 endif
259 ifeq ($(DEBUG_NAME), debug)
260 COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true
261 endif
263 ifeq ($(DEBUG_NAME), fastdebug)
264 COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true
265 endif
267 ifdef COOKED_JDK_UPDATE_VERSION
268 COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION)
269 endif
271 ifdef COOKED_BUILD_NUMBER
272 COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
273 endif
275 ifdef ANT_HOME
276 COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)"
277 endif