author | martin |
Mon, 07 Dec 2009 15:32:26 -0800 | |
changeset 4354 | 3a70dde80b3b |
parent 3871 | 3d528461f61d |
child 4290 | 1258c05e707a |
permissions | -rw-r--r-- |
4 | 1 |
# |
3291 | 2 |
# Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. |
4 | 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 |
# OS_NAME solaris, linux, or nt |
|
55 |
# OS_VERSION specific version of os, 5.10, 2.4.9-e.3, etc. |
|
56 |
# OS_VENDOR company name |
|
57 |
# TEMP_DISK /tmp or C:/temp |
|
58 |
# ARCH_DATA_MODEL 32 or 64 |
|
59 |
# ARCH sparc, sparcv9, i586, amd64, or ia64 |
|
60 |
# ARCH_FAMILY sparc or i586 |
|
61 |
# ARCHPROP sparc or x86 |
|
62 |
# ARCH_VM_SUBDIR jre/bin, jre/lib/sparc, etc. |
|
63 |
# LIBARCH sparc, sparcv9, i386, amd64, or ia64 |
|
64 |
# DEV_NULL destination of /dev/null, NUL or /dev/NULL |
|
65 |
# CLASSPATH_SEPARATOR separator in classpath, ; or : |
|
66 |
# LIB_PREFIX dynamic or static library prefix, lib or empty |
|
67 |
# LIB_SUFFIX static library file suffix, .lib or .a? |
|
68 |
# LIBRARY_SUFFIX dynamic library file suffix, .dll or .so |
|
69 |
# OBJECT_SUFFIX object file suffix, .o or .obj |
|
70 |
# EXE_SUFFIX executable file suffix, .exe or empty |
|
71 |
# BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz |
|
72 |
# ISA_DIR solaris only: /sparcv9 or /amd64 |
|
73 |
# LIBARCH32 solaris only: sparc or i386 |
|
74 |
# LIBARCH64 solaris only: sparcv9 or amd64 |
|
75 |
# REQUIRED_WINDOWS_NAME windows only: basic name of windows |
|
76 |
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows |
|
77 |
# USING_CYGWIN windows only: true or false |
|
78 |
# WINDOWS_NT_VERSION_STRING windows only: long version name |
|
79 |
# REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4 |
|
80 |
# REQUIRED_FREE_SPACE minimum disk space needed for outputdir |
|
81 |
# REQUIRED_ZIP_VER required version of zip |
|
82 |
# REQUIRED_UNZIP_VER required version of unzip |
|
83 |
# LINUX_VERSION_INFO linux only: location of linux release file |
|
84 |
# REQUIRED_LINUX_VER linux only: required version of linux |
|
85 |
# REQUIRED_LINUX_FULLVER linux only: required full version of linux |
|
86 |
||
3871
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
87 |
ifndef SYSTEM_UNAME |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
88 |
SYSTEM_UNAME := $(shell uname) |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
89 |
export SYSTEM_UNAME |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
90 |
endif |
4 | 91 |
|
92 |
# Normal boot jdk is previous release, but a hard requirement is a 1.5 boot |
|
93 |
REQUIRED_BOOT_VER = 1.5 |
|
94 |
||
95 |
# Don't define this unless it's not defined |
|
96 |
ifndef VARIANT |
|
97 |
VARIANT=OPT |
|
98 |
endif |
|
99 |
||
100 |
# Platform settings specific to Solaris |
|
101 |
ifeq ($(SYSTEM_UNAME), SunOS) |
|
102 |
PLATFORM = solaris |
|
103 |
OS_NAME = solaris |
|
104 |
OS_VERSION := $(shell uname -r) |
|
105 |
# Solaris sparc build can be either 32-bit or 64-bit. |
|
106 |
# Default to 32, but allow explicit setting to 32 or 64. |
|
107 |
ifndef ARCH_DATA_MODEL |
|
108 |
ARCH_DATA_MODEL=32 |
|
109 |
endif |
|
110 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
111 |
processor := $(shell uname -p) |
|
112 |
archExpr = case "$(processor)" in \ |
|
113 |
i[3-9]86) \ |
|
114 |
echo i586 \ |
|
115 |
;; \ |
|
116 |
sparc*) \ |
|
117 |
echo sparc \ |
|
118 |
;; \ |
|
119 |
*) \ |
|
120 |
echo $(processor) \ |
|
121 |
;; \ |
|
122 |
esac |
|
123 |
ARCH := $(shell $(archExpr)) |
|
124 |
else |
|
125 |
ARCH := $(shell isainfo -n) |
|
126 |
# ISA_DIR is used to locate 64-bit specific libraries which are generally |
|
127 |
# in the same general place as other libraries under the ./$(ARCH) directory |
|
128 |
ISA_DIR = /$(ARCH) |
|
129 |
endif |
|
130 |
# Need to maintain the jre/lib/i386 location for 32-bit Intel |
|
131 |
ifeq ($(ARCH), i586) |
|
132 |
ARCH_FAMILY = $(ARCH) |
|
133 |
LIBARCH = i386 |
|
134 |
# Value of Java os.arch property |
|
135 |
ARCHPROP = x86 |
|
136 |
else |
|
137 |
ifeq ($(ARCH), amd64) |
|
138 |
ARCH_FAMILY = i586 |
|
139 |
else |
|
140 |
ARCH_FAMILY = sparc |
|
141 |
endif |
|
142 |
LIBARCH = $(ARCH) |
|
143 |
# Value of Java os.arch property |
|
144 |
ARCHPROP = $(LIBARCH) |
|
145 |
endif |
|
146 |
# The two LIBARCH names |
|
147 |
ifeq ($(ARCH_FAMILY), sparc) |
|
148 |
LIBARCH32 = sparc |
|
149 |
LIBARCH64 = sparcv9 |
|
150 |
else |
|
151 |
LIBARCH32 = i386 |
|
152 |
LIBARCH64 = amd64 |
|
153 |
endif |
|
154 |
# Suffix for file bundles used in previous release |
|
155 |
BUNDLE_FILE_SUFFIX=.tar |
|
156 |
OS_VENDOR = Sun Microsystems |
|
157 |
# Required Solaris version |
|
158 |
REQUIRED_OS_VERSION = 5.10 |
|
159 |
# Minimum disk space needed as determined by running 'du -sk' on |
|
160 |
# a fully built workspace. |
|
161 |
ifeq ($(ARCH_FAMILY), sparc) |
|
162 |
REQUIRED_FREE_SPACE=1300000 |
|
163 |
else |
|
164 |
REQUIRED_FREE_SPACE=1040000 |
|
165 |
endif |
|
166 |
# How much RAM does this machine have: |
|
167 |
MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3) |
|
168 |
endif |
|
169 |
||
170 |
# Platform settings specific to Linux |
|
171 |
ifeq ($(SYSTEM_UNAME), Linux) |
|
172 |
PLATFORM = linux |
|
173 |
OS_NAME = linux |
|
174 |
OS_VERSION := $(shell uname -r) |
|
175 |
# Arch and OS name/version |
|
176 |
mach := $(shell uname -m) |
|
177 |
archExpr = case "$(mach)" in \ |
|
178 |
i[3-9]86) \ |
|
179 |
echo i586 \ |
|
180 |
;; \ |
|
181 |
ia64) \ |
|
182 |
echo ia64 \ |
|
183 |
;; \ |
|
184 |
x86_64) \ |
|
185 |
echo amd64 \ |
|
186 |
;; \ |
|
187 |
sparc*) \ |
|
188 |
echo sparc \ |
|
189 |
;; \ |
|
190 |
*) \ |
|
191 |
echo $(mach) \ |
|
192 |
;; \ |
|
193 |
esac |
|
194 |
ARCH := $(shell $(archExpr) ) |
|
195 |
ARCH_FAMILY := $(ARCH) |
|
196 |
||
197 |
# Linux builds may be 32-bit or 64-bit data model. |
|
198 |
ifeq ($(ARCH), sparc) |
|
199 |
# Linux sparc build can be either 32-bit or 64-bit. |
|
200 |
# Default to 32, but allow explicit setting to 32 or 64. |
|
201 |
ifndef ARCH_DATA_MODEL |
|
202 |
ARCH_DATA_MODEL=32 |
|
203 |
endif |
|
204 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
205 |
ARCH=sparc |
|
206 |
else |
|
207 |
ARCH=sparcv9 |
|
208 |
endif |
|
209 |
else |
|
210 |
# i586 is 32-bit, amd64 is 64-bit |
|
211 |
ifndef ARCH_DATA_MODEL |
|
212 |
ifeq ($(ARCH), i586) |
|
213 |
ARCH_DATA_MODEL=32 |
|
214 |
else |
|
215 |
ARCH_DATA_MODEL=64 |
|
216 |
endif |
|
217 |
endif |
|
218 |
endif |
|
219 |
||
220 |
# Need to maintain the jre/lib/i386 location for 32-bit Intel |
|
221 |
ifeq ($(ARCH), i586) |
|
222 |
LIBARCH = i386 |
|
223 |
else |
|
224 |
LIBARCH = $(ARCH) |
|
225 |
endif |
|
226 |
||
227 |
# Value of Java os.arch property |
|
228 |
ARCHPROP = $(LIBARCH) |
|
229 |
||
230 |
# Suffix for file bundles used in previous release |
|
231 |
BUNDLE_FILE_SUFFIX=.tar.gz |
|
232 |
# Minimum disk space needed as determined by running 'du -sk' on |
|
233 |
# a fully built workspace. |
|
234 |
REQUIRED_FREE_SPACE=1460000 |
|
235 |
LINUX_VERSION_INFO = /etc/redhat-release |
|
236 |
OS_VENDOR = Red Hat |
|
237 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
238 |
REQUIRED_LINUX_VER = Advanced Server |
|
239 |
REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS |
|
240 |
REQUIRED_OS_VERSION = 2.4.9-e.3 |
|
241 |
else |
|
242 |
ifeq ($(ARCH), amd64) |
|
243 |
LINUX_VERSION_INFO = /etc/SuSE-release |
|
244 |
OS_VENDOR = SuSE Enterprise |
|
245 |
REQUIRED_LINUX_VER = 8.1 |
|
246 |
REQUIRED_LINUX_FULLVER = $(REQUIRED_LINUX_VER) SLSE AMD64 |
|
247 |
REQUIRED_OS_VERSION = 2.4.19-SMP |
|
248 |
else |
|
249 |
REQUIRED_LINUX_VER = Advanced Server |
|
250 |
REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS 64 bit |
|
251 |
REQUIRED_OS_VERSION = 2.4.19-SMP |
|
252 |
endif |
|
253 |
endif |
|
254 |
# How much RAM does this machine have: |
|
255 |
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2) |
|
256 |
endif |
|
257 |
||
258 |
# Windows with and without CYGWIN will be slightly different |
|
259 |
ifeq ($(SYSTEM_UNAME), Windows_NT) |
|
260 |
PLATFORM = windows |
|
261 |
OS_VERSION := $(shell uname -r) |
|
262 |
WINDOWS_NT_VERSION_STRING=Windows_NT |
|
263 |
REQUIRED_MKS_VER=6.1 |
|
264 |
endif |
|
265 |
ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME))) |
|
266 |
PLATFORM = windows |
|
267 |
OS_VERSION := 5 |
|
268 |
USING_CYGWIN = true |
|
269 |
export USING_CYGWIN |
|
270 |
WINDOWS_NT_VERSION_STRING=CYGWIN_NT |
|
271 |
REQUIRED_CYGWIN_VER=4.0 |
|
272 |
endif |
|
273 |
||
274 |
# Platform settings specific to Windows |
|
275 |
ifeq ($(PLATFORM), windows) |
|
276 |
OS_NAME = nt |
|
277 |
REQUIRED_OS_VERSION=5 |
|
278 |
# Windows builds default to the appropriate for the underlaying |
|
279 |
# architecture. |
|
280 |
# Temporary disk area |
|
281 |
TEMP_DISK=C:/temp |
|
282 |
# GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always |
|
283 |
# return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead. |
|
2823
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
284 |
PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
285 |
PROC_ARCH:=$(subst x86,X86,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
286 |
PROC_ARCH:=$(subst x64,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
287 |
PROC_ARCH:=$(subst intel64,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
288 |
PROC_ARCH:=$(subst Intel64,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
289 |
PROC_ARCH:=$(subst INTEL64,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
290 |
PROC_ARCH:=$(subst em64t,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
291 |
PROC_ARCH:=$(subst EM64T,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
292 |
PROC_ARCH:=$(subst amd64,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
293 |
PROC_ARCH:=$(subst AMD64,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
294 |
PROC_ARCH:=$(subst ia64,IA64,$(PROC_ARCH)) |
4 | 295 |
ifndef ARCH_DATA_MODEL |
2823
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
296 |
ifeq ($(PROC_ARCH),IA64) |
4 | 297 |
ARCH_DATA_MODEL=64 |
298 |
else |
|
2823
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
299 |
ifeq ($(PROC_ARCH),X64) |
4 | 300 |
ARCH_DATA_MODEL=64 |
301 |
else |
|
302 |
ARCH_DATA_MODEL=32 |
|
303 |
endif |
|
304 |
endif |
|
305 |
endif |
|
306 |
export ARCH_DATA_MODEL |
|
307 |
# LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel |
|
308 |
ARCH=i586 |
|
309 |
LIBARCH=i386 |
|
310 |
# Value of Java os.arch property |
|
311 |
ARCHPROP=x86 |
|
312 |
REQUIRED_WINDOWS_NAME=Windows Professional 2000 |
|
313 |
REQUIRED_WINDOWS_VERSION=5 0 Service Pack 4 |
|
314 |
ifeq ($(ARCH_DATA_MODEL), 64) |
|
315 |
# If the user wants to perform a cross compile build then they must |
|
316 |
# - set ARCH_DATA_MODEL=64 and either |
|
317 |
# + set ARCH to ia64 or amd64, or |
|
318 |
REQUIRED_WINDOWS_NAME=Windows Server 2003 |
|
319 |
REQUIRED_WINDOWS_VERSION=5 2 Service Pack 1 |
|
2823
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
320 |
ifeq ($(PROC_ARCH),X64) |
4 | 321 |
ARCH=amd64 |
322 |
else |
|
2823
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
323 |
ifeq ($(PROC_ARCH),IA64) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
324 |
ARCH=ia64 |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
325 |
endif |
4 | 326 |
endif |
327 |
LIBARCH=$(ARCH) |
|
328 |
# Value of Java os.arch property |
|
329 |
ARCHPROP=$(LIBARCH) |
|
330 |
endif |
|
331 |
ARCH_FAMILY = $(ARCH) |
|
332 |
# Where is unwanted output to be delivered? |
|
333 |
DEV_NULL = NUL |
|
334 |
export DEV_NULL |
|
335 |
# Classpath separator |
|
336 |
CLASSPATH_SEPARATOR = ; |
|
337 |
# The suffix used for object file (.o for unix .obj for windows) |
|
338 |
OBJECT_SUFFIX = obj |
|
339 |
# The suffix applied to executables (.exe for windows, nothing for solaris) |
|
340 |
EXE_SUFFIX = .exe |
|
341 |
# The prefix applied to library files (lib for solaris, nothing for windows) |
|
342 |
LIB_PREFIX= |
|
343 |
LIBRARY_SUFFIX = dll |
|
344 |
LIB_SUFFIX = lib |
|
345 |
# User name determination (set _USER) |
|
346 |
ifndef USER |
|
347 |
ifdef USERNAME |
|
348 |
_USER := $(USERNAME) |
|
349 |
else |
|
350 |
ifdef LOGNAME |
|
351 |
_USER := $(LOGNAME) |
|
352 |
else |
|
353 |
_USER := $(shell id -un) |
|
354 |
endif |
|
355 |
endif |
|
356 |
else |
|
357 |
_USER:=$(USER) |
|
358 |
endif |
|
359 |
# Location of client/server directories |
|
360 |
ARCH_VM_SUBDIR=jre/bin |
|
361 |
# Suffix for file bundles used in previous release |
|
362 |
BUNDLE_FILE_SUFFIX=.tar |
|
363 |
# Minimum disk space needed as determined by running 'du -sk' on |
|
364 |
# a fully built workspace. |
|
365 |
REQUIRED_FREE_SPACE=500000 |
|
366 |
OS_VENDOR = Microsoft |
|
367 |
# How much RAM does this machine have: |
|
3871
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
368 |
ifndef MB_OF_MEMORY |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
369 |
MB_OF_MEMORY := $(shell \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
370 |
if [ -f "C:/cygwin/bin/free.exe" ] ; then \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
371 |
( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
372 |
grep Mem: | \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
373 |
sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
374 |
else \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
375 |
echo "512"; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
376 |
fi) |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
377 |
export MB_OF_MEMORY |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
378 |
endif |
4 | 379 |
endif |
380 |
||
381 |
# Machines with 512Mb or less of real memory are considered low memory |
|
382 |
# build machines and adjustments will be made to prevent excessing |
|
383 |
# system swapping during the build. |
|
384 |
# If we don't know, assume 512. Subtract 128 from MB for VM MAX. |
|
385 |
# Don't set VM max over 1024-128=896. |
|
3871
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
386 |
ifndef MAX_VM_MEMORY |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
387 |
ifneq ($(MB_OF_MEMORY),) |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
388 |
LOW_MEMORY_MACHINE := $(shell \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
389 |
if [ $(MB_OF_MEMORY) -le 512 ] ; then \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
390 |
echo "true"; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
391 |
else \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
392 |
echo "false"; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
393 |
fi) |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
394 |
MAX_VM_MEMORY := $(shell \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
395 |
if [ $(MB_OF_MEMORY) -le 1024 ] ; then \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
396 |
expr $(MB_OF_MEMORY) '-' 128 ; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
397 |
else \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
398 |
echo "896"; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
399 |
fi) |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
400 |
MIN_VM_MEMORY := $(shell \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
401 |
if [ $(MAX_VM_MEMORY) -le 128 ] ; then \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
402 |
expr $(MAX_VM_MEMORY) '-' 8 ; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
403 |
else \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
404 |
echo "128"; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
405 |
fi) |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
406 |
else |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
407 |
MB_OF_MEMORY := unknown |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
408 |
LOW_MEMORY_MACHINE := true |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
409 |
MAX_VM_MEMORY := 384 |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
410 |
MIN_VM_MEMORY := 128 |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
411 |
endif |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
412 |
export MAX_VM_MEMORY |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
413 |
export MIN_VM_MEMORY |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
414 |
export LOW_MEMORY_MACHINE |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
415 |
export MAX_VM_MEMORY |
4 | 416 |
endif |
417 |
||
418 |
REQUIRED_ZIP_VER = 2.2 |
|
419 |
REQUIRED_UNZIP_VER = 5.12 |
|
420 |
REQUIRED_MAKE_VER = 3.78 |
|
421 |
||
422 |
# Unix type settings (same for all unix platforms) |
|
423 |
ifneq ($(PLATFORM), windows) |
|
424 |
# Temporary disk area |
|
425 |
TEMP_DISK=/tmp |
|
426 |
# Where is unwanted output to be delivered? |
|
427 |
DEV_NULL = /dev/null |
|
428 |
export DEV_NULL |
|
429 |
# Character used between entries in classpath |
|
430 |
CLASSPATH_SEPARATOR = : |
|
431 |
# suffix used for object file (.o for unix .obj for windows) |
|
432 |
OBJECT_SUFFIX = o |
|
433 |
# The suffix applied to runtime libraries |
|
434 |
LIBRARY_SUFFIX = so |
|
435 |
# The suffix applied to link libraries |
|
436 |
LIB_SUFFIX = so |
|
437 |
# The suffix applied to executables (.exe for windows, nothing for solaris) |
|
438 |
EXE_SUFFIX = |
|
439 |
# The prefix applied to library files (lib for solaris, nothing for windows) |
|
440 |
LIB_PREFIX = lib |
|
441 |
# User name determination (set _USER) |
|
442 |
ifndef USER |
|
443 |
ifdef LOGNAME |
|
444 |
_USER := $(LOGNAME) |
|
445 |
else |
|
446 |
_USER := $(shell logname) |
|
447 |
endif |
|
448 |
else |
|
449 |
_USER:=$(USER) |
|
450 |
endif |
|
451 |
# Location of client/server directories |
|
452 |
ARCH_VM_SUBDIR=jre/lib/$(LIBARCH) |
|
453 |
endif |
|
454 |
||
455 |
# If blanks in the username, use the first 4 words and pack them together |
|
456 |
_USER1:=$(subst ', ,$(_USER)) |
|
457 |
_USER2:=$(subst ", ,$(_USER1)) |
|
458 |
USER:=$(word 1,$(_USER2))$(word 2,$(_USER2))$(word 3,$(_USER2))$(word 4,$(_USER2)) |
|
459 |
export USER |
|
460 |
||
461 |
export PLATFORM |
|
462 |
endif |
|
463 |