author | johnc |
Mon, 21 Nov 2011 09:24:56 -0800 | |
changeset 11171 | 02c21e3d0a66 |
parent 7578 | 670662dc2a25 |
child 12061 | 902aeaf97ec5 |
permissions | -rw-r--r-- |
4 | 1 |
# |
7578
670662dc2a25
6909026: Change GNU make version requirement to 3.81
ohair
parents:
6551
diff
changeset
|
2 |
# Copyright (c) 1997, 2010, Oracle and/or its affiliates. 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 |
|
5555 | 7 |
# published by the Free Software Foundation. Oracle designates this |
4 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5555 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
4 | 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 |
# |
|
5555 | 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. |
|
4 | 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 |
# TEMP_DISK /tmp or C:/temp |
|
57 |
# ARCH_DATA_MODEL 32 or 64 |
|
58 |
# ARCH sparc, sparcv9, i586, amd64, or ia64 |
|
59 |
# ARCH_FAMILY sparc or i586 |
|
60 |
# ARCHPROP sparc or x86 |
|
61 |
# DEV_NULL destination of /dev/null, NUL or /dev/NULL |
|
62 |
# CLASSPATH_SEPARATOR separator in classpath, ; or : |
|
63 |
# BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz |
|
64 |
# ISA_DIR solaris only: /sparcv9 or /amd64 |
|
65 |
# REQUIRED_WINDOWS_NAME windows only: basic name of windows |
|
66 |
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows |
|
67 |
# USING_CYGWIN windows only: true or false |
|
68 |
# WINDOWS_NT_VERSION_STRING windows only: long version name |
|
69 |
# REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4 |
|
70 |
# REQUIRED_FREE_SPACE minimum disk space needed for outputdir |
|
71 |
# REQUIRED_ZIP_VER required version of zip |
|
72 |
# REQUIRED_UNZIP_VER required version of unzip |
|
73 |
# LINUX_VERSION_INFO linux only: location of linux release file |
|
74 |
# REQUIRED_LINUX_VER linux only: required version of linux |
|
75 |
# REQUIRED_LINUX_FULLVER linux only: required full version of linux |
|
76 |
||
3871
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
77 |
ifndef SYSTEM_UNAME |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
78 |
SYSTEM_UNAME := $(shell uname) |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
79 |
export SYSTEM_UNAME |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
80 |
endif |
4 | 81 |
|
82 |
# Normal boot jdk is previous release, but a hard requirement is a 1.5 boot |
|
83 |
REQUIRED_BOOT_VER = 1.5 |
|
84 |
||
85 |
# Don't define this unless it's not defined |
|
86 |
ifndef VARIANT |
|
87 |
VARIANT=OPT |
|
88 |
endif |
|
89 |
||
90 |
# Platform settings specific to Solaris |
|
91 |
ifeq ($(SYSTEM_UNAME), SunOS) |
|
92 |
PLATFORM = solaris |
|
93 |
OS_NAME = solaris |
|
94 |
OS_VERSION := $(shell uname -r) |
|
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 |
# Value of Java os.arch property |
|
124 |
ARCHPROP = x86 |
|
125 |
else |
|
126 |
ifeq ($(ARCH), amd64) |
|
127 |
ARCH_FAMILY = i586 |
|
128 |
else |
|
129 |
ARCH_FAMILY = sparc |
|
130 |
endif |
|
131 |
# Value of Java os.arch property |
|
6551
476ed8653670
6981043: Clean out all native code makefile logic from corba repository
ohair
parents:
5560
diff
changeset
|
132 |
ARCHPROP = $(ARCH) |
4 | 133 |
endif |
134 |
# Suffix for file bundles used in previous release |
|
135 |
BUNDLE_FILE_SUFFIX=.tar |
|
136 |
# Required Solaris version |
|
137 |
REQUIRED_OS_VERSION = 5.10 |
|
138 |
# Minimum disk space needed as determined by running 'du -sk' on |
|
139 |
# a fully built workspace. |
|
140 |
ifeq ($(ARCH_FAMILY), sparc) |
|
141 |
REQUIRED_FREE_SPACE=1300000 |
|
142 |
else |
|
143 |
REQUIRED_FREE_SPACE=1040000 |
|
144 |
endif |
|
145 |
# How much RAM does this machine have: |
|
146 |
MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3) |
|
147 |
endif |
|
148 |
||
149 |
# Platform settings specific to Linux |
|
150 |
ifeq ($(SYSTEM_UNAME), Linux) |
|
151 |
PLATFORM = linux |
|
152 |
OS_NAME = linux |
|
153 |
OS_VERSION := $(shell uname -r) |
|
154 |
# Arch and OS name/version |
|
155 |
mach := $(shell uname -m) |
|
156 |
archExpr = case "$(mach)" in \ |
|
157 |
i[3-9]86) \ |
|
158 |
echo i586 \ |
|
159 |
;; \ |
|
160 |
ia64) \ |
|
161 |
echo ia64 \ |
|
162 |
;; \ |
|
163 |
x86_64) \ |
|
164 |
echo amd64 \ |
|
165 |
;; \ |
|
166 |
sparc*) \ |
|
167 |
echo sparc \ |
|
168 |
;; \ |
|
4290 | 169 |
arm*) \ |
170 |
echo arm \ |
|
171 |
;; \ |
|
4 | 172 |
*) \ |
173 |
echo $(mach) \ |
|
174 |
;; \ |
|
175 |
esac |
|
176 |
ARCH := $(shell $(archExpr) ) |
|
177 |
ARCH_FAMILY := $(ARCH) |
|
178 |
||
179 |
# Linux builds may be 32-bit or 64-bit data model. |
|
180 |
ifeq ($(ARCH), sparc) |
|
181 |
# Linux sparc build can be either 32-bit or 64-bit. |
|
182 |
# Default to 32, but allow explicit setting to 32 or 64. |
|
183 |
ifndef ARCH_DATA_MODEL |
|
184 |
ARCH_DATA_MODEL=32 |
|
185 |
endif |
|
186 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
187 |
ARCH=sparc |
|
188 |
else |
|
189 |
ARCH=sparcv9 |
|
190 |
endif |
|
191 |
else |
|
192 |
# i586 is 32-bit, amd64 is 64-bit |
|
193 |
ifndef ARCH_DATA_MODEL |
|
194 |
ifeq ($(ARCH), i586) |
|
195 |
ARCH_DATA_MODEL=32 |
|
196 |
else |
|
197 |
ARCH_DATA_MODEL=64 |
|
198 |
endif |
|
199 |
endif |
|
200 |
endif |
|
201 |
||
202 |
ifeq ($(ARCH), i586) |
|
6551
476ed8653670
6981043: Clean out all native code makefile logic from corba repository
ohair
parents:
5560
diff
changeset
|
203 |
ARCHPROP = i386 |
4 | 204 |
else |
6551
476ed8653670
6981043: Clean out all native code makefile logic from corba repository
ohair
parents:
5560
diff
changeset
|
205 |
ARCHPROP = $(ARCH) |
4 | 206 |
endif |
207 |
||
208 |
# Suffix for file bundles used in previous release |
|
209 |
BUNDLE_FILE_SUFFIX=.tar.gz |
|
210 |
# Minimum disk space needed as determined by running 'du -sk' on |
|
211 |
# a fully built workspace. |
|
212 |
REQUIRED_FREE_SPACE=1460000 |
|
213 |
LINUX_VERSION_INFO = /etc/redhat-release |
|
214 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
215 |
REQUIRED_LINUX_VER = Advanced Server |
|
216 |
REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS |
|
217 |
REQUIRED_OS_VERSION = 2.4.9-e.3 |
|
218 |
else |
|
219 |
ifeq ($(ARCH), amd64) |
|
220 |
LINUX_VERSION_INFO = /etc/SuSE-release |
|
221 |
REQUIRED_LINUX_VER = 8.1 |
|
222 |
REQUIRED_LINUX_FULLVER = $(REQUIRED_LINUX_VER) SLSE AMD64 |
|
223 |
REQUIRED_OS_VERSION = 2.4.19-SMP |
|
224 |
else |
|
225 |
REQUIRED_LINUX_VER = Advanced Server |
|
226 |
REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS 64 bit |
|
227 |
REQUIRED_OS_VERSION = 2.4.19-SMP |
|
228 |
endif |
|
229 |
endif |
|
230 |
# How much RAM does this machine have: |
|
231 |
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2) |
|
232 |
endif |
|
233 |
||
234 |
# Windows with and without CYGWIN will be slightly different |
|
235 |
ifeq ($(SYSTEM_UNAME), Windows_NT) |
|
236 |
PLATFORM = windows |
|
237 |
OS_VERSION := $(shell uname -r) |
|
238 |
WINDOWS_NT_VERSION_STRING=Windows_NT |
|
239 |
REQUIRED_MKS_VER=6.1 |
|
240 |
endif |
|
241 |
ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME))) |
|
242 |
PLATFORM = windows |
|
243 |
OS_VERSION := 5 |
|
244 |
USING_CYGWIN = true |
|
245 |
export USING_CYGWIN |
|
246 |
WINDOWS_NT_VERSION_STRING=CYGWIN_NT |
|
247 |
REQUIRED_CYGWIN_VER=4.0 |
|
248 |
endif |
|
249 |
||
250 |
# Platform settings specific to Windows |
|
251 |
ifeq ($(PLATFORM), windows) |
|
252 |
OS_NAME = nt |
|
253 |
REQUIRED_OS_VERSION=5 |
|
254 |
# Windows builds default to the appropriate for the underlaying |
|
255 |
# architecture. |
|
256 |
# Temporary disk area |
|
257 |
TEMP_DISK=C:/temp |
|
258 |
# GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always |
|
259 |
# 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
|
260 |
PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
261 |
PROC_ARCH:=$(subst x86,X86,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
262 |
PROC_ARCH:=$(subst x64,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
263 |
PROC_ARCH:=$(subst intel64,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
264 |
PROC_ARCH:=$(subst Intel64,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
265 |
PROC_ARCH:=$(subst INTEL64,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
266 |
PROC_ARCH:=$(subst em64t,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
267 |
PROC_ARCH:=$(subst EM64T,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
268 |
PROC_ARCH:=$(subst amd64,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
269 |
PROC_ARCH:=$(subst AMD64,X64,$(PROC_ARCH)) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
270 |
PROC_ARCH:=$(subst ia64,IA64,$(PROC_ARCH)) |
4 | 271 |
ifndef ARCH_DATA_MODEL |
2823
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
272 |
ifeq ($(PROC_ARCH),IA64) |
4 | 273 |
ARCH_DATA_MODEL=64 |
274 |
else |
|
2823
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
275 |
ifeq ($(PROC_ARCH),X64) |
4 | 276 |
ARCH_DATA_MODEL=64 |
277 |
else |
|
278 |
ARCH_DATA_MODEL=32 |
|
279 |
endif |
|
280 |
endif |
|
281 |
endif |
|
282 |
export ARCH_DATA_MODEL |
|
283 |
ARCH=i586 |
|
284 |
# Value of Java os.arch property |
|
285 |
ARCHPROP=x86 |
|
286 |
REQUIRED_WINDOWS_NAME=Windows Professional 2000 |
|
287 |
REQUIRED_WINDOWS_VERSION=5 0 Service Pack 4 |
|
288 |
ifeq ($(ARCH_DATA_MODEL), 64) |
|
289 |
# If the user wants to perform a cross compile build then they must |
|
290 |
# - set ARCH_DATA_MODEL=64 and either |
|
291 |
# + set ARCH to ia64 or amd64, or |
|
292 |
REQUIRED_WINDOWS_NAME=Windows Server 2003 |
|
293 |
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
|
294 |
ifeq ($(PROC_ARCH),X64) |
4 | 295 |
ARCH=amd64 |
296 |
else |
|
2823
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
297 |
ifeq ($(PROC_ARCH),IA64) |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
298 |
ARCH=ia64 |
80304d57bab0
6822374: Windows: detect X64 when PROCESSOR_IDENTIFIER contains EM64T or Intel64
ohair
parents:
4
diff
changeset
|
299 |
endif |
4 | 300 |
endif |
301 |
# Value of Java os.arch property |
|
6551
476ed8653670
6981043: Clean out all native code makefile logic from corba repository
ohair
parents:
5560
diff
changeset
|
302 |
ARCHPROP=$(ARCH) |
4 | 303 |
endif |
304 |
ARCH_FAMILY = $(ARCH) |
|
305 |
# Where is unwanted output to be delivered? |
|
5385
8308e15f228e
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
4290
diff
changeset
|
306 |
ifeq ($(USING_CYGWIN),true) |
8308e15f228e
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
4290
diff
changeset
|
307 |
DEV_NULL = /dev/null |
8308e15f228e
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
4290
diff
changeset
|
308 |
else |
8308e15f228e
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
4290
diff
changeset
|
309 |
DEV_NULL = NUL |
8308e15f228e
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
4290
diff
changeset
|
310 |
endif |
4 | 311 |
export DEV_NULL |
312 |
# Classpath separator |
|
313 |
CLASSPATH_SEPARATOR = ; |
|
314 |
# User name determination (set _USER) |
|
315 |
ifndef USER |
|
316 |
ifdef USERNAME |
|
317 |
_USER := $(USERNAME) |
|
318 |
else |
|
319 |
ifdef LOGNAME |
|
320 |
_USER := $(LOGNAME) |
|
321 |
else |
|
322 |
_USER := $(shell id -un) |
|
323 |
endif |
|
324 |
endif |
|
325 |
else |
|
326 |
_USER:=$(USER) |
|
327 |
endif |
|
328 |
# Suffix for file bundles used in previous release |
|
329 |
BUNDLE_FILE_SUFFIX=.tar |
|
330 |
# Minimum disk space needed as determined by running 'du -sk' on |
|
331 |
# a fully built workspace. |
|
332 |
REQUIRED_FREE_SPACE=500000 |
|
333 |
# 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
|
334 |
ifndef MB_OF_MEMORY |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
335 |
MB_OF_MEMORY := $(shell \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
336 |
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
|
337 |
( 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
|
338 |
grep Mem: | \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
339 |
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
|
340 |
else \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
341 |
echo "512"; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
342 |
fi) |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
343 |
export MB_OF_MEMORY |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
344 |
endif |
4 | 345 |
endif |
346 |
||
347 |
# Machines with 512Mb or less of real memory are considered low memory |
|
348 |
# build machines and adjustments will be made to prevent excessing |
|
349 |
# system swapping during the build. |
|
350 |
# If we don't know, assume 512. Subtract 128 from MB for VM MAX. |
|
351 |
# 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
|
352 |
ifndef MAX_VM_MEMORY |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
353 |
ifneq ($(MB_OF_MEMORY),) |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
354 |
LOW_MEMORY_MACHINE := $(shell \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
355 |
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
|
356 |
echo "true"; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
357 |
else \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
358 |
echo "false"; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
359 |
fi) |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
360 |
MAX_VM_MEMORY := $(shell \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
361 |
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
|
362 |
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
|
363 |
else \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
364 |
echo "896"; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
365 |
fi) |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
366 |
MIN_VM_MEMORY := $(shell \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
367 |
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
|
368 |
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
|
369 |
else \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
370 |
echo "128"; \ |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
371 |
fi) |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
372 |
else |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
373 |
MB_OF_MEMORY := unknown |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
374 |
LOW_MEMORY_MACHINE := true |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
375 |
MAX_VM_MEMORY := 384 |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
376 |
MIN_VM_MEMORY := 128 |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
377 |
endif |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
378 |
export MAX_VM_MEMORY |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
379 |
export MIN_VM_MEMORY |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
380 |
export LOW_MEMORY_MACHINE |
3d528461f61d
6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents:
3291
diff
changeset
|
381 |
export MAX_VM_MEMORY |
4 | 382 |
endif |
383 |
||
384 |
REQUIRED_ZIP_VER = 2.2 |
|
385 |
REQUIRED_UNZIP_VER = 5.12 |
|
7578
670662dc2a25
6909026: Change GNU make version requirement to 3.81
ohair
parents:
6551
diff
changeset
|
386 |
REQUIRED_MAKE_VER = 3.81 |
4 | 387 |
|
388 |
# Unix type settings (same for all unix platforms) |
|
389 |
ifneq ($(PLATFORM), windows) |
|
390 |
# Temporary disk area |
|
391 |
TEMP_DISK=/tmp |
|
392 |
# Where is unwanted output to be delivered? |
|
393 |
DEV_NULL = /dev/null |
|
394 |
export DEV_NULL |
|
395 |
# Character used between entries in classpath |
|
396 |
CLASSPATH_SEPARATOR = : |
|
397 |
# User name determination (set _USER) |
|
398 |
ifndef USER |
|
399 |
ifdef LOGNAME |
|
400 |
_USER := $(LOGNAME) |
|
401 |
else |
|
402 |
_USER := $(shell logname) |
|
403 |
endif |
|
404 |
else |
|
405 |
_USER:=$(USER) |
|
406 |
endif |
|
407 |
endif |
|
408 |
||
409 |
# If blanks in the username, use the first 4 words and pack them together |
|
410 |
_USER1:=$(subst ', ,$(_USER)) |
|
411 |
_USER2:=$(subst ", ,$(_USER1)) |
|
412 |
USER:=$(word 1,$(_USER2))$(word 2,$(_USER2))$(word 3,$(_USER2))$(word 4,$(_USER2)) |
|
413 |
export USER |
|
414 |
||
415 |
export PLATFORM |
|
416 |
endif |
|
417 |