6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
Summary: Added optional _BOOTDIR3 that provides the J: path for the BOOTDIR on Windows
Reviewed-by: ohair, xdono
1.1 --- a/make/common/Sanity.gmk Tue May 19 14:14:31 2009 +0400
1.2 +++ b/make/common/Sanity.gmk Tue May 19 14:43:49 2009 +0400
1.3 @@ -92,6 +92,7 @@
1.4 sane-ld_run_path \
1.5 sane-alt_bootdir \
1.6 sane-bootdir \
1.7 + sane-local-bootdir \
1.8 sane-alsa-headers \
1.9 sane-jibx
1.10
2.1 --- a/make/common/shared/Defs-windows.gmk Tue May 19 14:14:31 2009 +0400
2.2 +++ b/make/common/shared/Defs-windows.gmk Tue May 19 14:43:49 2009 +0400
2.3 @@ -431,9 +431,11 @@
2.4
2.5 # _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
2.6 # _BOOTDIR2: Second choice
2.7 +# The _BOOTDIR3 is defind optionally.
2.8 ifndef ALT_BOOTDIR
2.9 _BOOTDIR1 =$(_system_drive)/jdk$(PREVIOUS_JDK_VERSION)
2.10 _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
2.11 + _BOOTDIR3 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
2.12 endif
2.13
2.14 # 32 bit always needs 2 runtimes, 64 bit usually does too
3.1 --- a/make/common/shared/Defs.gmk Tue May 19 14:14:31 2009 +0400
3.2 +++ b/make/common/shared/Defs.gmk Tue May 19 14:43:49 2009 +0400
3.3 @@ -94,6 +94,21 @@
3.4 fi)
3.5 endef
3.6
3.7 +# Select a directory if it exists, or the alternate 2, or the alternate 3, or the alternate 4
3.8 +define DirExists4
3.9 +$(shell \
3.10 + if [ -d "$1" ]; then \
3.11 + echo "$1"; \
3.12 + elif [ -d "$2" ]; then \
3.13 + echo "$2"; \
3.14 + elif [ -d "$3" ]; then \
3.15 + echo "$3"; \
3.16 + else \
3.17 + echo "$4"; \
3.18 + fi)
3.19 +endef
3.20 +
3.21 +
3.22 # Select a writable directory if it exists and is writable, or the alternate
3.23 define WriteDirExists
3.24 $(shell \
3.25 @@ -356,10 +371,15 @@
3.26
3.27 # BOOTDIR: Bootstrap JDK, previous released JDK.
3.28 # _BOOTDIR1 and _BOOTDIR2 picked by platform
3.29 +# Platform may optionally define _BOOTDIR3 as well.
3.30 ifdef ALT_BOOTDIR
3.31 BOOTDIR =$(ALT_BOOTDIR)
3.32 else
3.33 - BOOTDIR :=$(call DirExists,$(_BOOTDIR1),$(_BOOTDIR2),/NO_BOOTDIR)
3.34 + ifdef _BOOTDIR3
3.35 + BOOTDIR :=$(call DirExists4,$(_BOOTDIR1),$(_BOOTDIR2),$(_BOOTDIR3),/NO_BOOTDIR)
3.36 + else
3.37 + BOOTDIR :=$(call DirExists,$(_BOOTDIR1),$(_BOOTDIR2),/NO_BOOTDIR)
3.38 + endif
3.39 endif
3.40 export BOOTDIR
3.41 BOOTDIR:=$(call AltCheckSpaces,BOOTDIR)
4.1 --- a/make/common/shared/Sanity.gmk Tue May 19 14:14:31 2009 +0400
4.2 +++ b/make/common/shared/Sanity.gmk Tue May 19 14:43:49 2009 +0400
4.3 @@ -194,7 +194,8 @@
4.4 sane-outputdir \
4.5 sane-alt_bootdir \
4.6 sane-bootdir \
4.7 - sane-cups \
4.8 + sane-local-bootdir \
4.9 + sane-cups \
4.10 sane-devtools_path \
4.11 sane-compiler_path \
4.12 sane-unixcommand_path \
4.13 @@ -767,6 +768,23 @@
4.14 fi
4.15
4.16 ######################################################
4.17 +# BOOTDIR is recommended to reside on a local drive
4.18 +######################################################
4.19 +sane-local-bootdir:
4.20 +ifeq ($(PLATFORM), windows)
4.21 + @if [ `$(ECHO) $(BOOTDIR) | $(EGREP) -ci '^J:'` -ne 0 ]; then \
4.22 + $(ECHO) "WARNING: Your BOOTDIR is located on the J: drive. Often the J:\n" \
4.23 + " drive is mapped over a network. Using a mapped drive for\n" \
4.24 + " the BOOTDIR may significantly slow down the build process.\n" \
4.25 + " You may want to consider using the ALT_BOOTDIR variable\n" \
4.26 + " to point the build to another location for the BOOTDIR instead. \n" \
4.27 + " Your current BOOTDIR is:\n" \
4.28 + " $(BOOTDIR) \n" \
4.29 + "" >> $(WARNING_FILE) ; \
4.30 + fi
4.31 +endif
4.32 +
4.33 +######################################################
4.34 # CACERTS_FILE must be absoulte path and readable
4.35 ######################################################
4.36 sane-cacerts: