jdk/make/common/shared/Defs-windows.gmk
changeset 2 90ce3da70b43
child 2602 5b394a4b6ce1
child 1025 a9ba5ea0f1f7
equal deleted inserted replaced
0:fd16c54261b3 2:90ce3da70b43
       
     1 #
       
     2 # Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
       
     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
       
     7 # published by the Free Software Foundation.  Sun designates this
       
     8 # particular file as subject to the "Classpath" exception as provided
       
     9 # by Sun in the LICENSE file that accompanied this code.
       
    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 #
       
    21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
       
    22 # CA 95054 USA or visit www.sun.com if you need additional information or
       
    23 # have any questions.
       
    24 #
       
    25 
       
    26 #
       
    27 # Definitions for Windows.
       
    28 #
       
    29 
       
    30 # Default for COMPILER_WARNINGS_FATAL on Windows (C++ compiler warnings)
       
    31 #    Level: Default is 3, 0 means none, 4 is the most but may be unreliable
       
    32 #    Some makefiles may have set this to 0 to turn off warnings completely,
       
    33 #    which also effectively creates a COMPILER_WARNINGS_FATAL=false situation.
       
    34 #    Program.gmk may turn this down to 2 (building .exe's).
       
    35 #    Windows 64bit platforms are less likely to be warning free.
       
    36 #    Historically, Windows 32bit builds should be mostly warning free.
       
    37 ifndef COMPILER_WARNING_LEVEL
       
    38   COMPILER_WARNING_LEVEL=3
       
    39 endif
       
    40 ifndef COMPILER_WARNINGS_FATAL
       
    41   COMPILER_WARNINGS_FATAL=false
       
    42 endif
       
    43 
       
    44 # Windows should use parallel compilation for best build times
       
    45 ifndef COMPILE_APPROACH
       
    46   COMPILE_APPROACH = normal
       
    47 endif
       
    48 
       
    49 # Indication that we are doing an incremental build.
       
    50 #    This may trigger the creation of make depend files.
       
    51 #    (This may not be working on windows yet, always force to false.)
       
    52 override INCREMENTAL_BUILD = false
       
    53 
       
    54 # WARNING: This is extremely touch stuff, between CYGWIN vs. MKS and all
       
    55 #          variations of MKS and CYGWIN releases, and 32bit vs 64bit,
       
    56 #          this file can give you nightmares.
       
    57 #
       
    58 # Notes:
       
    59 #   Keep all paths in the windows "mixed" style except CYGWIN UNXIXCOMMAND_PATH.
       
    60 #   Use of PrefixPath is critical, some variables must end with / (see NOTE).
       
    61 #   Use of quotes is critical due to possible spaces in paths coming from
       
    62 #     the environment variables, be careful.
       
    63 #   First convert \ to / with subst, keep it quoted due to blanks, then
       
    64 #     use cygpath -s or dosname -s to get the short non-blank name.
       
    65 #   If the MKS is old and doesn't have a dosname -s, you will be forced
       
    66 #     to set ALT variables with the short non-space directory names.
       
    67 #     If dosname doesn't appear to work, we won't use it.
       
    68 #     The dosname utility also wants to accept stdin if it is not supplied
       
    69 #     any path on the command line, this is really dangerous when using
       
    70 #     make variables that can easily become empty, so I use:
       
    71 #        echo $1 | dosname -s     instead of    dosname -s $1
       
    72 #     to prevent dosname from hanging up the make process when $1 is empty.
       
    73 #     The cygpath utility does not have this problem.
       
    74 #   The ALT values should never really have spaces or use \.
       
    75 #   Suspect these environment variables to have spaces and/or \ characters:
       
    76 #     SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
       
    77 #     DXSDK_DIR, MSTOOLS, Mstools, MSSDK, MSSdk, VC71COMNTOOLS, 
       
    78 #     MSVCDIR, MSVCDir.
       
    79 #     So use $(subst \,/,) on them first adding quotes and placing them in
       
    80 #         their own variable assigned with :=, then use FullPath.
       
    81 #
       
    82 
       
    83 # Use FullPath to get C:/ style non-spaces path. Never ends with a /!
       
    84 ifdef USING_CYGWIN
       
    85 # We assume cygpath is available in the search path
       
    86 #    NOTE: Use of 'pwd' with CYGWIN will not get you a mixed style path!
       
    87 CYGPATH_CMD=cygpath -a -s -m
       
    88 define FullPath
       
    89 $(shell $(CYGPATH_CMD) $1 2> $(DEV_NULL))
       
    90 endef
       
    91 define OptFullPath
       
    92 $(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1"; else echo "$1"; fi)
       
    93 endef
       
    94 else
       
    95 # Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path
       
    96 define FullPath
       
    97 $(shell cd $1 2> $(DEV_NULL) && pwd)
       
    98 endef
       
    99 define OptFullPath
       
   100 $(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
       
   101 endef
       
   102 endif
       
   103 
       
   104 # System drive
       
   105 ifdef SYSTEMDRIVE
       
   106   _system_drive =$(SYSTEMDRIVE)
       
   107 else
       
   108   ifdef SystemDrive
       
   109     _system_drive =$(SystemDrive)
       
   110   endif
       
   111 endif
       
   112 _system_drive:=$(call CheckValue,_system_drive,C:)
       
   113 
       
   114 # UNIXCOMMAND_PATH: path to where the most common Unix commands are.
       
   115 #  NOTE: Must end with / so that it could be empty, allowing PATH usage.
       
   116 ifdef ALT_UNIXCOMMAND_PATH
       
   117   xALT_UNIXCOMMAND_PATH  :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
       
   118   fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
       
   119   UNIXCOMMAND_PATH       :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
       
   120 else
       
   121   ifdef USING_CYGWIN
       
   122     UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
       
   123   else
       
   124     ifdef ROOTDIR
       
   125       xROOTDIR :="$(subst \,/,$(ROOTDIR))"
       
   126       _rootdir :=$(call FullPath,$(xROOTDIR))
       
   127     else
       
   128       xROOTDIR :="$(_system_drive)/mksnt"
       
   129       _rootdir :=$(call FullPath,$(xROOTDIR))
       
   130     endif
       
   131     ifneq ($(_rootdir),)
       
   132       UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
       
   133     endif
       
   134   endif
       
   135 endif
       
   136 UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
       
   137 
       
   138 # Get version of MKS or CYGWIN
       
   139 ifdef USING_CYGWIN
       
   140 _CYGWIN_VER :=$(shell $(UNAME))
       
   141 CYGWIN_VER  :=$(call GetVersion,$(_CYGWIN_VER))
       
   142 else # MKS
       
   143 _MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
       
   144 MKS_VER  :=$(call GetVersion,$(_MKS_VER))
       
   145 # At this point, we can re-define FullPath to use DOSNAME_CMD
       
   146 CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
       
   147 TRY_DOSNAME:=false
       
   148 ifeq ($(CHECK_MKS87),same)
       
   149 TRY_DOSNAME:=true
       
   150 endif
       
   151 # Newer should be ok
       
   152 ifeq ($(CHECK_MKS87),newer)
       
   153 TRY_DOSNAME:=true
       
   154 endif
       
   155 ifeq ($(TRY_DOSNAME),true)
       
   156 ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
       
   157 _DOSNAME=$(UNIXCOMMAND_PATH)dosname
       
   158 DOSNAME_CMD:=$(_DOSNAME) -s
       
   159 define FullPath
       
   160 $(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL)))
       
   161 endef
       
   162 endif # test dosname -s
       
   163 endif # TRY_DOSNAME
       
   164 endif # MKS
       
   165 
       
   166 # We try to get references to what we need via the default component
       
   167 #    environment variables, or what was used historically.
       
   168 
       
   169 # Process Windows values into FullPath values, these paths may have \ chars
       
   170 
       
   171 # System root
       
   172 ifdef SYSTEMROOT
       
   173   xSYSTEMROOT  :="$(subst \,/,$(SYSTEMROOT))"
       
   174   _system_root :=$(call FullPath,$(xSYSTEMROOT))
       
   175 else
       
   176   ifdef SystemRoot
       
   177      xSYSTEMROOT :="$(subst \,/,$(SystemRoot))"
       
   178     _system_root :=$(call FullPath,$(xSYSTEMROOT))
       
   179   else
       
   180     ifdef WINDIR
       
   181       xWINDIR      :="$(subst \,/,$(WINDIR))"
       
   182       _system_root :=$(call FullPath,$(xWINDIR))
       
   183     else
       
   184       ifdef windir
       
   185         xWINDIR      :="$(subst \,/,$(windir))"
       
   186         _system_root :=$(call FullPath,$(xWINDIR))
       
   187       endif
       
   188     endif
       
   189   endif
       
   190 endif
       
   191 _system_root:=$(call CheckValue,_system_root,$(_system_drive)/WINNT)
       
   192 
       
   193 # Program Files directory
       
   194 ifdef PROGRAMFILES
       
   195   xPROGRAMFILES      :="$(subst \,/,$(PROGRAMFILES))"
       
   196 else
       
   197   ifeq ($(ARCH_DATA_MODEL), 32)
       
   198     xPROGRAMFILES    :="$(_system_drive)/Program Files"
       
   199   else
       
   200     xPROGRAMFILES    :="$(_system_drive)/Program Files (x86)"
       
   201   endif
       
   202 endif
       
   203 ifeq ($(ARCH_DATA_MODEL), 32)
       
   204   _program_files     :=$(call FullPath,$(xPROGRAMFILES))
       
   205 else
       
   206   ifdef PROGRAMW6432
       
   207     xPROGRAMW6432    :="$(subst \,/,$(PROGRAMW6432))"
       
   208   else
       
   209     xPROGRAMW6432    :="$(_system_drive)/Program Files"
       
   210   endif
       
   211   _program_files     :=$(call FullPath,$(xPROGRAMW6432))
       
   212   _program_files32   :=$(call FullPath,$(xPROGRAMFILES))
       
   213   ifneq ($(word 1,$(_program_files32)),$(_program_files32))
       
   214     _program_files32:=
       
   215   endif
       
   216 endif
       
   217 ifneq ($(word 1,$(_program_files)),$(_program_files))
       
   218   _program_files:=
       
   219 endif
       
   220 
       
   221 # DirectX SDK
       
   222 ifdef ALT_DXSDK_DRIVE
       
   223   _dx_sdk_dir  =$(ALT_DXSDK_DRIVE):/DXSDK
       
   224 else
       
   225   ifdef DXSDK_DIR
       
   226     xDXSDK_DIR  :="$(subst \,/,$(DXSDK_DIR))"
       
   227   else
       
   228     xDXSDK_DIR  :="$(_system_drive)/DXSDK"
       
   229   endif
       
   230   _dx_sdk_dir :=$(call FullPath,$(xDXSDK_DIR))
       
   231 endif
       
   232 
       
   233 # Compilers, SDK, and Visual Studio (MSDEV) [32bit is different from 64bit]
       
   234 ifeq ($(ARCH_DATA_MODEL), 32)
       
   235   # Try looking in MSVCDIR or MSVCDir area first (set by vcvars32.bat)
       
   236   ifdef MSVCDIR
       
   237     xMSVCDIR  :="$(subst \,/,$(MSVCDIR))"
       
   238     _msvc_dir :=$(call FullPath,$(xMSVCDIR))
       
   239   else
       
   240     ifdef MSVCDir
       
   241       xMSVCDIR  :="$(subst \,/,$(MSVCDir))"
       
   242       _msvc_dir :=$(call FullPath,$(xMSVCDIR))
       
   243     else
       
   244       ifneq ($(_program_files),)
       
   245         xMSVCDIR  :="$(_program_files)/Microsoft Visual Studio .NET 2003/Vc7"
       
   246         _msvc_dir :=$(call FullPath,$(xMSVCDIR))
       
   247       endif
       
   248     endif
       
   249   endif
       
   250   ifneq ($(subst MSDev98,OLDOLDOLD,$(_msvc_dir)),$(_msvc_dir))
       
   251     _msvc_dir :=
       
   252   endif
       
   253   # If we still don't have it, look for VS71COMNTOOLS, setup by installer?
       
   254   ifeq ($(_msvc_dir),)
       
   255     ifdef VS71COMNTOOLS  # /Common/Tools directory, use ../../Vc7
       
   256       xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
       
   257       _vs71tools     :=$(call FullPath,$(xVS71COMNTOOLS))
       
   258     endif
       
   259     ifneq ($(_vs71tools),)
       
   260       _msvc_dir :=$(_vs71tools)/../../Vc7
       
   261     endif
       
   262   endif
       
   263   ifneq ($(_msvc_dir),)
       
   264     _compiler_bin :=$(_msvc_dir)/Bin
       
   265     _redist_sdk   :=$(_msvc_dir)/../SDK/v1.1/Bin
       
   266     _ms_sdk       :=$(_msvc_dir)/PlatformSDK
       
   267   endif
       
   268 endif
       
   269 
       
   270 # The Microsoft Platform SDK installed by itself
       
   271 ifneq ($(_program_files),)
       
   272   xPSDK  :="$(_program_files)/Microsoft Platform SDK"
       
   273   _psdk  :=$(call FullPath,$(xPSDK))
       
   274   ifeq ($(_psdk),)
       
   275     xPSDK  :="$(_program_files)/Microsoft SDK"
       
   276     _psdk :=$(call FullPath,$(xMSSDK))
       
   277   endif
       
   278 endif
       
   279 
       
   280 # If no SDK found yet, look in other places
       
   281 ifeq ($(_ms_sdk),)
       
   282   ifdef MSSDK
       
   283     xMSSDK  :="$(subst \,/,$(MSSDK))"
       
   284     _ms_sdk :=$(call FullPath,$(xMSSDK))
       
   285   else
       
   286     ifdef MSSdk
       
   287       xMSSDK  :="$(subst \,/,$(MSSdk))"
       
   288       _ms_sdk :=$(call FullPath,$(xMSSDK))
       
   289     else
       
   290       _ms_sdk :=$(_psdk)
       
   291     endif
       
   292   endif
       
   293 endif
       
   294 
       
   295 # Compilers for 64bit are from SDK
       
   296 ifeq ($(ARCH_DATA_MODEL), 64)
       
   297   ifneq ($(_ms_sdk),)
       
   298     ifeq ($(ARCH), ia64)
       
   299       _compiler_bin :=$(_ms_sdk)/Bin/Win64
       
   300     endif
       
   301     ifeq ($(ARCH), amd64)
       
   302       _compiler_bin :=$(_ms_sdk)/Bin/Win64/x86/$(ARCH)
       
   303       _redist_sdk   :=$(_ms_sdk)/redist/win64/AMD64
       
   304     endif
       
   305   endif
       
   306 endif
       
   307 
       
   308 # Location on system where jdk installs might be
       
   309 ifneq ($(_program_files),)
       
   310   USRJDKINSTANCES_PATH =$(_program_files)/Java
       
   311 else
       
   312   USRJDKINSTANCES_PATH =$(_system_drive)/
       
   313 endif
       
   314 
       
   315 # SLASH_JAVA: location of all network accessable files
       
   316 ifdef ALT_SLASH_JAVA
       
   317   xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))"
       
   318   SLASH_JAVA      :=$(call FullPath,$(xALT_SLASH_JAVA))
       
   319 else
       
   320   ifdef ALT_JDK_JAVA_DRIVE
       
   321     SLASH_JAVA  =$(JDK_JAVA_DRIVE)
       
   322   else
       
   323     SLASH_JAVA  =J:
       
   324   endif
       
   325 endif
       
   326 SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
       
   327 SLASH_JAVA:=$(call AltCheckValue,SLASH_JAVA)
       
   328 
       
   329 # JDK_DEVTOOLS_DIR: common path for all the java devtools
       
   330 ifdef ALT_JDK_DEVTOOLS_DIR
       
   331   xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))"
       
   332   JDK_DEVTOOLS_DIR      :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR))
       
   333 else
       
   334   JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
       
   335 endif
       
   336 JDK_DEVTOOLS_DIR:=$(call AltCheckSpaces,JDK_DEVTOOLS_DIR)
       
   337 JDK_DEVTOOLS_DIR:=$(call AltCheckValue,JDK_DEVTOOLS_DIR)
       
   338 
       
   339 # COMPILER_PATH: path to where the compiler and tools are installed.
       
   340 #  NOTE: Must end with / so that it could be empty, allowing PATH usage.
       
   341 ifdef ALT_COMPILER_PATH
       
   342   xALT_COMPILER_PATH  :="$(subst \,/,$(ALT_COMPILER_PATH))"
       
   343   fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
       
   344   COMPILER_PATH       :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
       
   345 else
       
   346   COMPILER_PATH :=$(call PrefixPath,$(_compiler_bin))
       
   347 endif
       
   348 COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
       
   349 
       
   350 # MSDEVTOOLS_PATH: path to where the additional MS Compiler tools are.
       
   351 #  NOTE: Must end with / so that it could be empty, allowing PATH usage.
       
   352 ifdef ALT_MSDEVTOOLS_PATH
       
   353   xALT_MSDEVTOOLS_PATH  :="$(subst \,/,$(ALT_MSDEVTOOLS_PATH))"
       
   354   fxALT_MSDEVTOOLS_PATH :=$(call FullPath,$(xALT_MSDEVTOOLS_PATH))
       
   355   MSDEVTOOLS_PATH       :=$(call PrefixPath,$(fxALT_MSDEVTOOLS_PATH))
       
   356 else
       
   357   ifeq ($(ARCH_DATA_MODEL), 64)
       
   358     ifdef MSTOOLS
       
   359       xMSTOOLS  :="$(subst \,/,$(MSTOOLS))"
       
   360       _ms_tools :=$(call FullPath,$(xMSTOOLS))
       
   361     else
       
   362       ifdef Mstools
       
   363         xMSTOOLS  :="$(subst \,/,$(Mstools))"
       
   364         _ms_tools :=$(call FullPath,$(xMSTOOLS))
       
   365       else
       
   366         _ms_tools :=
       
   367       endif
       
   368     endif
       
   369     ifneq ($(_ms_tools),)
       
   370       _ms_tools_bin :=$(_ms_tools)/Bin
       
   371     else
       
   372       # Assumes compiler bin is .../Bin/win64/x86/AMD64, rc.exe is 3 levels up
       
   373       _ms_tools_bin :=$(_compiler_bin)/../../..
       
   374     endif
       
   375   else
       
   376     _ms_tools_bin :=$(_compiler_bin)
       
   377   endif
       
   378   MSDEVTOOLS_PATH :=$(call PrefixPath,$(_ms_tools_bin))
       
   379 endif
       
   380 MSDEVTOOLS_PATH:=$(call AltCheckSpaces,MSDEVTOOLS_PATH)
       
   381 
       
   382 # DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
       
   383 #  NOTE: Must end with / so that it could be empty, allowing PATH usage.
       
   384 ifdef ALT_DEVTOOLS_PATH
       
   385   xALT_DEVTOOLS_PATH  :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
       
   386   fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
       
   387   DEVTOOLS_PATH       :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH))
       
   388 else
       
   389   ifdef USING_CYGWIN
       
   390     DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
       
   391   else
       
   392     xDEVTOOLS_PATH  :="$(_system_drive)/utils"
       
   393     fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
       
   394     DEVTOOLS_PATH  :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
       
   395   endif
       
   396 endif
       
   397 DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
       
   398 
       
   399 # _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
       
   400 # _BOOTDIR2: Second choice
       
   401 ifndef ALT_BOOTDIR
       
   402   _BOOTDIR1  =$(_system_drive)/jdk$(PREVIOUS_JDK_VERSION)
       
   403   _BOOTDIR2  =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
       
   404 endif
       
   405 
       
   406 # See if SDK area has a msvcrt.dll file, directory may exist w/o msvcr* files
       
   407 _REDIST_SDK_EXISTS := $(shell \
       
   408 	if [ -f "$(_redist_sdk)/msvcrt.dll" ]; then \
       
   409 	  echo "true"; \
       
   410 	else \
       
   411 	  echo "false"; \
       
   412 	fi)
       
   413 _REDIST71_SDK_EXISTS := $(shell \
       
   414 	if [ -f "$(_redist_sdk)/msvcr71.dll" ]; then \
       
   415 	  echo "true"; \
       
   416 	else \
       
   417 	  echo "false"; \
       
   418 	fi)
       
   419 
       
   420 # 32 bit needs 2 runtimes
       
   421 ifeq ($(ARCH_DATA_MODEL), 32)
       
   422 
       
   423   # MSVCRT_DLL_PATH: location of msvcrt.dll that will be re-distributed
       
   424   ifdef ALT_MSVCRT_DLL_PATH
       
   425     xALT_MSVCRT_DLL_PATH :="$(subst \,/,$(ALT_MSVCRT_DLL_PATH))"
       
   426     MSVCRT_DLL_PATH      :=$(call FullPath,$(xALT_MSVCRT_DLL_PATH))
       
   427   else
       
   428     ifeq ($(_REDIST_SDK_EXISTS), true)
       
   429       xREDIST_DIR   :=$(_redist_sdk)
       
   430     else
       
   431       xREDIST_DIR   :=$(_system_root)/system32
       
   432     endif
       
   433     MSVCRT_DLL_PATH :=$(call FullPath,$(xREDIST_DIR))
       
   434   endif
       
   435   MSVCRT_DLL_PATH:=$(call AltCheckSpaces,MSVCRT_DLL_PATH)
       
   436   MSVCRT_DLL_PATH:=$(call AltCheckValue,MSVCRT_DLL_PATH)
       
   437   
       
   438   # MSVCR71_DLL_PATH: location of msvcr71.dll that will be re-distributed
       
   439   ifdef ALT_MSVCR71_DLL_PATH
       
   440     xALT_MSVCR71_DLL_PATH :="$(subst \,/,$(ALT_MSVCR71_DLL_PATH))"
       
   441     MSVCR71_DLL_PATH      :=$(call FullPath,$(xALT_MSVCR71_DLL_PATH))
       
   442   else
       
   443     ifeq ($(_REDIST71_SDK_EXISTS), true)
       
   444       xREDIST71_DIR  :=$(_redist_sdk)
       
   445     else
       
   446       xREDIST71_DIR  :=$(_system_root)/system32
       
   447     endif
       
   448     MSVCR71_DLL_PATH :=$(call FullPath,$(xREDIST71_DIR))
       
   449   endif
       
   450   MSVCR71_DLL_PATH :=$(call AltCheckSpaces,MSVCR71_DLL_PATH)
       
   451   MSVCR71_DLL_PATH:=$(call AltCheckValue,MSVCR71_DLL_PATH)
       
   452   
       
   453 else
       
   454 
       
   455   # MSVCRT_DLL_PATH: location of msvcrt.dll that will be re-distributed
       
   456   ifdef ALT_MSVCRT_DLL_PATH
       
   457     xALT_MSVCRT_DLL_PATH :="$(subst \,/,$(ALT_MSVCRT_DLL_PATH))"
       
   458     MSVCRT_DLL_PATH      :=$(call FullPath,$(xALT_MSVCRT_DLL_PATH))
       
   459   else
       
   460     ifeq ($(_REDIST_SDK_EXISTS), true)
       
   461       xREDIST_DIR   :=$(_redist_sdk)
       
   462     else
       
   463       xREDIST_DIR   :=$(_system_root)/SysWOW64
       
   464     endif
       
   465     MSVCRT_DLL_PATH  :=$(call FullPath,$(xREDIST_DIR))
       
   466   endif
       
   467   MSVCRT_DLL_PATH:=$(call AltCheckSpaces,MSVCRT_DLL_PATH)
       
   468   MSVCRT_DLL_PATH:=$(call AltCheckValue,MSVCRT_DLL_PATH)
       
   469   
       
   470 endif
       
   471 
       
   472 # DXSDK_PATH: path to Microsoft DirectX SDK Include and Lib
       
   473 ifdef ALT_DXSDK_PATH
       
   474   xALT_DXSDK_PATH :="$(subst \,/,$(ALT_DXSDK_PATH))"
       
   475   DXSDK_PATH      :=$(call FullPath,$(xALT_DXSDK_PATH))
       
   476 else
       
   477   _DXSDK_PATH1 :=$(_dx_sdk_dir)
       
   478   _DXSDK_PATH2 :=$(JDK_DEVTOOLS_DIR)/windows/dxsdk
       
   479   DXSDK_PATH  :=$(call DirExists,$(_DXSDK_PATH1),$(_DXSDK_PATH2),$(_dx_sdk_dir))
       
   480 endif
       
   481 DXSDK_PATH :=$(call AltCheckSpaces,DXSDK_PATH)
       
   482 DXSDK_PATH:=$(call AltCheckValue,DXSDK_PATH)
       
   483 
       
   484 # DXSDK_INCLUDE_PATH: path to Microsoft DirectX SDK Include
       
   485 ifdef ALT_DXSDK_INCLUDE_PATH
       
   486   xALT_DXSDK_INCLUDE_PATH :="$(subst \,/,$(ALT_DXSDK_INCLUDE_PATH))"
       
   487   DXSDK_INCLUDE_PATH      :=$(call FullPath,$(xALT_DXSDK_INCLUDE_PATH))
       
   488 else
       
   489   DXSDK_INCLUDE_PATH =$(subst //,/,$(DXSDK_PATH)/Include)
       
   490 endif
       
   491 
       
   492 # DXSDK_LIB_PATH: path to Microsoft DirectX SDK Lib
       
   493 ifdef ALT_DXSDK_LIB_PATH
       
   494   xALT_DXSDK_LIB_PATH :="$(subst \,/,$(ALT_DXSDK_LIB_PATH))"
       
   495   DXSDK_LIB_PATH      :=$(call FullPath,$(xALT_DXSDK_LIB_PATH))
       
   496 else
       
   497   ifeq ($(ARCH_DATA_MODEL), 64)
       
   498     # 64bit libs are located in "Lib/x64" subdir
       
   499     DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib/x64)
       
   500   else
       
   501     DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib)
       
   502   endif
       
   503 endif
       
   504 
       
   505 # DEPLOY_MSSDK: Microsoft SDK for this platform (for deploy)
       
   506 ifdef ALT_DEPLOY_MSSDK
       
   507   xALT_DEPLOY_MSSDK :="$(subst \,/,$(ALT_DEPLOY_MSSDK))"
       
   508   DEPLOY_MSSDK      :=$(call FullPath,$(xALT_DEPLOY_MSSDK))
       
   509 else
       
   510   DEPLOY_MSSDK      :=$(_ms_sdk)
       
   511 endif
       
   512 DEPLOY_MSSDK:=$(call AltCheckSpaces,DEPLOY_MSSDK)
       
   513 
       
   514 # INSTALL_MSSDK: Microsoft Installer SDK for this platform (for install)
       
   515 ifdef ALT_INSTALL_MSSDK
       
   516   xALT_INSTALL_MSSDK :="$(subst \,/,$(ALT_INSTALL_MSSDK))"
       
   517   INSTALL_MSSDK      :=$(call FullPath,$(xALT_INSTALL_MSSDK))
       
   518 else
       
   519   INSTALL_MSSDK      :=$(_psdk)
       
   520 endif
       
   521 INSTALL_MSSDK:=$(call AltCheckSpaces,INSTALL_MSSDK)
       
   522 
       
   523 # INSTALL_MSIVAL2: Installation of MsiVal2 for this platform (for install)
       
   524 ifdef ALT_INSTALL_MSIVAL2
       
   525   xALT_INSTALL_MSIVAL2 :="$(subst \,/,$(ALT_INSTALL_MSIVAL2))"
       
   526   INSTALL_MSIVAL2      :=$(call FullPath,$(xALT_INSTALL_MSIVAL2))
       
   527 else
       
   528   INSTALL_MSIVAL2      :=$(_program_files)/MsiVal2
       
   529 endif
       
   530 INSTALL_MSIVAL2:=$(call AltCheckSpaces,INSTALL_MSIVAL2)
       
   531 
       
   532 # WSCRIPT: path to wscript.exe (used in creating install bundles)
       
   533 ifdef ALT_WSCRIPT
       
   534   xALT_WSCRIPT :="$(subst \,/,$(ALT_WSCRIPT))"
       
   535   WSCRIPT  =$(xALT_WSCRIPT)
       
   536 else
       
   537   _WSCRIPT1 :=$(_system_root)/system32/wscript.exe
       
   538   _WSCRIPT2 :=$(DEVTOOLS_PATH)wscript.exe
       
   539   WSCRIPT  :=$(call FileExists,$(_WSCRIPT1),$(_WSCRIPT2))
       
   540 endif
       
   541 WSCRIPT:=$(call AltCheckSpaces,WSCRIPT)
       
   542 
       
   543 # CSCRIPT: path to cscript.exe (used in creating install bundles)
       
   544 ifdef ALT_CSCRIPT
       
   545   xALT_CSCRIPT :="$(subst \,/,$(ALT_CSCRIPT))"
       
   546   CSCRIPT  =$(xALT_CSCRIPT)
       
   547 else
       
   548   _CSCRIPT1 :=$(_system_root)/system32/cscript.exe
       
   549   _CSCRIPT2 :=$(DEVTOOLS_PATH)cscript.exe
       
   550   CSCRIPT  :=$(call FileExists,$(_CSCRIPT1),$(_CSCRIPT2))
       
   551 endif
       
   552 CSCRIPT:=$(call AltCheckSpaces,CSCRIPT)
       
   553 
       
   554 # MSIVAL2: path to msival2.exe (used in validating install msi files)
       
   555 ifdef ALT_MSIVAL2
       
   556   xALT_MSIVAL2 :="$(subst \,/,$(ALT_MSIVAL2))"
       
   557   MSIVAL2  =$(xALT_MSIVAL2)
       
   558 else
       
   559   _MSIVAL2_1 :=$(INSTALL_MSIVAL2)/msival2.exe
       
   560   _MSIVAL2_2 :=$(DEVTOOLS_PATH)msival2.exe
       
   561   MSIVAL2    :=$(call FileExists,$(_MSIVAL2_1),$(_MSIVAL2_2))
       
   562 endif
       
   563 MSIVAL2:=$(call AltCheckSpaces,MSIVAL2)
       
   564 
       
   565 # LOGOCUB: path to cub file for (used in validating install msi files)
       
   566 ifdef ALT_LOGOCUB
       
   567   xALT_LOGOCUB :="$(subst \,/,$(ALT_LOGOCUB))"
       
   568   LOGOCUB  =$(xALT_LOGOCUB)
       
   569 else
       
   570   _LOGOCUB1 :=$(INSTALL_MSIVAL2)/logo.cub
       
   571   _LOGOCUB2 :=$(DEVTOOLS_PATH)logo.cub
       
   572   LOGOCUB   :=$(call FileExists,$(_LOGOCUB1),$(_LOGOCUB2))
       
   573 endif
       
   574 LOGOCUB:=$(call AltCheckSpaces,LOGOCUB)
       
   575 
       
   576 # MSITRAN: path to msitran.exe (used in creating install bundles and sponsors)
       
   577 ifdef ALT_MSITRAN
       
   578   xALT_MSITRAN :="$(subst \,/,$(ALT_MSITRAN))"
       
   579   MSITRAN  =$(xALT_MSITRAN)
       
   580 else
       
   581   _MSITRAN1 :=$(INSTALL_MSSDK)/Bin/msitran.exe
       
   582   _MSITRAN2 :=$(DEVTOOLS_PATH)msitran.exe
       
   583   MSITRAN   :=$(call FileExists,$(_MSITRAN1),$(_MSITRAN2))
       
   584 endif
       
   585 MSITRAN:=$(call AltCheckSpaces,MSITRAN)
       
   586 
       
   587 # MSICERT: path to msicert.exe (used in creating install bundles)
       
   588 ifdef ALT_MSICERT
       
   589   xALT_MSICERT :="$(subst \,/,$(ALT_MSICERT))"
       
   590   MSICERT  =$(xALT_MSICERT)
       
   591 else
       
   592   _MSICERT1 :=$(INSTALL_MSSDK)/Bin/msicert.exe
       
   593   _MSICERT2 :=$(DEVTOOLS_PATH)msicert.exe
       
   594   MSICERT   :=$(call FileExists,$(_MSICERT1),$(_MSICERT2))
       
   595 endif
       
   596 MSICERT:=$(call AltCheckSpaces,MSICERT)
       
   597 
       
   598 # Import JDK images allow for partial builds, components not built are
       
   599 #    imported (or copied from) these import areas when needed.
       
   600 
       
   601 # BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
       
   602 #   multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
       
   603 ifdef ALT_BUILD_JDK_IMPORT_PATH
       
   604   BUILD_JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
       
   605 else
       
   606   BUILD_JDK_IMPORT_PATH   = $(PROMOTED_BUILD_BINARIES)
       
   607 endif
       
   608 BUILD_JDK_IMPORT_PATH:=$(call AltCheckSpaces,BUILD_JDK_IMPORT_PATH)
       
   609 BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
       
   610 
       
   611 # JDK_IMPORT_PATH: location of previously built JDK (this version) to import
       
   612 ifdef ALT_JDK_IMPORT_PATH
       
   613   JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
       
   614 else
       
   615   JDK_IMPORT_PATH   = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
       
   616 endif
       
   617 JDK_IMPORT_PATH:=$(call AltCheckSpaces,JDK_IMPORT_PATH)
       
   618 JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
       
   619 
       
   620 # HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
       
   621 ifdef ALT_HOTSPOT_IMPORT_PATH
       
   622   HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
       
   623 else
       
   624   HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH)
       
   625 endif
       
   626 HOTSPOT_IMPORT_PATH:=$(call AltCheckSpaces,HOTSPOT_IMPORT_PATH)
       
   627 HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
       
   628 
       
   629 # HOTSPOT_CLIENT_PATH: location of client jvm library file.
       
   630 ifeq ($(ARCH_DATA_MODEL), 32)
       
   631   ifdef ALT_HOTSPOT_CLIENT_PATH
       
   632     HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
       
   633   else
       
   634     HOTSPOT_CLIENT_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
       
   635   endif
       
   636   HOTSPOT_CLIENT_PATH:=$(call AltCheckSpaces,HOTSPOT_CLIENT_PATH)
       
   637   HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
       
   638 endif
       
   639 
       
   640 # HOTSPOT_SERVER_PATH: location of server jvm library file.
       
   641 ifdef ALT_HOTSPOT_SERVER_PATH
       
   642   HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
       
   643 else
       
   644   HOTSPOT_SERVER_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
       
   645 endif
       
   646 HOTSPOT_SERVER_PATH:=$(call AltCheckSpaces,HOTSPOT_SERVER_PATH)
       
   647 HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
       
   648 
       
   649 # HOTSPOT_LIB_PATH: location of jvm.lib file.
       
   650 ifdef ALT_HOTSPOT_LIB_PATH
       
   651   xALT_HOTSPOT_LIB_PATH :="$(subst \,/,$(ALT_HOTSPOT_LIB_PATH))"
       
   652   HOTSPOT_LIB_PATH      :=$(call FullPath,$(xALT_HOTSPOT_LIB_PATH))
       
   653 else
       
   654   HOTSPOT_LIB_PATH  =$(HOTSPOT_IMPORT_PATH)/lib
       
   655 endif
       
   656 HOTSPOT_LIB_PATH:=$(call AltCheckSpaces,HOTSPOT_LIB_PATH)
       
   657 HOTSPOT_LIB_PATH:=$(call AltCheckValue,HOTSPOT_LIB_PATH)
       
   658