author | ohair |
Mon, 10 Mar 2008 16:51:23 -0700 | |
changeset 33 | 51a7bc3e93a0 |
parent 2 | 90ce3da70b43 |
child 300 | d4f77ff718fd |
child 140 | 3d601b5affa3 |
permissions | -rw-r--r-- |
2 | 1 |
# |
2 |
# Copyright 2005-2007 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 |
# |
|
25 |
||
26 |
# |
|
27 |
# Definitions for all platforms. |
|
28 |
# |
|
29 |
# Normally the convention is that these alternate definitions of |
|
30 |
# primary make variables are never defined inside the Makefiles anywhere |
|
31 |
# but are defined via environment variables or set on the make command |
|
32 |
# line. So you should never see an ALT_* variable defined in any |
|
33 |
# makefiles, just used. This is the convention and there are some |
|
34 |
# exceptions, either mistakes or unusual circumstances. |
|
35 |
# |
|
36 |
# The naming convention for the default value of one of these variables |
|
37 |
# that has an ALT_* override capability is to name the default value with a |
|
38 |
# leading underscore (_). So for XXX you would have: |
|
39 |
# _XXX default value |
|
40 |
# ALT_XXX any override the user is providing if any |
|
41 |
# XXX the final value, either the default _XXX or the ALT_XXX value. |
|
42 |
# |
|
43 |
||
44 |
# On Directory names. In very rare cases should the Windows directory |
|
45 |
# names use the backslash, please use the C:/ style of windows paths. |
|
46 |
# Avoid duplicating the // characters in paths, this has known to cause |
|
47 |
# strange problems with jar and other utilities, e.g. /a//b/ != /a/b/. |
|
48 |
# Some of these variables have an explicit trailing / character, but in |
|
49 |
# general, they should NOT have the trailing / character. |
|
50 |
||
51 |
# Get shared system utilities macros defined |
|
52 |
include $(JDK_MAKE_SHARED_DIR)/Defs-utils.gmk |
|
53 |
||
54 |
# Assumes ARCH, PLATFORM, ARCH_VM_SUBDIR, JDK_TOPDIR, etc. have been defined. |
|
55 |
||
56 |
# Simple pwd path |
|
57 |
define PwdPath |
|
33
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
58 |
$(shell $(CD) $1 2> $(DEV_NULL) && $(PWD)) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
59 |
endef |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
60 |
define AbsPwdPathCheck |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
61 |
$(shell $(CD) .. 2> $(DEV_NULL) && $(CD) $1 2> $(DEV_NULL) && $(PWD)) |
2 | 62 |
endef |
63 |
||
64 |
# Checks an ALT value for spaces (should be one word), |
|
65 |
# warns and returns Check_ALT_$1 if spaces |
|
66 |
define AltCheckSpaces |
|
67 |
$(if $(word 2,$($1)),$(warning "WARNING: Value of $1 contains a space: '$($1)', check or set ALT_$1")Check_ALT_$1,$($1)) |
|
68 |
endef |
|
69 |
||
70 |
# Checks an ALT value for empty, warns and returns Check_ALT_$1 if empty |
|
71 |
define AltCheckValue |
|
72 |
$(if $($1),$($1),$(warning "WARNING: Value of $1 cannot be empty, check or set ALT_$1")Check_ALT_$1) |
|
73 |
endef |
|
74 |
||
75 |
# Checks any value for empty, warns and returns $2 if empty |
|
76 |
define CheckValue |
|
77 |
$(if $($1),$($1),$(warning "WARNING: Value of $1 cannot be empty, will use '$2'")$2) |
|
78 |
endef |
|
79 |
||
80 |
# Prefix for a utility prefix path, if empty leave alone, otherwise end with a / |
|
81 |
define PrefixPath |
|
82 |
$(if $1,$(subst //,/,$1/),) |
|
83 |
endef |
|
84 |
||
85 |
# Select a directory if it exists, or the alternate 2 or the alternate 3 |
|
86 |
define DirExists |
|
87 |
$(shell \ |
|
88 |
if [ -d "$1" ]; then \ |
|
89 |
echo "$1"; \ |
|
90 |
elif [ -d "$2" ]; then \ |
|
91 |
echo "$2"; \ |
|
92 |
else \ |
|
93 |
echo "$3"; \ |
|
94 |
fi) |
|
95 |
endef |
|
96 |
||
97 |
# Select a writable directory if it exists and is writable, or the alternate |
|
98 |
define WriteDirExists |
|
99 |
$(shell \ |
|
100 |
if [ -d "$1" -a -w "$1" ]; then \ |
|
101 |
echo "$1"; \ |
|
102 |
else \ |
|
103 |
echo "$2"; \ |
|
104 |
fi) |
|
105 |
endef |
|
106 |
||
107 |
# Select a file if it exists, or the alternate 1, or the alternate 2 |
|
108 |
define FileExists |
|
109 |
$(shell \ |
|
110 |
if [ -r "$1" ]; then \ |
|
111 |
echo "$1"; \ |
|
112 |
elif [ -r "$2" ]; then \ |
|
113 |
echo "$2"; \ |
|
114 |
else \ |
|
115 |
echo "NO_FILE_EXISTS"; \ |
|
116 |
fi) |
|
117 |
endef |
|
118 |
||
119 |
# Given a line of text, get the major.minor version number from it |
|
120 |
define GetVersion |
|
121 |
$(shell echo $1 | sed -e 's@[^1-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*@\1@' ) |
|
122 |
endef |
|
123 |
||
124 |
# Given a major.minor.micro version, return the major, minor, or micro number |
|
125 |
define MajorVersion |
|
126 |
$(if $(word 1, $(subst ., ,$1)),$(word 1, $(subst ., ,$1)),0) |
|
127 |
endef |
|
128 |
define MinorVersion |
|
129 |
$(if $(word 2, $(subst ., ,$1)),$(word 2, $(subst ., ,$1)),0) |
|
130 |
endef |
|
131 |
define MicroVersion |
|
132 |
$(if $(word 3, $(subst ., ,$1)),$(word 3, $(subst ., ,$1)),0) |
|
133 |
endef |
|
134 |
||
135 |
# Macro that returns missing, same, newer, or older $1=version $2=required |
|
136 |
# (currently does not check the micro number) |
|
137 |
define CheckVersions |
|
138 |
$(shell \ |
|
139 |
if [ "$1" = "" -o "$2" = "" ]; then \ |
|
140 |
echo missing; \ |
|
141 |
else \ |
|
142 |
if [ "$1" = "$2" ]; then \ |
|
143 |
echo same; \ |
|
144 |
else \ |
|
145 |
if [ $(call MajorVersion,$1) -lt $(call MajorVersion,$2) ] ; then \ |
|
146 |
echo older; \ |
|
147 |
else \ |
|
148 |
if [ $(call MajorVersion,$1) -eq $(call MajorVersion,$2) -a \ |
|
149 |
$(call MinorVersion,$1) -lt $(call MinorVersion,$2) ]; then \ |
|
150 |
echo older; \ |
|
151 |
else \ |
|
152 |
echo newer; \ |
|
153 |
fi; \ |
|
154 |
fi; \ |
|
155 |
fi; \ |
|
156 |
fi) |
|
157 |
endef |
|
158 |
||
159 |
# Make sure certain variables are non-empty at this point |
|
160 |
_check_values:=\ |
|
161 |
$(call CheckValue,ARCH,),\ |
|
162 |
$(call CheckValue,ARCH_DATA_MODEL,),\ |
|
163 |
$(call CheckValue,ARCH_VM_SUBDIR,),\ |
|
164 |
$(call CheckValue,JDK_TOPDIR,),\ |
|
165 |
$(call CheckValue,JDK_MAKE_SHARED_DIR,),\ |
|
166 |
$(call CheckValue,VARIANT,),\ |
|
167 |
$(call CheckValue,PLATFORM,) |
|
168 |
||
169 |
# Misc common settings for all workspaces |
|
170 |
# This determines the version of the product, and the previous version or boot |
|
171 |
ifndef JDK_MAJOR_VERSION |
|
172 |
JDK_MAJOR_VERSION = 1 |
|
173 |
PREVIOUS_MAJOR_VERSION = 1 |
|
174 |
endif |
|
175 |
||
176 |
ifndef JDK_MINOR_VERSION |
|
177 |
JDK_MINOR_VERSION = 7 |
|
178 |
PREVIOUS_MINOR_VERSION = 6 |
|
179 |
endif |
|
180 |
||
181 |
ifndef JDK_MICRO_VERSION |
|
182 |
JDK_MICRO_VERSION = 0 |
|
183 |
PREVIOUS_MICRO_VERSION = 0 |
|
184 |
endif |
|
185 |
||
186 |
ifndef MILESTONE |
|
187 |
MILESTONE = internal |
|
188 |
endif |
|
189 |
||
190 |
# Default names |
|
191 |
LAUNCHER_NAME = java |
|
192 |
PRODUCT_NAME = Java(TM) |
|
193 |
PRODUCT_SUFFIX = SE Runtime Environment |
|
194 |
COMPANY_NAME = Sun Microsystems, Inc. |
|
195 |
||
196 |
ifdef OPENJDK |
|
197 |
LAUNCHER_NAME = openjdk |
|
198 |
PRODUCT_NAME = OpenJDK |
|
199 |
PRODUCT_SUFFIX = Runtime Environment |
|
200 |
COMPANY_NAME = |
|
201 |
endif |
|
202 |
||
203 |
RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX) |
|
204 |
||
205 |
ifndef BUILD_NUMBER |
|
206 |
JDK_BUILD_NUMBER = b00 |
|
207 |
else |
|
208 |
ifndef JDK_BUILD_NUMBER |
|
209 |
JDK_BUILD_NUMBER = $(BUILD_NUMBER) |
|
210 |
endif |
|
211 |
endif |
|
212 |
||
213 |
# Default variant is the optimized version of everything |
|
214 |
# can be OPT or DBG, default is OPT |
|
215 |
# Determine the extra pattern to add to the release name for debug/fastdebug. |
|
216 |
# Determine the JDK_IMPORT_VARIANT, so we get the right VM files copied over. |
|
217 |
# Determine suffix for obj directory or OBJDIR, for .o files. |
|
218 |
# (by keeping .o files separate, just .o files, they don't clobber each |
|
219 |
# other, however, the library files will clobber each other). |
|
220 |
# |
|
221 |
ifeq ($(VARIANT), DBG) |
|
222 |
BUILD_VARIANT_RELEASE=-debug |
|
223 |
OBJDIRNAME_SUFFIX=_g |
|
224 |
else |
|
225 |
BUILD_VARIANT_RELEASE= |
|
226 |
OBJDIRNAME_SUFFIX= |
|
227 |
endif |
|
228 |
ifeq ($(FASTDEBUG), true) |
|
229 |
VARIANT=DBG |
|
230 |
BUILD_VARIANT_RELEASE=-fastdebug |
|
231 |
OBJDIRNAME_SUFFIX=_gO |
|
232 |
_JDK_IMPORT_VARIANT=/fastdebug |
|
233 |
endif |
|
234 |
||
235 |
# Depending on the flavor of the build, add a -debug or -fastdebug to the name |
|
236 |
ifdef DEBUG_NAME |
|
237 |
BUILD_VARIANT_RELEASE=-$(DEBUG_NAME) |
|
238 |
endif |
|
239 |
||
240 |
# These default values are redefined during a release build. |
|
241 |
# CTE can set JDK_UPDATE_VERSION during the update release |
|
242 |
ifdef JDK_UPDATE_VERSION |
|
243 |
JDK_VERSION = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)_$(JDK_UPDATE_VERSION) |
|
244 |
MARKETING_NUMBER := $(shell \ |
|
245 |
$(ECHO) $(JDK_UPDATE_VERSION) | $(NAWK) '{if (substr($$0,1,1)=="0") print substr($$0, 2); else print $$0;}') |
|
246 |
MARKET_NAME= $(shell $(ECHO) " Update $(MARKETING_NUMBER)") |
|
247 |
JDK_MKTG_VERSION = $(JDK_MINOR_VERSION)u$(MARKETING_NUMBER) |
|
248 |
else |
|
249 |
JDK_VERSION = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION) |
|
250 |
JDK_MKTG_VERSION = $(JDK_MINOR_VERSION) |
|
251 |
MARKET_NAME= |
|
252 |
endif |
|
253 |
JDK_UNDERSCORE_VERSION = $(subst .,_,$(JDK_VERSION)) |
|
254 |
JDK_MKTG_UNDERSCORE_VERSION = $(subst .,_,$(JDK_MKTG_VERSION)) |
|
255 |
||
256 |
# RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set |
|
257 |
ifneq ($(MILESTONE),fcs) |
|
258 |
RELEASE = $(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE) |
|
259 |
else |
|
260 |
RELEASE = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE) |
|
261 |
endif |
|
262 |
||
263 |
# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set |
|
264 |
ifdef BUILD_NUMBER |
|
265 |
FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER) |
|
266 |
else |
|
267 |
BUILD_NUMBER = b00 |
|
268 |
USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`) |
|
269 |
FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER) |
|
270 |
endif |
|
271 |
||
272 |
# Promoted build location |
|
273 |
PROMOTED_RE_AREA = $(SLASH_JAVA)/re/jdk/$(JDK_VERSION)/promoted |
|
274 |
PROMOTED_BUILD_LATEST = latest |
|
275 |
PROMOTED_BUILD_BASEDIR = $(PROMOTED_RE_AREA)/$(PROMOTED_BUILD_LATEST) |
|
276 |
PROMOTED_BUILD_BINARIES = $(PROMOTED_BUILD_BASEDIR)/binaries |
|
277 |
||
278 |
# OPT: Changes what the optimizations settings (in _OPT) |
|
279 |
POPT = $(_OPT$(ALT_OPT))$(ALT_OPT) |
|
280 |
||
281 |
# PARALLEL_COMPILE_JOBS: is the number of compiles done in parallel. |
|
282 |
# If the user sets ALT_PARALLEL_COMPILE_JOBS, then COMPILE_APPROACH is set |
|
283 |
# to parallel. |
|
284 |
# |
|
285 |
# Recommended setting: 2 seems to be ideal for single cpu machines, |
|
286 |
# 2 times the number of CPU's is a basic formula, |
|
287 |
# but probably not more than 4 if the machine is |
|
288 |
# being shared by others, or the machine is limited |
|
289 |
# in RAM or swap. |
|
290 |
# |
|
291 |
ifdef ALT_PARALLEL_COMPILE_JOBS |
|
292 |
PARALLEL_COMPILE_JOBS=$(ALT_PARALLEL_COMPILE_JOBS) |
|
293 |
else |
|
294 |
PARALLEL_COMPILE_JOBS=2 |
|
295 |
endif |
|
296 |
||
297 |
# Previous JDK release (version of BOOTDIR version) |
|
298 |
ifdef ALT_PREVIOUS_JDK_VERSION |
|
299 |
PREVIOUS_JDK_VERSION = $(ALT_PREVIOUS_JDK_VERSION) |
|
300 |
else |
|
301 |
PREVIOUS_JDK_VERSION = $(PREVIOUS_MAJOR_VERSION).$(PREVIOUS_MINOR_VERSION).$(PREVIOUS_MICRO_VERSION) |
|
302 |
endif |
|
303 |
export PREVIOUS_JDK_VERSION |
|
304 |
PREVIOUS_JDK_VERSION:=$(call AltCheckSpaces,PREVIOUS_JDK_VERSION) |
|
305 |
PREVIOUS_JDK_VERSION:=$(call AltCheckValue,PREVIOUS_JDK_VERSION) |
|
306 |
||
307 |
# Version with _ instead of . in number |
|
308 |
ifeq ($(PREVIOUS_MINOR_VERSION),5) |
|
309 |
PREVIOUS_JDK_UNDERSCORE_VERSION = $(subst .,_,$(PREVIOUS_JDK_VERSION)) |
|
310 |
else |
|
311 |
PREVIOUS_JDK_UNDERSCORE_VERSION = $(PREVIOUS_MINOR_VERSION) |
|
312 |
endif |
|
313 |
||
314 |
# Include any private definitions for this set of workspaces |
|
315 |
_PRIVATE_DEFS_FILE=$(JDK_MAKE_SHARED_DIR)/PrivateDefs.gmk |
|
316 |
USING_PRIVATE_DEFS:=$(shell if [ -f $(_PRIVATE_DEFS_FILE) ]; then echo true; else echo false; fi) |
|
317 |
ifeq ($(USING_PRIVATE_DEFS),true) |
|
318 |
dummy:=$(warning "WARNING: Using definitions from $(_PRIVATE_DEFS_FILE)") |
|
319 |
include $(_PRIVATE_DEFS_FILE) |
|
320 |
endif |
|
321 |
||
322 |
# Get platform specific settings |
|
323 |
include $(JDK_MAKE_SHARED_DIR)/Defs-$(PLATFORM).gmk |
|
324 |
||
325 |
# Components |
|
326 |
ifdef ALT_LANGTOOLS_DIST |
|
327 |
LANGTOOLS_DIST :=$(call FullPath,$(ALT_LANGTOOLS_DIST)) |
|
328 |
else |
|
329 |
LANGTOOLS_DIST = |
|
330 |
endif |
|
331 |
ifdef ALT_CORBA_DIST |
|
332 |
CORBA_DIST :=$(call FullPath,$(ALT_CORBA_DIST)) |
|
333 |
else |
|
334 |
CORBA_DIST = |
|
335 |
endif |
|
336 |
ifdef ALT_JAXP_DIST |
|
337 |
JAXP_DIST :=$(call FullPath,$(ALT_JAXP_DIST)) |
|
338 |
else |
|
339 |
JAXP_DIST = |
|
340 |
endif |
|
341 |
ifdef ALT_JAXWS_DIST |
|
342 |
JAXWS_DIST :=$(call FullPath,$(ALT_JAXWS_DIST)) |
|
343 |
else |
|
344 |
JAXWS_DIST = |
|
345 |
endif |
|
346 |
||
347 |
# HOTSPOT_DOCS_IMPORT_PATH: Path to hotspot docs files to import into the docs generation |
|
348 |
ifdef ALT_HOTSPOT_DOCS_IMPORT_PATH |
|
349 |
HOTSPOT_DOCS_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_DOCS_IMPORT_PATH)) |
|
350 |
else |
|
351 |
HOTSPOT_DOCS_IMPORT_PATH :=$(call DirExists,$(HOTSPOT_IMPORT_PATH)/docs,$(PROMOTED_BUILD_BASEDIR)/docs,/NO_DOCS_DIR) |
|
352 |
endif |
|
353 |
||
354 |
# PREVIOUS_JDK_FILE: filename of install bundle for previous JDK |
|
355 |
ifdef ALT_PREVIOUS_JDK_FILE |
|
356 |
PREVIOUS_JDK_FILE =$(ALT_PREVIOUS_JDK_FILE) |
|
357 |
else |
|
358 |
PREVIOUS_JDK_FILE = jdk-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH)$(BUNDLE_FILE_SUFFIX) |
|
359 |
endif |
|
360 |
export PREVIOUS_JDK_FILE |
|
361 |
PREVIOUS_JDK_FILE:=$(call AltCheckSpaces,PREVIOUS_JDK_FILE) |
|
362 |
PREVIOUS_JDK_FILE:=$(call AltCheckValue,PREVIOUS_JDK_FILE) |
|
363 |
||
364 |
# PREVIOUS_JRE_FILE: filename of install bundle for previous JRE |
|
365 |
ifdef ALT_PREVIOUS_JRE_FILE |
|
366 |
PREVIOUS_JRE_FILE =$(ALT_PREVIOUS_JRE_FILE) |
|
367 |
else |
|
368 |
PREVIOUS_JRE_FILE = jre-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH)$(BUNDLE_FILE_SUFFIX) |
|
369 |
endif |
|
370 |
export PREVIOUS_JRE_FILE |
|
371 |
PREVIOUS_JRE_FILE:=$(call AltCheckSpaces,PREVIOUS_JRE_FILE) |
|
372 |
PREVIOUS_JRE_FILE:=$(call AltCheckValue,PREVIOUS_JRE_FILE) |
|
373 |
||
374 |
# Set here as shared variables |
|
375 |
PREVIOUS_JRE_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JRE_FILE) |
|
376 |
PREVIOUS_JDK_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JDK_FILE) |
|
377 |
||
378 |
# These are the same on all platforms but require the above platform include 1st |
|
379 |
||
380 |
# BOOTDIR: Bootstrap JDK, previous released JDK. |
|
381 |
# _BOOTDIR1 and _BOOTDIR2 picked by platform |
|
382 |
ifdef ALT_BOOTDIR |
|
383 |
BOOTDIR =$(ALT_BOOTDIR) |
|
384 |
else |
|
385 |
BOOTDIR :=$(call DirExists,$(_BOOTDIR1),$(_BOOTDIR2),/NO_BOOTDIR) |
|
386 |
endif |
|
387 |
export BOOTDIR |
|
388 |
BOOTDIR:=$(call AltCheckSpaces,BOOTDIR) |
|
389 |
BOOTDIR:=$(call AltCheckValue,BOOTDIR) |
|
390 |
||
391 |
# PREVIOUS_RELEASE_PATH: path to where previous release bundles are |
|
392 |
ifdef ALT_PREVIOUS_RELEASE_PATH |
|
393 |
PREVIOUS_RELEASE_PATH :=$(call OptFullPath,$(ALT_PREVIOUS_RELEASE_PATH)) |
|
394 |
else |
|
395 |
PREVIOUS_RELEASE_PATH =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/bundles/$(PLATFORM)-$(ARCH) |
|
396 |
endif |
|
397 |
export PREVIOUS_RELEASE_PATH |
|
398 |
PREVIOUS_RELEASE_PATH:=$(call AltCheckSpaces,PREVIOUS_RELEASE_PATH) |
|
399 |
PREVIOUS_RELEASE_PATH:=$(call AltCheckValue,PREVIOUS_RELEASE_PATH) |
|
400 |
||
401 |
# PREVIOUS_RELEASE_IMAGE: Previous install image to compare against |
|
402 |
ifdef ALT_PREVIOUS_RELEASE_IMAGE |
|
403 |
PREVIOUS_RELEASE_IMAGE :=$(call FullPath,$(ALT_PREVIOUS_RELEASE_IMAGE)) |
|
404 |
endif |
|
405 |
||
406 |
# CACERTS_FILE: if OPENJDK is false and the internal version of the file |
|
407 |
# (that is, non-empty) is available, use it, otherwise use an |
|
408 |
# empty keystore. |
|
409 |
# |
|
410 |
# We put this variable here for sanity checks and in case another |
|
411 |
# components will need to know which cacerts file is being used. |
|
412 |
# |
|
413 |
ifdef ALT_CACERTS_FILE |
|
414 |
CACERTS_FILE = $(ALT_CACERTS_FILE) |
|
415 |
else |
|
416 |
CACERTS_EXT = $(SHARE_SRC)/lib/security/cacerts |
|
417 |
ifdef OPENJDK |
|
418 |
CACERTS_FILE :=$(CACERTS_EXT) |
|
419 |
else # (!OPENJDK) |
|
420 |
CACERTS_INT = $(CLOSED_SHARE_SRC)/lib/security/cacerts.internal |
|
421 |
CACERTS_FILE :=$(call FileExists,$(CACERTS_INT),$(CACERTS_EXT)) |
|
422 |
endif # (OPENJDK) |
|
423 |
endif |
|
424 |
CACERTS_FILE:=$(call AltCheckSpaces,CACERTS_FILE) |
|
425 |
CACERTS_FILE:=$(call AltCheckValue,CACERTS_FILE) |
|
426 |
||
427 |
# OUTPUTDIR: Location of all output for the build |
|
428 |
ifdef ALT_OUTPUTDIR |
|
33
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
429 |
OUTPUTDIR:=$(subst \,/,$(ALT_OUTPUTDIR)) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
430 |
# Assumes this is absolute (checks later) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
431 |
ABS_OUTPUTDIR:=$(OUTPUTDIR) |
2 | 432 |
else |
433 |
ifndef _OUTPUTDIR |
|
33
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
434 |
# Default: Get "build" parent directory, which should always exist |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
435 |
ifndef BUILD_PARENT_DIRECTORY |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
436 |
BUILD_PARENT_DIRECTORY=$(BUILDDIR)/.. |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
437 |
endif |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
438 |
ABS_BUILD_PARENT_DIRECTORY:=$(call FullPath,$(BUILD_PARENT_DIRECTORY)) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
439 |
ifdef OPENJDK |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
440 |
_OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)$(OPENJDK_SUFFIX) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
441 |
else |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
442 |
_OUTPUTDIRNAME=$(PLATFORM)-$(ARCH) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
443 |
endif |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
444 |
_OUTPUTDIR=$(BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
445 |
ABS_OUTPUTDIR:=$(ABS_BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME) |
2 | 446 |
endif |
33
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
447 |
OUTPUTDIR:=$(_OUTPUTDIR) |
2 | 448 |
endif |
33
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
449 |
# Check for spaces and null value |
2 | 450 |
OUTPUTDIR:=$(call AltCheckSpaces,OUTPUTDIR) |
451 |
OUTPUTDIR:=$(call AltCheckValue,OUTPUTDIR) |
|
33
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
452 |
# Create the output directory and make sure it exists and is writable |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
453 |
_create_outputdir:=$(shell $(MKDIR) -p "$(OUTPUTDIR)" > $(DEV_NULL) 2>&1) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
454 |
ifeq ($(call WriteDirExists,$(OUTPUTDIR),/dev/null),/dev/null) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
455 |
_outputdir_error:=$(error "ERROR: OUTPUTDIR '$(OUTPUTDIR)' not created or not writable") |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
456 |
endif |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
457 |
# Define absolute path if needed and check for spaces and null value |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
458 |
ifndef ABS_OUTPUTDIR |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
459 |
ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR)) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
460 |
endif |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
461 |
ABS_OUTPUTDIR:=$(call AltCheckSpaces,ABS_OUTPUTDIR) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
462 |
ABS_OUTPUTDIR:=$(call AltCheckValue,ABS_OUTPUTDIR) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
463 |
# Make doubly sure this is a full path |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
464 |
ifeq ($(call AbsPwdPathCheck,$(ABS_OUTPUTDIR)), ) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
465 |
ifdef ALT_OUTPUTDIR |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
466 |
_outputdir_error:=$(error "ERROR: Trouble with the absolute path for OUTPUTDIR '$(OUTPUTDIR)', was ALT_OUTPUTDIR '$(ALT_OUTPUTDIR)' an absolute path?") |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
467 |
else |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
468 |
_outputdir_error:=$(error "ERROR: Trouble with the absolute path for OUTPUTDIR '$(OUTPUTDIR)'") |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
469 |
endif |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
470 |
endif |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
471 |
_dir1:=$(call FullPath,$(ABS_OUTPUTDIR)) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
472 |
_dir2:=$(call FullPath,$(OUTPUTDIR)) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
473 |
ifneq ($(_dir1),$(_dir2)) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
474 |
_outputdir_error:=$(error "ERROR: ABS_OUTPUTDIR '$(ABS_OUTPUTDIR)' is not the same directory as OUTPUTDIR '$(OUTPUTDIR)', '$(_dir1)'!='$(_dir2)'") |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
475 |
endif |
2 | 476 |
|
477 |
# Bin directory |
|
478 |
# NOTE: ISA_DIR is usually empty, on Solaris it might be /sparcv9 or /amd64 |
|
479 |
BINDIR = $(OUTPUTDIR)/bin$(ISA_DIR) |
|
480 |
||
481 |
# MOZILLA_HEADERS_PATH: path to mozilla header files for plugin |
|
482 |
ifdef ALT_MOZILLA_HEADERS_PATH |
|
483 |
MOZILLA_HEADERS_PATH :=$(call FullPath,$(ALT_MOZILLA_HEADERS_PATH)) |
|
484 |
else |
|
485 |
MOZILLA_HEADERS_PATH =$(JDK_DEVTOOLS_DIR)/share/plugin |
|
486 |
endif |
|
487 |
MOZILLA_HEADERS_PATH:=$(call AltCheckSpaces,MOZILLA_HEADERS_PATH) |
|
488 |
MOZILLA_HEADERS_PATH:=$(call AltCheckValue,MOZILLA_HEADERS_PATH) |
|
489 |
||
490 |
# CUPS_HEADERS_PATH: path to Cups headers files for Unix printing |
|
491 |
ifneq ($(PLATFORM), windows) |
|
492 |
JDK_CUPS_HEADERS_PATH=$(JDK_DEVTOOLS_DIR)/share/cups/include |
|
493 |
ifdef ALT_CUPS_HEADERS_PATH |
|
494 |
CUPS_HEADERS_PATH:=$(call FullPath,$(ALT_CUPS_HEADERS_PATH)) |
|
495 |
CUP_HEADERS_PATH:=$(call AltCheckValue,CUPS_HEADERS_PATH) |
|
496 |
else |
|
497 |
CUPS_HEADERS_PATH:= \ |
|
498 |
$(shell if [ -d "$(JDK_CUPS_HEADERS_PATH)" ]; then \ |
|
499 |
echo "$(JDK_CUPS_HEADERS_PATH)"; \ |
|
500 |
else \ |
|
501 |
echo "$(_CUPS_HEADERS_PATH)";\ |
|
502 |
fi) |
|
503 |
endif |
|
504 |
endif |
|
505 |
||
506 |
ifdef ALT_COPYRIGHT_YEAR |
|
507 |
COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR) |
|
508 |
else |
|
509 |
COPYRIGHT_YEAR = $(shell $(DATE) '+%Y') |
|
510 |
endif |
|
511 |
||
512 |
# Get shared compiler settings |
|
513 |
include $(JDK_MAKE_SHARED_DIR)/Compiler.gmk |
|
514 |