comparison make/common/shared/Platform.gmk @ 422:c51121419e30

6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles Reviewed-by: tbell
author ohair
date Sun, 27 Jul 2008 18:42:57 -0700
parents 80759df0d279
children 2776a8638537
comparison
equal deleted inserted replaced
5:db86c8479fcb 6:c454dc49e8cf
371 # bundles build on windows. 371 # bundles build on windows.
372 ISHIELD_TEMP_MIN=250000 372 ISHIELD_TEMP_MIN=250000
373 REQUIRED_DXSDK_VER = 0x0700 373 REQUIRED_DXSDK_VER = 0x0700
374 OS_VENDOR = Microsoft 374 OS_VENDOR = Microsoft
375 # How much RAM does this machine have: 375 # How much RAM does this machine have:
376 ifeq ($(USING_CYGWIN),true) 376 ifeq ($(JDK_HAS_MEM_INFO),)
377 # CYGWIN has the 'free' utility 377 ifeq ($(USING_CYGWIN),true)
378 _MB_OF_MEMORY := \ 378 # CYGWIN has the 'free' utility
379 $(shell free -m | grep Mem: | awk '{print $$2;}' )
380 else
381 # Windows 2000 has the mem utility, but two memory areas
382 # extended memory is what is beyond 1024M
383 _B_OF_EXT_MEMORY := \
384 $(shell mem 2> $(DEV_NULL) | grep 'total contiguous extended memory' | awk '{print $$1;}')
385 ifeq ($(_B_OF_EXT_MEMORY),)
386 _B_OF_MEMORY := \
387 $(shell mem 2> $(DEV_NULL) | grep 'total conventional memory' | awk '{print $$1;}')
388 else
389 _B_OF_MEMORY := \
390 $(shell expr 1048576 '+' $(_B_OF_EXT_MEMORY) 2> $(DEV_NULL))
391 endif
392 ifeq ($(_B_OF_MEMORY),)
393 # Windows 2003 has the systeminfo utility use it if mem doesn't work
394 _MB_OF_MEMORY := \ 379 _MB_OF_MEMORY := \
395 $(shell systeminfo 2> $(DEV_NULL) | grep 'Total Physical Memory:' | awk '{print $$4;}' | sed -e 's@,@@') 380 $(shell free -m | grep Mem: | awk '{print $$2;}' )
396 else 381 else
397 _MB_OF_MEMORY := $(shell expr $(_B_OF_MEMORY) '/' 1024 2> $(DEV_NULL)) 382 # Windows 2000 has the mem utility, but two memory areas
398 endif 383 # extended memory is what is beyond 1024M
399 endif 384 _B_OF_EXT_MEMORY := \
400 ifeq ($(shell expr $(_MB_OF_MEMORY) '+' 0 2> $(DEV_NULL)), $(_MB_OF_MEMORY)) 385 $(shell mem 2> $(DEV_NULL) | \
401 MB_OF_MEMORY := $(_MB_OF_MEMORY) 386 grep 'total contiguous extended memory' | awk '{print $$1;}')
402 else 387 ifeq ($(_B_OF_EXT_MEMORY),)
403 MB_OF_MEMORY := 512 388 _B_OF_MEMORY := \
389 $(shell mem 2> $(DEV_NULL) | \
390 grep 'total conventional memory' | awk '{print $$1;}')
391 else
392 _B_OF_MEMORY := \
393 $(shell expr 1048576 '+' $(_B_OF_EXT_MEMORY) 2> $(DEV_NULL))
394 endif
395 ifeq ($(_B_OF_MEMORY),)
396 # Windows 2003 has the systeminfo utility use it if mem doesn't work
397 _MB_OF_MEMORY := \
398 $(shell systeminfo 2> $(DEV_NULL) | \
399 grep 'Total Physical Memory:' | \
400 awk '{print $$4;}' | sed -e 's@,@@')
401 else
402 _MB_OF_MEMORY := $(shell expr $(_B_OF_MEMORY) '/' 1024 2> $(DEV_NULL))
403 endif
404 endif
405 ifeq ($(shell expr $(_MB_OF_MEMORY) '+' 0 2> $(DEV_NULL)), $(_MB_OF_MEMORY))
406 MB_OF_MEMORY := $(_MB_OF_MEMORY)
407 else
408 MB_OF_MEMORY := 512
409 endif
404 endif 410 endif
405 endif 411 endif
406 412
407 REQUIRED_ZIP_VER = 2.2 413 REQUIRED_ZIP_VER = 2.2
408 REQUIRED_UNZIP_VER = 5.12 414 REQUIRED_UNZIP_VER = 5.12
444 # Machines with 512Mb or less of real memory are considered low memory 450 # Machines with 512Mb or less of real memory are considered low memory
445 # build machines and adjustments will be made to prevent excessing 451 # build machines and adjustments will be made to prevent excessing
446 # system swapping during the build. 452 # system swapping during the build.
447 # If we don't know, assume 512. Subtract 128 from MB for VM MAX. 453 # If we don't know, assume 512. Subtract 128 from MB for VM MAX.
448 # Don't set VM max over 1024-128=896. 454 # Don't set VM max over 1024-128=896.
449 ifneq ($(MB_OF_MEMORY),) 455 ifeq ($(JDK_HAS_MEM_INFO),)
450 LOW_MEMORY_MACHINE := $(shell \ 456 JDK_HAS_MEM_INFO=true
451 if [ $(MB_OF_MEMORY) -le 512 ] ; then \ 457 export JDK_HAS_MEM_INFO
452 echo "true"; \ 458 ifneq ($(MB_OF_MEMORY),)
453 else \ 459 LOW_MEMORY_MACHINE := $(shell \
454 echo "false"; \ 460 if [ $(MB_OF_MEMORY) -le 512 ] ; then \
455 fi) 461 echo "true"; \
456 MAX_VM_MEMORY := $(shell \ 462 else \
457 if [ $(MB_OF_MEMORY) -le 1024 ] ; then \ 463 echo "false"; \
458 expr $(MB_OF_MEMORY) '-' 128 2> $(DEV_NULL) ; \ 464 fi)
459 else \ 465 MAX_VM_MEMORY := $(shell \
460 echo "896"; \ 466 if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
461 fi) 467 expr $(MB_OF_MEMORY) '-' 128 2> $(DEV_NULL) ; \
462 MIN_VM_MEMORY := $(shell \ 468 else \
463 if [ $(MAX_VM_MEMORY) -le 128 ] ; then \ 469 echo "896"; \
464 expr $(MAX_VM_MEMORY) '-' 8 2> $(DEV_NULL) ; \ 470 fi)
465 else \ 471 MIN_VM_MEMORY := $(shell \
466 echo "128"; \ 472 if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
467 fi) 473 expr $(MAX_VM_MEMORY) '-' 8 2> $(DEV_NULL) ; \
468 else 474 else \
469 MB_OF_MEMORY := unknown 475 echo "128"; \
470 LOW_MEMORY_MACHINE := true 476 fi)
471 MAX_VM_MEMORY := 384 477 else
472 MIN_VM_MEMORY := 128 478 MB_OF_MEMORY := unknown
479 LOW_MEMORY_MACHINE := true
480 MAX_VM_MEMORY := 384
481 MIN_VM_MEMORY := 128
482 endif
483 export MB_OF_MEMORY
484 export LOW_MEMORY_MACHINE
485 export MAX_VM_MEMORY
486 export MIN_VM_MEMORY
473 endif 487 endif
474 488
475 # If blanks in the username, use the first 4 words and pack them together 489 # If blanks in the username, use the first 4 words and pack them together
476 _USER1:=$(subst ', ,$(_USER)) 490 _USER1:=$(subst ', ,$(_USER))
477 _USER2:=$(subst ", ,$(_USER1)) 491 _USER2:=$(subst ", ,$(_USER1))