Tue, 28 Jul 2009 12:12:34 -0700
6862919: Update copyright year
Summary: Update copyright for files that have been modified in 2009, up to 07/09
Reviewed-by: tbell, 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 BUNDLE_RULES_AVAILABLE := $(call MkExists,$(BUNDLE_RULES))
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
157 # Various non-OPENJDK reasons to NOT build the deploy repository
158 ifeq ($(ARCH), ia64)
159 BUILD_DEPLOY=false
160 endif
161 ifeq ($(ARCH), sparcv9)
162 BUILD_DEPLOY=false
163 endif
164 ifeq ($(ARCH), amd64)
165 ifeq ($(PLATFORM), solaris)
166 BUILD_DEPLOY=false
167 endif
168 endif
170 ifndef SKIP_OPENJDK_BUILD
171 #SKIP_OPENJDK_BUILD = false
172 # Until 6675289 is resolved, or this feature is removed.
173 SKIP_OPENJDK_BUILD = true
174 endif
175 endif
176 ifndef SKIP_PRODUCT_BUILD
177 SKIP_PRODUCT_BUILD = false
178 endif
180 # Solaris 64 bit builds are not complete enough to ever do this
181 ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
182 SKIP_OPENJDK_BUILD = true
183 endif
185 # Many reasons why we would want to skip the comparison to previous jdk
186 ifndef SKIP_COMPARE_IMAGES
187 ifeq ($(BUILD_JDK), false)
188 SKIP_COMPARE_IMAGES = true
189 endif
190 ifeq ($(BUILD_DEPLOY), false)
191 SKIP_COMPARE_IMAGES = true
192 endif
193 ifeq ($(BUILD_INSTALL), false)
194 SKIP_COMPARE_IMAGES = true
195 endif
196 ifdef DEV_ONLY
197 SKIP_COMPARE_IMAGES = true
198 endif
199 endif
201 # Select defaults if these are not set to true or false
202 ifndef SKIP_DEBUG_BUILD
203 SKIP_DEBUG_BUILD=true
204 endif
205 ifndef SKIP_FASTDEBUG_BUILD
206 SKIP_FASTDEBUG_BUILD=false
207 endif
209 # Output directory for hotspot build
210 HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot
212 # If we are building components
213 ifndef ALT_LANGTOOLS_DIST
214 LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools
215 ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist
216 endif
217 ifndef ALT_CORBA_DIST
218 CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba
219 ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist
220 endif
221 ifndef ALT_JAXP_DIST
222 JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp
223 ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist
224 endif
225 ifndef ALT_JAXWS_DIST
226 JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws
227 ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist
228 endif
230 # Common make arguments (supplied to all component builds)
231 COMMON_BUILD_ARGUMENTS = \
232 JDK_TOPDIR=$(ABS_JDK_TOPDIR) \
233 JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \
234 EXTERNALSANITYCONTROL=true \
235 SOURCE_LANGUAGE_VERSION=$(SOURCE_LANGUAGE_VERSION) \
236 TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \
237 MILESTONE=$(MILESTONE) \
238 BUILD_NUMBER=$(BUILD_NUMBER) \
239 JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \
240 FULL_VERSION=$(FULL_VERSION) \
241 PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \
242 JDK_VERSION=$(JDK_VERSION) \
243 JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \
244 JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \
245 JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \
246 JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) \
247 PREVIOUS_MAJOR_VERSION=$(PREVIOUS_MAJOR_VERSION) \
248 PREVIOUS_MINOR_VERSION=$(PREVIOUS_MINOR_VERSION) \
249 PREVIOUS_MICRO_VERSION=$(PREVIOUS_MICRO_VERSION)
251 ifdef ARCH_DATA_MODEL
252 COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)
253 endif
255 ifeq ($(DEBUG_NAME), debug)
256 COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true
257 endif
259 ifeq ($(DEBUG_NAME), fastdebug)
260 COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true
261 endif
263 ifdef COOKED_JDK_UPDATE_VERSION
264 COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION)
265 endif
267 ifdef COOKED_BUILD_NUMBER
268 COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
269 endif
271 ifdef ANT_HOME
272 COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)"
273 endif