author | never |
Mon, 12 Jul 2010 22:27:18 -0700 | |
changeset 5926 | a36f90d986b6 |
parent 5552 | bca3be14c8bd |
child 6310 | 8affde0eeeb4 |
permissions | -rw-r--r-- |
2 | 1 |
# |
5506 | 2 |
# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
# |
|
5506 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
2 | 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 |
||
2806
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
97 |
# Select a directory if it exists, or the alternate 2, or the alternate 3, or the alternate 4 |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
98 |
define DirExists4 |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
99 |
$(shell \ |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
100 |
if [ -d "$1" ]; then \ |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
101 |
echo "$1"; \ |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
102 |
elif [ -d "$2" ]; then \ |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
103 |
echo "$2"; \ |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
104 |
elif [ -d "$3" ]; then \ |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
105 |
echo "$3"; \ |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
106 |
else \ |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
107 |
echo "$4"; \ |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
108 |
fi) |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
109 |
endef |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
110 |
|
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
111 |
|
2 | 112 |
# Select a writable directory if it exists and is writable, or the alternate |
113 |
define WriteDirExists |
|
114 |
$(shell \ |
|
115 |
if [ -d "$1" -a -w "$1" ]; then \ |
|
116 |
echo "$1"; \ |
|
117 |
else \ |
|
118 |
echo "$2"; \ |
|
119 |
fi) |
|
120 |
endef |
|
121 |
||
122 |
# Select a file if it exists, or the alternate 1, or the alternate 2 |
|
123 |
define FileExists |
|
124 |
$(shell \ |
|
125 |
if [ -r "$1" ]; then \ |
|
126 |
echo "$1"; \ |
|
127 |
elif [ -r "$2" ]; then \ |
|
128 |
echo "$2"; \ |
|
129 |
else \ |
|
130 |
echo "NO_FILE_EXISTS"; \ |
|
131 |
fi) |
|
132 |
endef |
|
133 |
||
2158
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
134 |
# Given a line of text, get the version number from it |
2 | 135 |
define GetVersion |
2158
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
136 |
$(shell echo $1 | sed -e 's@[^0-9]*\([0-9][0-9]*\.[0-9][.0-9]*\).*@\1@' ) |
2 | 137 |
endef |
138 |
||
139 |
# Given a major.minor.micro version, return the major, minor, or micro number |
|
140 |
define MajorVersion |
|
141 |
$(if $(word 1, $(subst ., ,$1)),$(word 1, $(subst ., ,$1)),0) |
|
142 |
endef |
|
143 |
define MinorVersion |
|
144 |
$(if $(word 2, $(subst ., ,$1)),$(word 2, $(subst ., ,$1)),0) |
|
145 |
endef |
|
146 |
define MicroVersion |
|
147 |
$(if $(word 3, $(subst ., ,$1)),$(word 3, $(subst ., ,$1)),0) |
|
148 |
endef |
|
149 |
||
150 |
# Macro that returns missing, same, newer, or older $1=version $2=required |
|
151 |
define CheckVersions |
|
152 |
$(shell \ |
|
153 |
if [ "$1" = "" -o "$2" = "" ]; then \ |
|
154 |
echo missing; \ |
|
2158
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
155 |
elif [ "$1" = "$2" ]; then \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
156 |
echo same; \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
157 |
elif [ $(call MajorVersion,$1) -lt $(call MajorVersion,$2) ] ; then \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
158 |
echo older; \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
159 |
elif [ $(call MajorVersion,$1) -gt $(call MajorVersion,$2) ] ; then \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
160 |
echo newer; \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
161 |
elif [ $(call MinorVersion,$1) -lt $(call MinorVersion,$2) ]; then \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
162 |
echo older; \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
163 |
elif [ $(call MinorVersion,$1) -gt $(call MinorVersion,$2) ]; then \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
164 |
echo newer; \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
165 |
elif [ $(call MicroVersion,$1) -lt $(call MicroVersion,$2) ]; then \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
166 |
echo older; \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
167 |
elif [ $(call MicroVersion,$1) -gt $(call MicroVersion,$2) ]; then \ |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
168 |
echo newer; \ |
2 | 169 |
else \ |
2158
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
170 |
echo same; \ |
2 | 171 |
fi) |
172 |
endef |
|
173 |
||
174 |
# Make sure certain variables are non-empty at this point |
|
175 |
_check_values:=\ |
|
176 |
$(call CheckValue,ARCH,),\ |
|
177 |
$(call CheckValue,ARCH_DATA_MODEL,),\ |
|
178 |
$(call CheckValue,ARCH_VM_SUBDIR,),\ |
|
179 |
$(call CheckValue,JDK_TOPDIR,),\ |
|
180 |
$(call CheckValue,JDK_MAKE_SHARED_DIR,),\ |
|
181 |
$(call CheckValue,VARIANT,),\ |
|
182 |
$(call CheckValue,PLATFORM,) |
|
183 |
||
184 |
# Misc common settings for all workspaces |
|
185 |
# This determines the version of the product, and the previous version or boot |
|
186 |
ifndef JDK_MAJOR_VERSION |
|
187 |
JDK_MAJOR_VERSION = 1 |
|
188 |
PREVIOUS_MAJOR_VERSION = 1 |
|
189 |
endif |
|
190 |
||
191 |
ifndef JDK_MINOR_VERSION |
|
192 |
JDK_MINOR_VERSION = 7 |
|
193 |
PREVIOUS_MINOR_VERSION = 6 |
|
194 |
endif |
|
195 |
||
196 |
ifndef JDK_MICRO_VERSION |
|
197 |
JDK_MICRO_VERSION = 0 |
|
198 |
PREVIOUS_MICRO_VERSION = 0 |
|
199 |
endif |
|
200 |
||
201 |
ifndef MILESTONE |
|
202 |
MILESTONE = internal |
|
203 |
endif |
|
204 |
||
205 |
# Default names |
|
206 |
ifdef OPENJDK |
|
207 |
LAUNCHER_NAME = openjdk |
|
208 |
PRODUCT_NAME = OpenJDK |
|
209 |
PRODUCT_SUFFIX = Runtime Environment |
|
847 | 210 |
JDK_RC_PLATFORM_NAME = Platform |
211 |
COMPANY_NAME = N/A |
|
212 |
else |
|
213 |
LAUNCHER_NAME = java |
|
214 |
PRODUCT_NAME = Java(TM) |
|
215 |
PRODUCT_SUFFIX = SE Runtime Environment |
|
216 |
JDK_RC_PLATFORM_NAME = Platform SE |
|
5552 | 217 |
COMPANY_NAME = Oracle |
2 | 218 |
endif |
219 |
||
220 |
RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX) |
|
221 |
||
222 |
ifndef BUILD_NUMBER |
|
223 |
JDK_BUILD_NUMBER = b00 |
|
224 |
else |
|
225 |
ifndef JDK_BUILD_NUMBER |
|
226 |
JDK_BUILD_NUMBER = $(BUILD_NUMBER) |
|
227 |
endif |
|
228 |
endif |
|
229 |
||
230 |
# Default variant is the optimized version of everything |
|
231 |
# can be OPT or DBG, default is OPT |
|
232 |
# Determine the extra pattern to add to the release name for debug/fastdebug. |
|
233 |
# Determine the JDK_IMPORT_VARIANT, so we get the right VM files copied over. |
|
234 |
# Determine suffix for obj directory or OBJDIR, for .o files. |
|
235 |
# (by keeping .o files separate, just .o files, they don't clobber each |
|
236 |
# other, however, the library files will clobber each other). |
|
237 |
# |
|
238 |
ifeq ($(VARIANT), DBG) |
|
239 |
BUILD_VARIANT_RELEASE=-debug |
|
240 |
OBJDIRNAME_SUFFIX=_g |
|
241 |
else |
|
242 |
BUILD_VARIANT_RELEASE= |
|
243 |
OBJDIRNAME_SUFFIX= |
|
244 |
endif |
|
245 |
ifeq ($(FASTDEBUG), true) |
|
246 |
VARIANT=DBG |
|
247 |
BUILD_VARIANT_RELEASE=-fastdebug |
|
248 |
OBJDIRNAME_SUFFIX=_gO |
|
249 |
_JDK_IMPORT_VARIANT=/fastdebug |
|
250 |
endif |
|
251 |
||
252 |
# Depending on the flavor of the build, add a -debug or -fastdebug to the name |
|
253 |
ifdef DEBUG_NAME |
|
254 |
BUILD_VARIANT_RELEASE=-$(DEBUG_NAME) |
|
255 |
endif |
|
256 |
||
257 |
# These default values are redefined during a release build. |
|
258 |
# CTE can set JDK_UPDATE_VERSION during the update release |
|
259 |
ifdef JDK_UPDATE_VERSION |
|
260 |
JDK_VERSION = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)_$(JDK_UPDATE_VERSION) |
|
261 |
MARKETING_NUMBER := $(shell \ |
|
262 |
$(ECHO) $(JDK_UPDATE_VERSION) | $(NAWK) '{if (substr($$0,1,1)=="0") print substr($$0, 2); else print $$0;}') |
|
263 |
MARKET_NAME= $(shell $(ECHO) " Update $(MARKETING_NUMBER)") |
|
264 |
JDK_MKTG_VERSION = $(JDK_MINOR_VERSION)u$(MARKETING_NUMBER) |
|
265 |
else |
|
266 |
JDK_VERSION = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION) |
|
267 |
JDK_MKTG_VERSION = $(JDK_MINOR_VERSION) |
|
268 |
MARKET_NAME= |
|
269 |
endif |
|
270 |
JDK_UNDERSCORE_VERSION = $(subst .,_,$(JDK_VERSION)) |
|
271 |
JDK_MKTG_UNDERSCORE_VERSION = $(subst .,_,$(JDK_MKTG_VERSION)) |
|
272 |
||
273 |
# RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set |
|
274 |
ifneq ($(MILESTONE),fcs) |
|
275 |
RELEASE = $(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE) |
|
276 |
else |
|
277 |
RELEASE = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE) |
|
278 |
endif |
|
279 |
||
280 |
# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set |
|
281 |
ifdef BUILD_NUMBER |
|
282 |
FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER) |
|
283 |
else |
|
284 |
BUILD_NUMBER = b00 |
|
307
18015b31ef73
6501543: Username can have non-alphanumeric characters
ohair
parents:
140
diff
changeset
|
285 |
BUILD_DATE := $(shell $(DATE) '+%Y_%m_%d_%H_%M') |
18015b31ef73
6501543: Username can have non-alphanumeric characters
ohair
parents:
140
diff
changeset
|
286 |
CLEAN_USERNAME := $(shell $(ECHO) "$(USER)" | $(TR) -d -c '[:alnum:]') |
18015b31ef73
6501543: Username can have non-alphanumeric characters
ohair
parents:
140
diff
changeset
|
287 |
USER_RELEASE_SUFFIX := $(shell $(ECHO) "$(CLEAN_USERNAME)_$(BUILD_DATE)" | $(TR) '[:upper:]' '[:lower:]' ) |
2 | 288 |
FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER) |
289 |
endif |
|
290 |
||
291 |
# Promoted build location |
|
292 |
PROMOTED_RE_AREA = $(SLASH_JAVA)/re/jdk/$(JDK_VERSION)/promoted |
|
293 |
PROMOTED_BUILD_LATEST = latest |
|
294 |
PROMOTED_BUILD_BASEDIR = $(PROMOTED_RE_AREA)/$(PROMOTED_BUILD_LATEST) |
|
3111
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2660
diff
changeset
|
295 |
PROMOTED_BUILD_DISTDIR = $(PROMOTED_BUILD_BASEDIR)/dist/$(PLATFORM)-$(ARCH) |
2 | 296 |
PROMOTED_BUILD_BINARIES = $(PROMOTED_BUILD_BASEDIR)/binaries |
297 |
||
298 |
# PARALLEL_COMPILE_JOBS: is the number of compiles done in parallel. |
|
299 |
# If the user sets ALT_PARALLEL_COMPILE_JOBS, then COMPILE_APPROACH is set |
|
300 |
# to parallel. |
|
301 |
# |
|
302 |
# Recommended setting: 2 seems to be ideal for single cpu machines, |
|
303 |
# 2 times the number of CPU's is a basic formula, |
|
304 |
# but probably not more than 4 if the machine is |
|
305 |
# being shared by others, or the machine is limited |
|
306 |
# in RAM or swap. |
|
307 |
# |
|
308 |
ifdef ALT_PARALLEL_COMPILE_JOBS |
|
309 |
PARALLEL_COMPILE_JOBS=$(ALT_PARALLEL_COMPILE_JOBS) |
|
310 |
else |
|
311 |
PARALLEL_COMPILE_JOBS=2 |
|
312 |
endif |
|
313 |
||
314 |
# Previous JDK release (version of BOOTDIR version) |
|
315 |
ifdef ALT_PREVIOUS_JDK_VERSION |
|
316 |
PREVIOUS_JDK_VERSION = $(ALT_PREVIOUS_JDK_VERSION) |
|
317 |
else |
|
318 |
PREVIOUS_JDK_VERSION = $(PREVIOUS_MAJOR_VERSION).$(PREVIOUS_MINOR_VERSION).$(PREVIOUS_MICRO_VERSION) |
|
319 |
endif |
|
320 |
export PREVIOUS_JDK_VERSION |
|
321 |
PREVIOUS_JDK_VERSION:=$(call AltCheckSpaces,PREVIOUS_JDK_VERSION) |
|
322 |
PREVIOUS_JDK_VERSION:=$(call AltCheckValue,PREVIOUS_JDK_VERSION) |
|
323 |
||
324 |
# Version with _ instead of . in number |
|
325 |
ifeq ($(PREVIOUS_MINOR_VERSION),5) |
|
326 |
PREVIOUS_JDK_UNDERSCORE_VERSION = $(subst .,_,$(PREVIOUS_JDK_VERSION)) |
|
327 |
else |
|
328 |
PREVIOUS_JDK_UNDERSCORE_VERSION = $(PREVIOUS_MINOR_VERSION) |
|
329 |
endif |
|
330 |
||
331 |
# Include any private definitions for this set of workspaces |
|
332 |
_PRIVATE_DEFS_FILE=$(JDK_MAKE_SHARED_DIR)/PrivateDefs.gmk |
|
333 |
USING_PRIVATE_DEFS:=$(shell if [ -f $(_PRIVATE_DEFS_FILE) ]; then echo true; else echo false; fi) |
|
334 |
ifeq ($(USING_PRIVATE_DEFS),true) |
|
335 |
dummy:=$(warning "WARNING: Using definitions from $(_PRIVATE_DEFS_FILE)") |
|
336 |
include $(_PRIVATE_DEFS_FILE) |
|
337 |
endif |
|
338 |
||
339 |
# Get platform specific settings |
|
340 |
include $(JDK_MAKE_SHARED_DIR)/Defs-$(PLATFORM).gmk |
|
341 |
||
342 |
# Components |
|
343 |
ifdef ALT_LANGTOOLS_DIST |
|
344 |
LANGTOOLS_DIST :=$(call FullPath,$(ALT_LANGTOOLS_DIST)) |
|
345 |
else |
|
346 |
LANGTOOLS_DIST = |
|
347 |
endif |
|
348 |
ifdef ALT_CORBA_DIST |
|
349 |
CORBA_DIST :=$(call FullPath,$(ALT_CORBA_DIST)) |
|
350 |
else |
|
351 |
CORBA_DIST = |
|
352 |
endif |
|
353 |
ifdef ALT_JAXP_DIST |
|
354 |
JAXP_DIST :=$(call FullPath,$(ALT_JAXP_DIST)) |
|
355 |
else |
|
356 |
JAXP_DIST = |
|
357 |
endif |
|
358 |
ifdef ALT_JAXWS_DIST |
|
359 |
JAXWS_DIST :=$(call FullPath,$(ALT_JAXWS_DIST)) |
|
360 |
else |
|
361 |
JAXWS_DIST = |
|
362 |
endif |
|
363 |
||
364 |
# HOTSPOT_DOCS_IMPORT_PATH: Path to hotspot docs files to import into the docs generation |
|
365 |
ifdef ALT_HOTSPOT_DOCS_IMPORT_PATH |
|
366 |
HOTSPOT_DOCS_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_DOCS_IMPORT_PATH)) |
|
367 |
else |
|
368 |
HOTSPOT_DOCS_IMPORT_PATH :=$(call DirExists,$(HOTSPOT_IMPORT_PATH)/docs,$(PROMOTED_BUILD_BASEDIR)/docs,/NO_DOCS_DIR) |
|
369 |
endif |
|
370 |
||
371 |
# These are the same on all platforms but require the above platform include 1st |
|
372 |
||
373 |
# BOOTDIR: Bootstrap JDK, previous released JDK. |
|
374 |
# _BOOTDIR1 and _BOOTDIR2 picked by platform |
|
2806
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
375 |
# Platform may optionally define _BOOTDIR3 as well. |
2 | 376 |
ifdef ALT_BOOTDIR |
377 |
BOOTDIR =$(ALT_BOOTDIR) |
|
378 |
else |
|
2806
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
379 |
ifdef _BOOTDIR3 |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
380 |
BOOTDIR :=$(call DirExists4,$(_BOOTDIR1),$(_BOOTDIR2),$(_BOOTDIR3),/NO_BOOTDIR) |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
381 |
else |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
382 |
BOOTDIR :=$(call DirExists,$(_BOOTDIR1),$(_BOOTDIR2),/NO_BOOTDIR) |
27edf81ff967
6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents:
2660
diff
changeset
|
383 |
endif |
2 | 384 |
endif |
385 |
export BOOTDIR |
|
386 |
BOOTDIR:=$(call AltCheckSpaces,BOOTDIR) |
|
387 |
BOOTDIR:=$(call AltCheckValue,BOOTDIR) |
|
388 |
||
1161
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
389 |
# PREVIOUS_FCS_RE_AREA: re path to where previous release binaries/bundles are |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
390 |
PREVIOUS_FCS_RE_AREA = $(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs |
2 | 391 |
|
392 |
# PREVIOUS_RELEASE_IMAGE: Previous install image to compare against |
|
393 |
ifdef ALT_PREVIOUS_RELEASE_IMAGE |
|
1161
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
394 |
|
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
395 |
# Explicit image provided, no bundle access needed |
2 | 396 |
PREVIOUS_RELEASE_IMAGE :=$(call FullPath,$(ALT_PREVIOUS_RELEASE_IMAGE)) |
1161
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
397 |
|
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
398 |
else |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
399 |
|
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
400 |
# PREVIOUS_RELEASE_PATH: path to where previous release bundles are |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
401 |
ifdef ALT_PREVIOUS_RELEASE_PATH |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
402 |
PREVIOUS_RELEASE_PATH :=$(call OptFullPath,$(ALT_PREVIOUS_RELEASE_PATH)) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
403 |
else |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
404 |
PREVIOUS_RELEASE_PATH := \ |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
405 |
$(call DirExists,$(PREVIOUS_FCS_RE_AREA)/bundles/$(PLATFORM)-$(ARCH),,) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
406 |
endif |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
407 |
|
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
408 |
# Depending on if we have access to these bundles |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
409 |
ifeq ($(PREVIOUS_RELEASE_PATH),) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
410 |
# Use images in re area or BOOTDIR (which is normally the previous release) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
411 |
PREVIOUS_RELEASE_IMAGE := \ |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
412 |
$(call DirExists,$(PREVIOUS_FCS_RE_AREA)/binaries/$(PLATFORM)-$(ARCH),$(BOOTDIR),) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
413 |
else |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
414 |
# Get names of and paths to bundles |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
415 |
PREVIOUS_RELEASE_PATH:=$(call AltCheckSpaces,PREVIOUS_RELEASE_PATH) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
416 |
PREVIOUS_RELEASE_PATH:=$(call AltCheckValue,PREVIOUS_RELEASE_PATH) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
417 |
export PREVIOUS_RELEASE_PATH |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
418 |
|
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
419 |
# PREVIOUS_JDK_FILE: filename of install bundle for previous JDK |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
420 |
ifdef ALT_PREVIOUS_JDK_FILE |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
421 |
PREVIOUS_JDK_FILE =$(ALT_PREVIOUS_JDK_FILE) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
422 |
else |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
423 |
PREVIOUS_JDK_FILE = \ |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
424 |
jdk-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH)$(BUNDLE_FILE_SUFFIX) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
425 |
endif |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
426 |
export PREVIOUS_JDK_FILE |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
427 |
PREVIOUS_JDK_FILE:=$(call AltCheckSpaces,PREVIOUS_JDK_FILE) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
428 |
PREVIOUS_JDK_FILE:=$(call AltCheckValue,PREVIOUS_JDK_FILE) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
429 |
|
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
430 |
# PREVIOUS_JRE_FILE: filename of install bundle for previous JRE |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
431 |
ifdef ALT_PREVIOUS_JRE_FILE |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
432 |
PREVIOUS_JRE_FILE =$(ALT_PREVIOUS_JRE_FILE) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
433 |
else |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
434 |
PREVIOUS_JRE_FILE = \ |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
435 |
jre-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH)$(BUNDLE_FILE_SUFFIX) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
436 |
endif |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
437 |
export PREVIOUS_JRE_FILE |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
438 |
PREVIOUS_JRE_FILE:=$(call AltCheckSpaces,PREVIOUS_JRE_FILE) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
439 |
PREVIOUS_JRE_FILE:=$(call AltCheckValue,PREVIOUS_JRE_FILE) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
440 |
|
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
441 |
# Paths to these bundles |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
442 |
PREVIOUS_JRE_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JRE_FILE) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
443 |
PREVIOUS_JDK_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JDK_FILE) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
444 |
endif |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
445 |
|
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
446 |
endif |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
447 |
|
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
448 |
# Indicate we are using an image comparison |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
449 |
ifneq ($(PREVIOUS_RELEASE_IMAGE),) |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
450 |
PREVIOUS_RELEASE_PATH = USING-PREVIOUS_RELEASE_IMAGE |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
451 |
PREVIOUS_JRE_BUNDLE = USING-PREVIOUS_RELEASE_IMAGE |
3a209f585a3f
6746421: Compare images logic needs to be more forgiving
ohair
parents:
919
diff
changeset
|
452 |
PREVIOUS_JDK_BUNDLE = USING-PREVIOUS_RELEASE_IMAGE |
2 | 453 |
endif |
454 |
||
455 |
# CACERTS_FILE: if OPENJDK is false and the internal version of the file |
|
456 |
# (that is, non-empty) is available, use it, otherwise use an |
|
457 |
# empty keystore. |
|
458 |
# |
|
459 |
# We put this variable here for sanity checks and in case another |
|
460 |
# components will need to know which cacerts file is being used. |
|
461 |
# |
|
462 |
ifdef ALT_CACERTS_FILE |
|
463 |
CACERTS_FILE = $(ALT_CACERTS_FILE) |
|
464 |
else |
|
465 |
CACERTS_EXT = $(SHARE_SRC)/lib/security/cacerts |
|
466 |
ifdef OPENJDK |
|
467 |
CACERTS_FILE :=$(CACERTS_EXT) |
|
468 |
else # (!OPENJDK) |
|
469 |
CACERTS_INT = $(CLOSED_SHARE_SRC)/lib/security/cacerts.internal |
|
470 |
CACERTS_FILE :=$(call FileExists,$(CACERTS_INT),$(CACERTS_EXT)) |
|
471 |
endif # (OPENJDK) |
|
472 |
endif |
|
473 |
CACERTS_FILE:=$(call AltCheckSpaces,CACERTS_FILE) |
|
474 |
CACERTS_FILE:=$(call AltCheckValue,CACERTS_FILE) |
|
475 |
||
476 |
# OUTPUTDIR: Location of all output for the build |
|
477 |
ifdef ALT_OUTPUTDIR |
|
33
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
478 |
OUTPUTDIR:=$(subst \,/,$(ALT_OUTPUTDIR)) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
479 |
# Assumes this is absolute (checks later) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
480 |
ABS_OUTPUTDIR:=$(OUTPUTDIR) |
2 | 481 |
else |
482 |
ifndef _OUTPUTDIR |
|
33
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
483 |
# 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
|
484 |
ifndef BUILD_PARENT_DIRECTORY |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
485 |
BUILD_PARENT_DIRECTORY=$(BUILDDIR)/.. |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
486 |
endif |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
487 |
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
|
488 |
ifdef OPENJDK |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
489 |
_OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)$(OPENJDK_SUFFIX) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
490 |
else |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
491 |
_OUTPUTDIRNAME=$(PLATFORM)-$(ARCH) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
492 |
endif |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
493 |
_OUTPUTDIR=$(BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
494 |
ABS_OUTPUTDIR:=$(ABS_BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME) |
2 | 495 |
endif |
33
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
496 |
OUTPUTDIR:=$(_OUTPUTDIR) |
2 | 497 |
endif |
33
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
498 |
# Check for spaces and null value |
2 | 499 |
OUTPUTDIR:=$(call AltCheckSpaces,OUTPUTDIR) |
500 |
OUTPUTDIR:=$(call AltCheckValue,OUTPUTDIR) |
|
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
33
diff
changeset
|
501 |
|
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
33
diff
changeset
|
502 |
# |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
33
diff
changeset
|
503 |
# When signing the JCE framework and provider, we could be using built |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
33
diff
changeset
|
504 |
# bits on a read-only filesystem. If so, this test will fail and crash |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
33
diff
changeset
|
505 |
# the build. |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
33
diff
changeset
|
506 |
# |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
33
diff
changeset
|
507 |
ifndef IGNORE_WRITABLE_OUTPUTDIR_TEST |
33
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
508 |
# 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
|
509 |
_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
|
510 |
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
|
511 |
_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
|
512 |
endif |
300
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
33
diff
changeset
|
513 |
endif |
d4f77ff718fd
6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents:
33
diff
changeset
|
514 |
|
33
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
515 |
# 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
|
516 |
ifndef ABS_OUTPUTDIR |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
517 |
ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR)) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
518 |
endif |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
519 |
ABS_OUTPUTDIR:=$(call AltCheckSpaces,ABS_OUTPUTDIR) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
520 |
ABS_OUTPUTDIR:=$(call AltCheckValue,ABS_OUTPUTDIR) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
521 |
# 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
|
522 |
ifeq ($(call AbsPwdPathCheck,$(ABS_OUTPUTDIR)), ) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
523 |
ifdef ALT_OUTPUTDIR |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
524 |
_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
|
525 |
else |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
526 |
_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
|
527 |
endif |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
528 |
endif |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
529 |
_dir1:=$(call FullPath,$(ABS_OUTPUTDIR)) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
530 |
_dir2:=$(call FullPath,$(OUTPUTDIR)) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
531 |
ifneq ($(_dir1),$(_dir2)) |
51a7bc3e93a0
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
2
diff
changeset
|
532 |
_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
|
533 |
endif |
2 | 534 |
|
535 |
# Bin directory |
|
536 |
# NOTE: ISA_DIR is usually empty, on Solaris it might be /sparcv9 or /amd64 |
|
537 |
BINDIR = $(OUTPUTDIR)/bin$(ISA_DIR) |
|
538 |
||
539 |
# MOZILLA_HEADERS_PATH: path to mozilla header files for plugin |
|
540 |
ifdef ALT_MOZILLA_HEADERS_PATH |
|
541 |
MOZILLA_HEADERS_PATH :=$(call FullPath,$(ALT_MOZILLA_HEADERS_PATH)) |
|
542 |
else |
|
543 |
MOZILLA_HEADERS_PATH =$(JDK_DEVTOOLS_DIR)/share/plugin |
|
544 |
endif |
|
545 |
MOZILLA_HEADERS_PATH:=$(call AltCheckSpaces,MOZILLA_HEADERS_PATH) |
|
546 |
MOZILLA_HEADERS_PATH:=$(call AltCheckValue,MOZILLA_HEADERS_PATH) |
|
547 |
||
548 |
# CUPS_HEADERS_PATH: path to Cups headers files for Unix printing |
|
549 |
ifneq ($(PLATFORM), windows) |
|
550 |
JDK_CUPS_HEADERS_PATH=$(JDK_DEVTOOLS_DIR)/share/cups/include |
|
551 |
ifdef ALT_CUPS_HEADERS_PATH |
|
552 |
CUPS_HEADERS_PATH:=$(call FullPath,$(ALT_CUPS_HEADERS_PATH)) |
|
2658 | 553 |
CUPS_HEADERS_PATH:=$(call AltCheckValue,CUPS_HEADERS_PATH) |
2 | 554 |
else |
555 |
CUPS_HEADERS_PATH:= \ |
|
556 |
$(shell if [ -d "$(JDK_CUPS_HEADERS_PATH)" ]; then \ |
|
557 |
echo "$(JDK_CUPS_HEADERS_PATH)"; \ |
|
558 |
else \ |
|
559 |
echo "$(_CUPS_HEADERS_PATH)";\ |
|
560 |
fi) |
|
561 |
endif |
|
562 |
endif |
|
563 |
||
1163
0de695c3558f
6746430: Fix problems with getting 'ant -version' and the required setting of 'ANT_HOME'
ohair
parents:
1162
diff
changeset
|
564 |
# Utilities ant |
0de695c3558f
6746430: Fix problems with getting 'ant -version' and the required setting of 'ANT_HOME'
ohair
parents:
1162
diff
changeset
|
565 |
ifeq ($(PLATFORM), windows) |
0de695c3558f
6746430: Fix problems with getting 'ant -version' and the required setting of 'ANT_HOME'
ohair
parents:
1162
diff
changeset
|
566 |
ifeq ($(ANT_HOME),) |
0de695c3558f
6746430: Fix problems with getting 'ant -version' and the required setting of 'ANT_HOME'
ohair
parents:
1162
diff
changeset
|
567 |
ANT_HOME := $(call DirExists,$(JDK_DEVTOOLS_DIR)/share/ant/latest,,) |
0de695c3558f
6746430: Fix problems with getting 'ant -version' and the required setting of 'ANT_HOME'
ohair
parents:
1162
diff
changeset
|
568 |
endif |
140
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
33
diff
changeset
|
569 |
endif |
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
33
diff
changeset
|
570 |
ifeq ($(ANT_HOME),) |
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
33
diff
changeset
|
571 |
ANT = ant |
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
33
diff
changeset
|
572 |
else |
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
33
diff
changeset
|
573 |
ANT = $(ANT_HOME)/bin/ant |
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
33
diff
changeset
|
574 |
endif |
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
33
diff
changeset
|
575 |
|
2 | 576 |
ifdef ALT_COPYRIGHT_YEAR |
577 |
COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR) |
|
578 |
else |
|
579 |
COPYRIGHT_YEAR = $(shell $(DATE) '+%Y') |
|
580 |
endif |
|
581 |
||
2188
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
582 |
# Windows uses Microsoft compilers by default |
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
583 |
ifeq ($(PLATFORM), windows) |
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
584 |
override CC_VERSION = msvc |
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
585 |
endif |
2 | 586 |
|
2188
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
587 |
# Solaris uses Sun Studio compilers by default |
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
588 |
ifeq ($(PLATFORM), solaris) |
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
589 |
override CC_VERSION = sun |
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
590 |
endif |
2 | 591 |
|
2188
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
592 |
# Linux uses GNU compilers by default |
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
593 |
ifeq ($(PLATFORM), linux) |
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
594 |
override CC_VERSION = gcc |
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
595 |
endif |
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
596 |
|
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
597 |
# Get the REQUIRED versions (needs CC_VERSION set) |
2158
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
598 |
include $(JDK_MAKE_SHARED_DIR)/Defs-versions.gmk |
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
1163
diff
changeset
|
599 |
|
2188
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
600 |
# Get the compiler specific settings |
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
601 |
include $(JDK_MAKE_SHARED_DIR)/Compiler-$(CC_VERSION).gmk |
a1417beb3de8
6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents:
2158
diff
changeset
|
602 |