jdk/make/common/shared/Sanity.gmk
changeset 9457 57358dca0845
parent 8828 fb3ae88d8e8d
child 11217 76f62fffcaf6
equal deleted inserted replaced
9398:5d86d0c7692e 9457:57358dca0845
    67 
    67 
    68 
    68 
    69 # Settings and rules to validate the JDK build environment.
    69 # Settings and rules to validate the JDK build environment.
    70 
    70 
    71 ifeq ($(PLATFORM), solaris)
    71 ifeq ($(PLATFORM), solaris)
    72   FREE_SPACE := $(shell $(DF) -b $(OUTPUTDIR) | $(TAIL) -1 | $(NAWK) '{print $$2;}')
       
    73   TEMP_FREE_SPACE := $(shell $(DF) -b $(TEMP_DISK) | $(TAIL) -1 | $(NAWK) '{print $$2;}')
       
    74   # What kind of system we are using (Variations are Solaris and OpenSolaris)
    72   # What kind of system we are using (Variations are Solaris and OpenSolaris)
    75   OS_VERSION := $(shell uname -r)
    73   OS_VERSION := $(shell uname -r)
    76   OS_VARIANT_NAME := $(strip $(shell head -1 /etc/release | awk '{print $$1;}') )
    74   OS_VARIANT_NAME := $(strip $(shell head -1 /etc/release | awk '{print $$1;}') )
    77   OS_VARIANT_VERSION := $(OS_VERSION)
    75   OS_VARIANT_VERSION := $(OS_VERSION)
    78   REQ_PATCH_LIST = $(JDK_TOPDIR)/make/PatchList.solaris
    76   REQ_PATCH_LIST = $(JDK_TOPDIR)/make/PatchList.solaris
    86     GCC_VER  :=$(call GetVersion,"$(_GCC_VER)")
    84     GCC_VER  :=$(call GetVersion,"$(_GCC_VER)")
    87   endif
    85   endif
    88 endif
    86 endif
    89 
    87 
    90 ifeq ($(PLATFORM), linux)
    88 ifeq ($(PLATFORM), linux)
    91   FREE_SPACE := $(shell $(DF) --sync -kP $(OUTPUTDIR) | $(TAIL) -1 | $(NAWK) '{print $$4;}')
       
    92   TEMP_FREE_SPACE := $(shell $(DF) --sync -kP $(TEMP_DISK) | $(TAIL) -1 | $(NAWK) '{print $$4;}')
       
    93   # What kind of system we are using (Variation is the Linux vendor)
    89   # What kind of system we are using (Variation is the Linux vendor)
    94   OS_VERSION := $(shell uname -r)
    90   OS_VERSION := $(shell uname -r)
    95   OS_VARIANT_NAME := $(shell \
    91   OS_VARIANT_NAME := $(shell \
    96     if [ -f /etc/fedora-release ] ; then \
    92     if [ -f /etc/fedora-release ] ; then \
    97       echo "Fedora"; \
    93       echo "Fedora"; \
   116            $(SED) -e 's@.*"\(.*\)".*@\1@' )
   112            $(SED) -e 's@.*"\(.*\)".*@\1@' )
   117   ALSA_VERSION := $(call GetVersion,$(_ALSA_VERSION))
   113   ALSA_VERSION := $(call GetVersion,$(_ALSA_VERSION))
   118 endif
   114 endif
   119 
   115 
   120 ifeq ($(PLATFORM), windows)
   116 ifeq ($(PLATFORM), windows)
   121   FREE_SPACE := $(shell $(DF) -kP $(OUTPUTDIR) | $(TAIL) -1 | $(NAWK) '{print $$4;}')
       
   122   TEMP_FREE_SPACE := $(shell $(DF) -kP $(TEMP_DISK) | $(TAIL) -1 | $(NAWK) '{print $$4;}')
       
   123   # Windows 2000 is 5.0, Windows XP is 5.1, Windows 2003 is 5.2
   117   # Windows 2000 is 5.0, Windows XP is 5.1, Windows 2003 is 5.2
   124   #    Assume 5.0 (Windows 2000) if systeminfo does not help
   118   #    Assume 5.0 (Windows 2000) if systeminfo does not help
   125   WINDOWS_MAPPING-5.0 := Windows2000
   119   WINDOWS_MAPPING-5.0 := Windows2000
   126   WINDOWS_MAPPING-5.1 := WindowsXP
   120   WINDOWS_MAPPING-5.1 := WindowsXP
   127   WINDOWS_MAPPING-5.2 := Windows2003
   121   WINDOWS_MAPPING-5.2 := Windows2003
   713 	    "      current value of OUTPUTDIR is \n" \
   707 	    "      current value of OUTPUTDIR is \n" \
   714 	    "          $(OUTPUTDIR) \n" \
   708 	    "          $(OUTPUTDIR) \n" \
   715 	    "      Either obtain these permissions or set ALT_OUTPUTDIR. \n" \
   709 	    "      Either obtain these permissions or set ALT_OUTPUTDIR. \n" \
   716 	    "" >> $(ERROR_FILE) ; \
   710 	    "" >> $(ERROR_FILE) ; \
   717 	fi
   711 	fi
   718 	@#
       
   719 	@# OUTPUTDIR must have enough free space...
       
   720 	@#
       
   721 	@if [ $(FREE_SPACE) -lt $(REQUIRED_FREE_SPACE) ]; then \
       
   722 	  $(ECHO) "WARNING: You may not have enough free space in your OUTPUTDIR. The \n" \
       
   723 	    "        current value of OUTPUTDIR is \n" \
       
   724 	    "            $(OUTPUTDIR) \n" \
       
   725 	    "        You need "$(REQUIRED_FREE_SPACE)" Kbytes free on this device to build \n" \
       
   726 	    "        and it appears that only "$(FREE_SPACE)" Kbytes are free. \n" \
       
   727 	    "        Either obtain more space or set ALT_OUTPUTDIR to a larger disk. \n" \
       
   728 	    "" >> $(WARNING_FILE) ; \
       
   729 	fi
       
   730 
   712 
   731 ######################################################
   713 ######################################################
   732 # if specified, ALT_BOOTDIR must point to non-relative path if set
   714 # if specified, ALT_BOOTDIR must point to non-relative path if set
   733 ######################################################
   715 ######################################################
   734 sane-alt_bootdir:
   716 sane-alt_bootdir: