author | ohair |
Thu, 20 May 2010 13:57:58 -0700 | |
changeset 5611 | b4ef86f105ec |
parent 4286 | ac64f44f4d19 |
child 5619 | 88a384ff7110 |
permissions | -rw-r--r-- |
2 | 1 |
# |
5611
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
2 |
# Copyright 1997-2010 Sun Microsystems, Inc. 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 |
|
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 |
# Shared platform (OS/ARCH) variable settings for the JDK builds. |
|
28 |
# |
|
29 |
# Includes basic system requirements, versions of utilities required, |
|
30 |
# suffixes on files, and basic defaults attributed to the build platform. |
|
31 |
# |
|
32 |
||
33 |
# |
|
34 |
# Assumes some basic unix system utilities (e.g. uname) are in the search path |
|
35 |
# in order to figure out the system. |
|
36 |
# |
|
37 |
||
38 |
ifndef PLATFORM_SHARED |
|
39 |
||
40 |
PLATFORM_SHARED=done |
|
41 |
||
42 |
# Possible Input variables: |
|
43 |
# ARCH_DATA_MODEL 32 or 64, default to 32 |
|
44 |
# USER, LOGNAME user name (runs logname, or id if not set) |
|
45 |
# PROCESSOR_IDENTIFIER windows only: needed in environment |
|
46 |
# |
|
47 |
# (Also gets input by running the utilities uname, logname, isainfo, or id.) |
|
48 |
# |
|
49 |
# Variables set by this file: |
|
50 |
# SYSTEM_UNAME what 'uname' says this system is |
|
51 |
# USER login name of user (minus blanks) |
|
52 |
# PLATFORM windows, solaris, or linux |
|
53 |
# VARIANT OPT or DBG, OPT is the default |
|
54 |
# TEMP_DISK /tmp or C:/temp |
|
55 |
# ARCH_DATA_MODEL 32 or 64 |
|
56 |
# ARCH sparc, sparcv9, i586, amd64, or ia64 |
|
57 |
# ARCH_FAMILY sparc or i586 |
|
58 |
# ARCHPROP sparc or x86 |
|
59 |
# ARCH_VM_SUBDIR jre/bin, jre/lib/sparc, etc. |
|
60 |
# LIBARCH sparc, sparcv9, i386, amd64, or ia64 |
|
61 |
# DEV_NULL destination of /dev/null, NUL or /dev/NULL |
|
62 |
# CLASSPATH_SEPARATOR separator in classpath, ; or : |
|
63 |
# LIB_PREFIX dynamic or static library prefix, lib or empty |
|
64 |
# LIB_SUFFIX static library file suffix, .lib or .a? |
|
65 |
# LIBRARY_SUFFIX dynamic library file suffix, .dll or .so |
|
66 |
# OBJECT_SUFFIX object file suffix, .o or .obj |
|
67 |
# EXE_SUFFIX executable file suffix, .exe or empty |
|
68 |
# BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz |
|
69 |
# ISA_DIR solaris only: /sparcv9 or /amd64 |
|
70 |
# LIBARCH32 solaris only: sparc or i386 |
|
71 |
# LIBARCH64 solaris only: sparcv9 or amd64 |
|
72 |
# USING_CYGWIN windows only: true or false |
|
73 |
# ISHIELD_TEMP_MIN windows only: minimum disk space in temp area |
|
74 |
||
75 |
SYSTEM_UNAME := $(shell uname) |
|
76 |
||
77 |
# |
|
78 |
# Prune out all known SCM (Source Code Management) directories |
|
79 |
# so they will not be included when copying directory trees |
|
80 |
# or packaging up .jar files, etc. This applies to all workspaces. |
|
81 |
# |
|
31
a8fdfca90643
6628146: Exclude the .hgignore and .hgtags files from the source bundles
ohair
parents:
26
diff
changeset
|
82 |
SCM_DIRs = .hg .svn CVS RCS SCCS Codemgr_wsdata deleted_files .hgignore .hgtags |
2 | 83 |
# When changing SCM_DIRs also change SCM_DIRS_rexp and SCM_DIRS_prune: |
31
a8fdfca90643
6628146: Exclude the .hgignore and .hgtags files from the source bundles
ohair
parents:
26
diff
changeset
|
84 |
SCM_DIRS_rexp = ".hg|.svn|CVS|RCS|SCCS|Codemgr_wsdata|deleted_files|.hgignore|.hgtags" |
a8fdfca90643
6628146: Exclude the .hgignore and .hgtags files from the source bundles
ohair
parents:
26
diff
changeset
|
85 |
SCM_DIRS_prune = \( -name .hg -o -name .svn -o -name CVS -o -name RCS -o -name SCCS -o -name Codemgr_wsdata -o -name deleted_files -o -name .hgignore -o -name .hgtags \) -prune |
2 | 86 |
|
87 |
# Don't define this unless it's not defined |
|
88 |
ifndef VARIANT |
|
89 |
VARIANT=OPT |
|
90 |
endif |
|
91 |
||
92 |
# Platform settings specific to Solaris |
|
93 |
ifeq ($(SYSTEM_UNAME), SunOS) |
|
94 |
PLATFORM = solaris |
|
95 |
# Solaris sparc build can be either 32-bit or 64-bit. |
|
96 |
# Default to 32, but allow explicit setting to 32 or 64. |
|
97 |
ifndef ARCH_DATA_MODEL |
|
98 |
ARCH_DATA_MODEL=32 |
|
99 |
endif |
|
100 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
101 |
processor := $(shell uname -p) |
|
102 |
archExpr = case "$(processor)" in \ |
|
103 |
i[3-9]86) \ |
|
104 |
echo i586 \ |
|
105 |
;; \ |
|
106 |
sparc*) \ |
|
107 |
echo sparc \ |
|
108 |
;; \ |
|
109 |
*) \ |
|
110 |
echo $(processor) \ |
|
111 |
;; \ |
|
112 |
esac |
|
113 |
ARCH := $(shell $(archExpr)) |
|
114 |
else |
|
115 |
ARCH := $(shell isainfo -n) |
|
116 |
# ISA_DIR is used to locate 64-bit specific libraries which are generally |
|
117 |
# in the same general place as other libraries under the ./$(ARCH) directory |
|
118 |
ISA_DIR = /$(ARCH) |
|
119 |
endif |
|
120 |
# Need to maintain the jre/lib/i386 location for 32-bit Intel |
|
121 |
ifeq ($(ARCH), i586) |
|
122 |
ARCH_FAMILY = $(ARCH) |
|
123 |
LIBARCH = i386 |
|
124 |
# Value of Java os.arch property |
|
125 |
ARCHPROP = x86 |
|
126 |
else |
|
127 |
ifeq ($(ARCH), amd64) |
|
128 |
ARCH_FAMILY = i586 |
|
129 |
else |
|
130 |
ARCH_FAMILY = sparc |
|
131 |
endif |
|
132 |
LIBARCH = $(ARCH) |
|
133 |
# Value of Java os.arch property |
|
134 |
ARCHPROP = $(LIBARCH) |
|
135 |
endif |
|
136 |
# The two LIBARCH names |
|
137 |
ifeq ($(ARCH_FAMILY), sparc) |
|
138 |
LIBARCH32 = sparc |
|
139 |
LIBARCH64 = sparcv9 |
|
140 |
else |
|
141 |
LIBARCH32 = i386 |
|
142 |
LIBARCH64 = amd64 |
|
143 |
endif |
|
144 |
# Suffix for file bundles used in previous release |
|
145 |
BUNDLE_FILE_SUFFIX=.tar |
|
146 |
# How much RAM does this machine have: |
|
147 |
MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3) |
|
148 |
endif |
|
149 |
||
150 |
# Platform settings specific to Linux |
|
151 |
ifeq ($(SYSTEM_UNAME), Linux) |
|
152 |
PLATFORM = linux |
|
153 |
# Arch and OS name/version |
|
154 |
mach := $(shell uname -m) |
|
155 |
archExpr = case "$(mach)" in \ |
|
156 |
i[3-9]86) \ |
|
157 |
echo i586 \ |
|
158 |
;; \ |
|
159 |
ia64) \ |
|
160 |
echo ia64 \ |
|
161 |
;; \ |
|
162 |
x86_64) \ |
|
163 |
echo amd64 \ |
|
164 |
;; \ |
|
165 |
sparc*) \ |
|
166 |
echo sparc \ |
|
167 |
;; \ |
|
4286 | 168 |
arm*) \ |
169 |
echo arm \ |
|
170 |
;; \ |
|
2 | 171 |
*) \ |
172 |
echo $(mach) \ |
|
173 |
;; \ |
|
174 |
esac |
|
175 |
ARCH := $(shell $(archExpr) ) |
|
176 |
ARCH_FAMILY := $(ARCH) |
|
177 |
||
178 |
# Linux builds may be 32-bit or 64-bit data model. |
|
179 |
ifeq ($(ARCH), sparc) |
|
180 |
# Linux sparc build can be either 32-bit or 64-bit. |
|
181 |
# Default to 32, but allow explicit setting to 32 or 64. |
|
182 |
ifndef ARCH_DATA_MODEL |
|
183 |
ARCH_DATA_MODEL=32 |
|
184 |
endif |
|
185 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
186 |
ARCH=sparc |
|
187 |
else |
|
188 |
ARCH=sparcv9 |
|
189 |
endif |
|
190 |
else |
|
191 |
# i586 is 32-bit, amd64 is 64-bit |
|
192 |
ifndef ARCH_DATA_MODEL |
|
193 |
ifeq ($(ARCH), i586) |
|
194 |
ARCH_DATA_MODEL=32 |
|
195 |
else |
|
196 |
ARCH_DATA_MODEL=64 |
|
197 |
endif |
|
198 |
endif |
|
199 |
endif |
|
200 |
||
201 |
# Need to maintain the jre/lib/i386 location for 32-bit Intel |
|
202 |
ifeq ($(ARCH), i586) |
|
203 |
LIBARCH = i386 |
|
204 |
else |
|
205 |
LIBARCH = $(ARCH) |
|
206 |
endif |
|
207 |
||
208 |
# Value of Java os.arch property |
|
209 |
ARCHPROP = $(LIBARCH) |
|
210 |
||
211 |
# Suffix for file bundles used in previous release |
|
212 |
BUNDLE_FILE_SUFFIX=.tar.gz |
|
213 |
# How much RAM does this machine have: |
|
141
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
214 |
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' ) |
2 | 215 |
endif |
216 |
||
217 |
# Windows with and without CYGWIN will be slightly different |
|
218 |
ifeq ($(SYSTEM_UNAME), Windows_NT) |
|
219 |
PLATFORM = windows |
|
220 |
endif |
|
221 |
ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME))) |
|
222 |
PLATFORM = windows |
|
223 |
USING_CYGWIN = true |
|
224 |
export USING_CYGWIN |
|
225 |
endif |
|
226 |
||
227 |
# Platform settings specific to Windows |
|
228 |
ifeq ($(PLATFORM), windows) |
|
229 |
# Windows builds default to the appropriate for the underlaying |
|
230 |
# architecture. |
|
231 |
# Temporary disk area |
|
232 |
TEMP_DISK=C:/temp |
|
233 |
# GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always |
|
5611
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
234 |
# return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead. |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
235 |
# And sometimes PROCESSOR_IDENTIFIER is not defined at all |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
236 |
# (in some restricted shells), so we use uname if we have to. |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
237 |
ifeq ($(PROCESSOR_IDENTIFIER),) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
238 |
PROC_ARCH:=$(shell uname -m) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
239 |
else |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
240 |
PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
241 |
endif |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
242 |
# Cover all the possibilities, MKS uname, CYGWIN uname, PROCESSOR_IDENTIFIER |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
243 |
# Get: X86, X64, or IA64 |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
244 |
PROC_ARCH:=$(patsubst 386,X86,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
245 |
PROC_ARCH:=$(patsubst 486,X86,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
246 |
PROC_ARCH:=$(patsubst 586,X86,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
247 |
PROC_ARCH:=$(patsubst 686,X86,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
248 |
PROC_ARCH:=$(patsubst i386,X86,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
249 |
PROC_ARCH:=$(patsubst i486,X86,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
250 |
PROC_ARCH:=$(patsubst i586,X86,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
251 |
PROC_ARCH:=$(patsubst i686,X86,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
252 |
PROC_ARCH:=$(patsubst x86,X86,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
253 |
PROC_ARCH:=$(patsubst intel64,X64,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
254 |
PROC_ARCH:=$(patsubst Intel64,X64,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
255 |
PROC_ARCH:=$(patsubst INTEL64,X64,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
256 |
PROC_ARCH:=$(patsubst em64t,X64,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
257 |
PROC_ARCH:=$(patsubst EM64T,X64,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
258 |
PROC_ARCH:=$(patsubst amd64,X64,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
259 |
PROC_ARCH:=$(patsubst AMD64,X64,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
260 |
PROC_ARCH:=$(patsubst 8664,X64,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
261 |
PROC_ARCH:=$(patsubst x86_64,X64,$(PROC_ARCH)) |
b4ef86f105ec
6954064: Fix the windows arch settings in the makefiles and chmod logic in test/Makefile
ohair
parents:
4286
diff
changeset
|
262 |
PROC_ARCH:=$(patsubst ia64,IA64,$(PROC_ARCH)) |
2 | 263 |
ifndef ARCH_DATA_MODEL |
2300
103e268e2d16
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
2158
diff
changeset
|
264 |
ifeq ($(PROC_ARCH),IA64) |
2 | 265 |
ARCH_DATA_MODEL=64 |
266 |
else |
|
2300
103e268e2d16
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
2158
diff
changeset
|
267 |
ifeq ($(PROC_ARCH),X64) |
2 | 268 |
ARCH_DATA_MODEL=64 |
269 |
else |
|
270 |
ARCH_DATA_MODEL=32 |
|
271 |
endif |
|
272 |
endif |
|
273 |
endif |
|
274 |
export ARCH_DATA_MODEL |
|
275 |
ifeq ($(ARCH_DATA_MODEL), 64) |
|
276 |
# If the user wants to perform a cross compile build then they must |
|
277 |
# - set ARCH_DATA_MODEL=64 and either |
|
278 |
# + set ARCH to ia64 or amd64, or |
|
2300
103e268e2d16
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
2158
diff
changeset
|
279 |
ifeq ($(PROC_ARCH),X64) |
2 | 280 |
ARCH=amd64 |
281 |
else |
|
2300
103e268e2d16
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
2158
diff
changeset
|
282 |
ifeq ($(PROC_ARCH),IA64) |
103e268e2d16
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
2158
diff
changeset
|
283 |
ARCH=ia64 |
103e268e2d16
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
2158
diff
changeset
|
284 |
endif |
2 | 285 |
endif |
286 |
LIBARCH=$(ARCH) |
|
287 |
# Value of Java os.arch property |
|
288 |
ARCHPROP=$(LIBARCH) |
|
799
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
289 |
else |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
290 |
# LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
291 |
ARCH=i586 |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
292 |
LIBARCH=i386 |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
293 |
# Value of Java os.arch property |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
294 |
ARCHPROP=x86 |
2 | 295 |
endif |
296 |
ARCH_FAMILY = $(ARCH) |
|
297 |
# Where is unwanted output to be delivered? |
|
298 |
DEV_NULL = NUL |
|
299 |
export DEV_NULL |
|
300 |
# Classpath separator |
|
301 |
CLASSPATH_SEPARATOR = ; |
|
302 |
# The suffix used for object file (.o for unix .obj for windows) |
|
303 |
OBJECT_SUFFIX = obj |
|
304 |
# The suffix applied to executables (.exe for windows, nothing for solaris) |
|
305 |
EXE_SUFFIX = .exe |
|
306 |
# The prefix applied to library files (lib for solaris, nothing for windows) |
|
307 |
LIB_PREFIX= |
|
308 |
LIBRARY_SUFFIX = dll |
|
309 |
LIB_SUFFIX = lib |
|
310 |
# User name determination (set _USER) |
|
311 |
ifndef USER |
|
312 |
ifdef USERNAME |
|
313 |
_USER := $(USERNAME) |
|
314 |
else |
|
315 |
ifdef LOGNAME |
|
316 |
_USER := $(LOGNAME) |
|
317 |
else |
|
318 |
_USER := $(shell id -un) |
|
319 |
endif |
|
320 |
endif |
|
321 |
else |
|
322 |
_USER:=$(USER) |
|
323 |
endif |
|
324 |
# Location of client/server directories |
|
325 |
ARCH_VM_SUBDIR=jre/bin |
|
326 |
# Suffix for file bundles used in previous release |
|
327 |
BUNDLE_FILE_SUFFIX=.tar |
|
328 |
# ISHIELD_TEMP_MIN is the difference of an empty C:\TEMP vs. one after a |
|
329 |
# bundles build on windows. |
|
330 |
ISHIELD_TEMP_MIN=250000 |
|
331 |
# How much RAM does this machine have: |
|
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
332 |
ifeq ($(JDK_HAS_MEM_INFO),) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
333 |
ifeq ($(USING_CYGWIN),true) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
334 |
# CYGWIN has the 'free' utility |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
335 |
_MB_OF_MEMORY := \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
336 |
$(shell free -m | grep Mem: | awk '{print $$2;}' ) |
141
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
337 |
else |
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
338 |
# Windows 2000 has the mem utility, but two memory areas |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
339 |
# extended memory is what is beyond 1024M |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
340 |
_B_OF_EXT_MEMORY := \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
341 |
$(shell mem 2> $(DEV_NULL) | \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
342 |
grep 'total contiguous extended memory' | awk '{print $$1;}') |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
343 |
ifeq ($(_B_OF_EXT_MEMORY),) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
344 |
_B_OF_MEMORY := \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
345 |
$(shell mem 2> $(DEV_NULL) | \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
346 |
grep 'total conventional memory' | awk '{print $$1;}') |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
347 |
else |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
348 |
_B_OF_MEMORY := \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
349 |
$(shell expr 1048576 '+' $(_B_OF_EXT_MEMORY) 2> $(DEV_NULL)) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
350 |
endif |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
351 |
ifeq ($(_B_OF_MEMORY),) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
352 |
# Windows 2003 has the systeminfo utility use it if mem doesn't work |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
353 |
_MB_OF_MEMORY := \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
354 |
$(shell systeminfo 2> $(DEV_NULL) | \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
355 |
grep 'Total Physical Memory:' | \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
356 |
awk '{print $$4;}' | sed -e 's@,@@') |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
357 |
else |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
358 |
_MB_OF_MEMORY := $(shell expr $(_B_OF_MEMORY) '/' 1024 2> $(DEV_NULL)) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
359 |
endif |
141
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
360 |
endif |
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
361 |
ifeq ($(shell expr $(_MB_OF_MEMORY) '+' 0 2> $(DEV_NULL)), $(_MB_OF_MEMORY)) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
362 |
MB_OF_MEMORY := $(_MB_OF_MEMORY) |
141
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
363 |
else |
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
364 |
MB_OF_MEMORY := 512 |
141
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
365 |
endif |
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
366 |
endif |
2 | 367 |
endif |
368 |
||
369 |
# Unix type settings (same for all unix platforms) |
|
370 |
ifneq ($(PLATFORM), windows) |
|
371 |
# Temporary disk area |
|
372 |
TEMP_DISK=/tmp |
|
373 |
# Where is unwanted output to be delivered? |
|
374 |
DEV_NULL = /dev/null |
|
375 |
export DEV_NULL |
|
376 |
# Character used between entries in classpath |
|
377 |
CLASSPATH_SEPARATOR = : |
|
378 |
# suffix used for object file (.o for unix .obj for windows) |
|
379 |
OBJECT_SUFFIX = o |
|
380 |
# The suffix applied to runtime libraries |
|
381 |
LIBRARY_SUFFIX = so |
|
382 |
# The suffix applied to link libraries |
|
383 |
LIB_SUFFIX = so |
|
384 |
# The suffix applied to executables (.exe for windows, nothing for solaris) |
|
385 |
EXE_SUFFIX = |
|
386 |
# The prefix applied to library files (lib for solaris, nothing for windows) |
|
387 |
LIB_PREFIX = lib |
|
388 |
# User name determination (set _USER) |
|
389 |
ifndef USER |
|
390 |
ifdef LOGNAME |
|
391 |
_USER := $(LOGNAME) |
|
392 |
else |
|
393 |
_USER := $(shell logname) |
|
394 |
endif |
|
395 |
else |
|
396 |
_USER:=$(USER) |
|
397 |
endif |
|
398 |
# Location of client/server directories |
|
399 |
ARCH_VM_SUBDIR=jre/lib/$(LIBARCH) |
|
400 |
endif |
|
401 |
||
141
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
402 |
# Machines with 512Mb or less of real memory are considered low memory |
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
403 |
# build machines and adjustments will be made to prevent excessing |
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
404 |
# system swapping during the build. |
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
405 |
# If we don't know, assume 512. Subtract 128 from MB for VM MAX. |
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
406 |
# Don't set VM max over 1024-128=896. |
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
407 |
ifeq ($(JDK_HAS_MEM_INFO),) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
408 |
JDK_HAS_MEM_INFO=true |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
409 |
export JDK_HAS_MEM_INFO |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
410 |
ifneq ($(MB_OF_MEMORY),) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
411 |
LOW_MEMORY_MACHINE := $(shell \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
412 |
if [ $(MB_OF_MEMORY) -le 512 ] ; then \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
413 |
echo "true"; \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
414 |
else \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
415 |
echo "false"; \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
416 |
fi) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
417 |
MAX_VM_MEMORY := $(shell \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
418 |
if [ $(MB_OF_MEMORY) -le 1024 ] ; then \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
419 |
expr $(MB_OF_MEMORY) '-' 128 2> $(DEV_NULL) ; \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
420 |
else \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
421 |
echo "896"; \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
422 |
fi) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
423 |
MIN_VM_MEMORY := $(shell \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
424 |
if [ $(MAX_VM_MEMORY) -le 128 ] ; then \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
425 |
expr $(MAX_VM_MEMORY) '-' 8 2> $(DEV_NULL) ; \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
426 |
else \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
427 |
echo "128"; \ |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
428 |
fi) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
429 |
else |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
430 |
MB_OF_MEMORY := unknown |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
431 |
LOW_MEMORY_MACHINE := true |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
432 |
MAX_VM_MEMORY := 384 |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
433 |
MIN_VM_MEMORY := 128 |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
434 |
endif |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
435 |
export MB_OF_MEMORY |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
436 |
export LOW_MEMORY_MACHINE |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
437 |
export MAX_VM_MEMORY |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
799
diff
changeset
|
438 |
export MIN_VM_MEMORY |
141
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
439 |
endif |
dd739bd1bd2b
6611629: Avoid hardcoded cygwin paths for memory detection
ohair
parents:
31
diff
changeset
|
440 |
|
2 | 441 |
# If blanks in the username, use the first 4 words and pack them together |
442 |
_USER1:=$(subst ', ,$(_USER)) |
|
443 |
_USER2:=$(subst ", ,$(_USER1)) |
|
444 |
USER:=$(word 1,$(_USER2))$(word 2,$(_USER2))$(word 3,$(_USER2))$(word 4,$(_USER2)) |
|
445 |
export USER |
|
446 |
||
447 |
export PLATFORM |
|
448 |
endif |
|
449 |