82 # REQUIRED_UNZIP_VER required version of unzip |
82 # REQUIRED_UNZIP_VER required version of unzip |
83 # LINUX_VERSION_INFO linux only: location of linux release file |
83 # LINUX_VERSION_INFO linux only: location of linux release file |
84 # REQUIRED_LINUX_VER linux only: required version of linux |
84 # REQUIRED_LINUX_VER linux only: required version of linux |
85 # REQUIRED_LINUX_FULLVER linux only: required full version of linux |
85 # REQUIRED_LINUX_FULLVER linux only: required full version of linux |
86 |
86 |
87 SYSTEM_UNAME := $(shell uname) |
87 ifndef SYSTEM_UNAME |
|
88 SYSTEM_UNAME := $(shell uname) |
|
89 export SYSTEM_UNAME |
|
90 endif |
88 |
91 |
89 # Normal boot jdk is previous release, but a hard requirement is a 1.5 boot |
92 # Normal boot jdk is previous release, but a hard requirement is a 1.5 boot |
90 REQUIRED_BOOT_VER = 1.5 |
93 REQUIRED_BOOT_VER = 1.5 |
91 |
|
92 # |
|
93 # Prune out all known SCM (Source Code Management) directories |
|
94 # so they will not be included when copying directory trees |
|
95 # or packaging up .jar files, etc. This applies to all workspaces. |
|
96 # |
|
97 SCM_DIRs = .hg .svn CVS RCS SCCS Codemgr_wsdata deleted_files |
|
98 # When changing SCM_DIRs also change SCM_DIRS_rexp and SCM_DIRS_prune: |
|
99 SCM_DIRS_rexp = ".hg|.svn|CVS|RCS|SCCS|Codemgr_wsdata|deleted_files" |
|
100 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 \) -prune |
|
101 |
94 |
102 # Don't define this unless it's not defined |
95 # Don't define this unless it's not defined |
103 ifndef VARIANT |
96 ifndef VARIANT |
104 VARIANT=OPT |
97 VARIANT=OPT |
105 endif |
98 endif |
370 # Minimum disk space needed as determined by running 'du -sk' on |
363 # Minimum disk space needed as determined by running 'du -sk' on |
371 # a fully built workspace. |
364 # a fully built workspace. |
372 REQUIRED_FREE_SPACE=500000 |
365 REQUIRED_FREE_SPACE=500000 |
373 OS_VENDOR = Microsoft |
366 OS_VENDOR = Microsoft |
374 # How much RAM does this machine have: |
367 # How much RAM does this machine have: |
375 MB_OF_MEMORY := $(shell \ |
368 ifndef MB_OF_MEMORY |
376 if [ -f "C:/cygwin/bin/free.exe" ] ; then \ |
369 MB_OF_MEMORY := $(shell \ |
377 ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \ |
370 if [ -f "C:/cygwin/bin/free.exe" ] ; then \ |
378 grep Mem: | \ |
371 ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \ |
379 sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \ |
372 grep Mem: | \ |
380 else \ |
373 sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \ |
381 echo "512"; \ |
374 else \ |
382 fi) |
375 echo "512"; \ |
|
376 fi) |
|
377 export MB_OF_MEMORY |
|
378 endif |
383 endif |
379 endif |
384 |
380 |
385 # Machines with 512Mb or less of real memory are considered low memory |
381 # Machines with 512Mb or less of real memory are considered low memory |
386 # build machines and adjustments will be made to prevent excessing |
382 # build machines and adjustments will be made to prevent excessing |
387 # system swapping during the build. |
383 # system swapping during the build. |
388 # If we don't know, assume 512. Subtract 128 from MB for VM MAX. |
384 # If we don't know, assume 512. Subtract 128 from MB for VM MAX. |
389 # Don't set VM max over 1024-128=896. |
385 # Don't set VM max over 1024-128=896. |
390 ifneq ($(MB_OF_MEMORY),) |
386 ifndef MAX_VM_MEMORY |
391 LOW_MEMORY_MACHINE := $(shell \ |
387 ifneq ($(MB_OF_MEMORY),) |
392 if [ $(MB_OF_MEMORY) -le 512 ] ; then \ |
388 LOW_MEMORY_MACHINE := $(shell \ |
393 echo "true"; \ |
389 if [ $(MB_OF_MEMORY) -le 512 ] ; then \ |
394 else \ |
390 echo "true"; \ |
395 echo "false"; \ |
391 else \ |
396 fi) |
392 echo "false"; \ |
397 MAX_VM_MEMORY := $(shell \ |
393 fi) |
398 if [ $(MB_OF_MEMORY) -le 1024 ] ; then \ |
394 MAX_VM_MEMORY := $(shell \ |
399 expr $(MB_OF_MEMORY) '-' 128 ; \ |
395 if [ $(MB_OF_MEMORY) -le 1024 ] ; then \ |
400 else \ |
396 expr $(MB_OF_MEMORY) '-' 128 ; \ |
401 echo "896"; \ |
397 else \ |
402 fi) |
398 echo "896"; \ |
403 MIN_VM_MEMORY := $(shell \ |
399 fi) |
404 if [ $(MAX_VM_MEMORY) -le 128 ] ; then \ |
400 MIN_VM_MEMORY := $(shell \ |
405 expr $(MAX_VM_MEMORY) '-' 8 ; \ |
401 if [ $(MAX_VM_MEMORY) -le 128 ] ; then \ |
406 else \ |
402 expr $(MAX_VM_MEMORY) '-' 8 ; \ |
407 echo "128"; \ |
403 else \ |
408 fi) |
404 echo "128"; \ |
409 else |
405 fi) |
410 MB_OF_MEMORY := unknown |
406 else |
411 LOW_MEMORY_MACHINE := true |
407 MB_OF_MEMORY := unknown |
412 MAX_VM_MEMORY := 384 |
408 LOW_MEMORY_MACHINE := true |
413 MIN_VM_MEMORY := 128 |
409 MAX_VM_MEMORY := 384 |
|
410 MIN_VM_MEMORY := 128 |
|
411 endif |
|
412 export MAX_VM_MEMORY |
|
413 export MIN_VM_MEMORY |
|
414 export LOW_MEMORY_MACHINE |
|
415 export MAX_VM_MEMORY |
414 endif |
416 endif |
415 |
417 |
416 REQUIRED_ZIP_VER = 2.2 |
418 REQUIRED_ZIP_VER = 2.2 |
417 REQUIRED_UNZIP_VER = 5.12 |
419 REQUIRED_UNZIP_VER = 5.12 |
418 REQUIRED_MAKE_VER = 3.78 |
420 REQUIRED_MAKE_VER = 3.78 |