jdk/make/common/shared/Defs-windows.gmk
author tbell
Tue, 23 Oct 2012 10:10:23 -0700
changeset 14091 e5c8662f325d
parent 9035 1255eb81cc2f
child 14342 8435a30053c1
permissions -rw-r--r--
7152336: Enable builds on Windows with MinGW/MSYS Summary: Minimal makefile changes to enable building OpenJDK using MSYS on Windows7 Reviewed-by: ohair, tbell Contributed-by: volker.simonis@gmail.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
9035
1255eb81cc2f 7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents: 8827
diff changeset
     2
# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5474
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5474
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5474
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5474
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5474
diff changeset
    23
# questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Definitions for Windows.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
# Default for COMPILER_WARNINGS_FATAL on Windows (C++ compiler warnings)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#    Level: Default is 3, 0 means none, 4 is the most but may be unreliable
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#    Some makefiles may have set this to 0 to turn off warnings completely,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#    which also effectively creates a COMPILER_WARNINGS_FATAL=false situation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#    Program.gmk may turn this down to 2 (building .exe's).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#    Windows 64bit platforms are less likely to be warning free.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#    Historically, Windows 32bit builds should be mostly warning free.
7669
3ebe17bda998 6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents: 7665
diff changeset
    37
#    VS2010 introduced a large number of security warnings that are off by
3ebe17bda998 6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents: 7665
diff changeset
    38
#    default but will be turned back on with SHOW_ALL_WARNINGS=true.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
ifndef COMPILER_WARNING_LEVEL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
  COMPILER_WARNING_LEVEL=3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
ifndef COMPILER_WARNINGS_FATAL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
  COMPILER_WARNINGS_FATAL=false
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
endif
7669
3ebe17bda998 6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents: 7665
diff changeset
    45
ifndef SHOW_ALL_WARNINGS
3ebe17bda998 6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents: 7665
diff changeset
    46
  SHOW_ALL_WARNINGS = false
3ebe17bda998 6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents: 7665
diff changeset
    47
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
# Windows should use parallel compilation for best build times
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
ifndef COMPILE_APPROACH
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
  COMPILE_APPROACH = normal
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
# Indication that we are doing an incremental build.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
#    This may trigger the creation of make depend files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
#    (This may not be working on windows yet, always force to false.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
override INCREMENTAL_BUILD = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
# WARNING: This is extremely touch stuff, between CYGWIN vs. MKS and all
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
#          variations of MKS and CYGWIN releases, and 32bit vs 64bit,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
#          this file can give you nightmares.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
# Notes:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
#   Keep all paths in the windows "mixed" style except CYGWIN UNXIXCOMMAND_PATH.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
#   Use of PrefixPath is critical, some variables must end with / (see NOTE).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
#   Use of quotes is critical due to possible spaces in paths coming from
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
#     the environment variables, be careful.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
#   First convert \ to / with subst, keep it quoted due to blanks, then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
#     use cygpath -s or dosname -s to get the short non-blank name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
#   If the MKS is old and doesn't have a dosname -s, you will be forced
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
#     to set ALT variables with the short non-space directory names.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
#     If dosname doesn't appear to work, we won't use it.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
#     The dosname utility also wants to accept stdin if it is not supplied
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
#     any path on the command line, this is really dangerous when using
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
#     make variables that can easily become empty, so I use:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
#        echo $1 | dosname -s     instead of    dosname -s $1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
#     to prevent dosname from hanging up the make process when $1 is empty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
#     The cygpath utility does not have this problem.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
#   The ALT values should never really have spaces or use \.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
#   Suspect these environment variables to have spaces and/or \ characters:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
#     SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
1776
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
    82
#     DXSDK_DIR, MSTOOLS, Mstools, MSSDK, MSSdk, VCnnCOMNTOOLS, 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
#     MSVCDIR, MSVCDir.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
#     So use $(subst \,/,) on them first adding quotes and placing them in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
#         their own variable assigned with :=, then use FullPath.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
    88
ifdef USING_CYGWIN
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    89
# Macro to effectively do a toupper without an exec
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    90
define ToUpper
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    91
$(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f,F,\
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    92
$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,$(subst k,K,$(subst l,L,\
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    93
$(subst m,M,$(subst n,N,$(subst o,O,$(subst p,P,$(subst q,Q,$(subst r,R,\
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    94
$(subst s,S,$(subst t,T,$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,\
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    95
$(subst y,Y,$(subst z,Z,$1))))))))))))))))))))))))))
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    96
endef
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
    97
# All possible drive letters
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
    98
drives=a b c d e f g h i j k l m n o p q r s t v u w x y z
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
    99
# Convert /cygdrive/ paths to the mixed style without an exec of cygpath
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   100
#   Must be a path with no spaces. /cygdrive/letter is always lowercase
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   101
#   and letter:/ is always uppercase coming from cygpath.
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   102
define MixedPath
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   103
$(patsubst /%,$(CYGWIN_HOME)/%,$(sort $(filter-out /cygdrive/%,$(foreach drive,$(drives),$(patsubst /cygdrive/$(drive)/%,$(call ToUpper,$(drive)):/%,$1)))))
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   104
endef
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
# Use FullPath to get C:/ style non-spaces path. Never ends with a /!
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
# We assume cygpath is available in the search path
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
#    NOTE: Use of 'pwd' with CYGWIN will not get you a mixed style path!
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
define FullPath
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   109
$(if $(word 2,$1),$(shell $(CYGPATH_CMD) $1 2> $(DEV_NULL)),$(call MixedPath,$(realpath $(subst ",,$1))))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
define OptFullPath
6309
d3955f70aad3 6974005: Use of cygpath in Makefile logic needs to silence error messages
ohair
parents: 5937
diff changeset
   112
$(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1" 2> $(DEV_NULL); else echo "$1"; fi)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
else
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   115
ifdef USING_MSYS
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   116
DOSPATH_CMD:=$(shell cd $(JDK_TOPDIR) 2> $(DEV_NULL) && pwd)/make/tools/msys_build_scripts/dospath.sh
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   117
define FullPath
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   118
$(subst \,/,$(shell $(DOSPATH_CMD) $1))
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   119
endef
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   120
define OptFullPath
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   121
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   122
endef
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   123
else
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
# Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
define FullPath
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
$(shell cd $1 2> $(DEV_NULL) && pwd)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
define OptFullPath
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
endif
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   132
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
# System drive
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
ifdef SYSTEMDRIVE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
  _system_drive =$(SYSTEMDRIVE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
  ifdef SystemDrive
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
    _system_drive =$(SystemDrive)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
_system_drive:=$(call CheckValue,_system_drive,C:)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   146
#        With cygwin, just use this as is don't use FullPath on it.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
ifdef ALT_UNIXCOMMAND_PATH
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   148
  ifdef USING_CYGWIN
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   149
    UNIXCOMMAND_PATH       :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   150
  else
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   151
    xALT_UNIXCOMMAND_PATH  :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   152
    fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   153
    UNIXCOMMAND_PATH       :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   154
  endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
  ifdef USING_CYGWIN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
  else
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   159
    ifdef USING_MSYS
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   160
      UNIXCOMMAND_PATH :=$(call PrefixPath,/bin)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    else
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   162
      ifdef ROOTDIR
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   163
        xROOTDIR :="$(subst \,/,$(ROOTDIR))"
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   164
        _rootdir :=$(call FullPath,$(xROOTDIR))
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   165
      else
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   166
        xROOTDIR :="$(_system_drive)/mksnt"
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   167
        _rootdir :=$(call FullPath,$(xROOTDIR))
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   168
      endif
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   169
      ifneq ($(_rootdir),)
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   170
        UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   171
      endif
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   172
    endif # USING_MSYS
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   173
  endif # USING_CYGWIN
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
# Get version of MKS or CYGWIN
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   178
ifdef USING_MKS
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   179
  _MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   180
  MKS_VER  :=$(call GetVersion,$(_MKS_VER))
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   181
  # At this point, we can re-define FullPath to use DOSNAME_CMD
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   182
  CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   183
  TRY_DOSNAME:=false
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   184
  ifeq ($(CHECK_MKS87),same)
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   185
    TRY_DOSNAME:=true
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   186
  endif
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   187
  # Newer should be ok
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   188
  ifeq ($(CHECK_MKS87),newer)
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   189
    TRY_DOSNAME:=true
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   190
  endif
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   191
  ifeq ($(TRY_DOSNAME),true)
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   192
    ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   193
      _DOSNAME=$(UNIXCOMMAND_PATH)dosname
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   194
      DOSNAME_CMD:=$(_DOSNAME) -s
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
define FullPath
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
$(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL)))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
endef
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   198
    endif # test dosname -s
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   199
  endif # TRY_DOSNAME
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
endif # MKS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
# We try to get references to what we need via the default component
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
#    environment variables, or what was used historically.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
# Process Windows values into FullPath values, these paths may have \ chars
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
# System root
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
ifdef SYSTEMROOT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
  xSYSTEMROOT  :="$(subst \,/,$(SYSTEMROOT))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
  _system_root :=$(call FullPath,$(xSYSTEMROOT))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
  ifdef SystemRoot
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     xSYSTEMROOT :="$(subst \,/,$(SystemRoot))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
    _system_root :=$(call FullPath,$(xSYSTEMROOT))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
    ifdef WINDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
      xWINDIR      :="$(subst \,/,$(WINDIR))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
      _system_root :=$(call FullPath,$(xWINDIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
      ifdef windir
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
        xWINDIR      :="$(subst \,/,$(windir))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
        _system_root :=$(call FullPath,$(xWINDIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
      endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
_system_root:=$(call CheckValue,_system_root,$(_system_drive)/WINNT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
# Program Files directory
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
ifdef PROGRAMFILES
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
  xPROGRAMFILES      :="$(subst \,/,$(PROGRAMFILES))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
  ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    xPROGRAMFILES    :="$(_system_drive)/Program Files"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
    xPROGRAMFILES    :="$(_system_drive)/Program Files (x86)"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
  _program_files     :=$(call FullPath,$(xPROGRAMFILES))
2186
53da56fa3bf9 6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents: 2158
diff changeset
   241
  _program_files32   :=$(_program_files)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
  ifdef PROGRAMW6432
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
    xPROGRAMW6432    :="$(subst \,/,$(PROGRAMW6432))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
    xPROGRAMW6432    :="$(_system_drive)/Program Files"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
  _program_files     :=$(call FullPath,$(xPROGRAMW6432))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
  _program_files32   :=$(call FullPath,$(xPROGRAMFILES))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
  ifneq ($(word 1,$(_program_files32)),$(_program_files32))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
    _program_files32:=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
ifneq ($(word 1,$(_program_files)),$(_program_files))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
  _program_files:=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
# DirectX SDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
ifdef ALT_DXSDK_DRIVE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
  _dx_sdk_dir  =$(ALT_DXSDK_DRIVE):/DXSDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
  ifdef DXSDK_DIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
    xDXSDK_DIR  :="$(subst \,/,$(DXSDK_DIR))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
    xDXSDK_DIR  :="$(_system_drive)/DXSDK"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
  _dx_sdk_dir :=$(call FullPath,$(xDXSDK_DIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   270
# Use of the Visual Studio compilers requires certain env variables be set:
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   271
#   PATH should include the path to cl.exe
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   272
#   INCLUDE should be defined
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   273
#   LIB     should be defined
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   274
#   LIBPATH should be defined
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   275
#   VS100COMNTOOLS should be defined
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   276
#   WINDOWSSDKDIR should be defined
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   277
#     The 7.0a path is from VS2010 Pro, the 7.1 path is the standalone SDK.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   278
#     For 64bit either will work for us.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   279
#     If a developer chooses to install the standalone SDK in some other
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   280
#     location, then they need to set WINDOWSSDKDIR.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   281
#
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   282
# Compilers for 64bit may be from the free SDK, or Visual Studio Professional.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   283
#   The free Express compilers don't contain 64 bit compilers, which is why
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   284
#   you instead need the SDK.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   285
#   Release enginering will use VS2010 Pro, so the frequency of testing of
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   286
#     SDK based builds will depend entirely on individual usage.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   287
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   288
# We only need to do this once
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   289
ifndef VS2010_EXISTS
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   290
  # The 2 key paths we need are WINDOWSSDKDIR and VS100COMNTOOLS.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   291
  #   If not defined try to see if default location exists.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   292
  #   If defined make sure that the path has no spaces.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   293
  #   Finally, export path with no spaces so logic minimizes FullPath calls.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   294
  ifndef WINDOWSSDKDIR
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   295
    # The 7.0a SDK is the second choice.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   296
    xWINDOWSSDKDIR :="$(_program_files32)/Microsoft SDKs/Windows/v7.0a/"
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   297
    fWINDOWSSDKDIR :=$(call FullPath,$(xWINDOWSSDKDIR))
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   298
    # The 7.1 SDK is the second choice.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   299
    ifeq ($(fWINDOWSSDKDIR),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   300
      xWINDOWSSDKDIR :="$(_program_files32)/Microsoft SDKs/Windows/v7.1/"
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   301
      fWINDOWSSDKDIR :=$(call FullPath,$(xWINDOWSSDKDIR))
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   302
    endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
  else
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   304
    ifneq ($(word 2,$(WINDOWSSDKDIR)),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   305
      xWINDOWSSDKDIR :="$(subst \,/,$(WINDOWSSDKDIR))"
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   306
      fWINDOWSSDKDIR :=$(call FullPath,$(xWINDOWSSDKDIR))
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   307
    else
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   308
      fWINDOWSSDKDIR :=$(WINDOWSSDKDIR)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   309
    endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   310
  endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   311
  ifneq ($(fWINDOWSSDKDIR),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   312
    WINDOWSSDKDIR  :=$(fWINDOWSSDKDIR)/
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   313
  endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   314
  ifndef VS100COMNTOOLS
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   315
    xVS100COMNTOOLS :="$(_program_files32)/Microsoft Visual Studio 10.0/Common7/Tools/"
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   316
    fVS100COMNTOOLS :=$(call FullPath,$(xVS100COMNTOOLS))
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   317
  else
8011
90caa43175fd 7011382: Fix use of VS100COMNTOOLS when installed in non-default or non-space path
ohair
parents: 8008
diff changeset
   318
    xVS100COMNTOOLS :="$(subst \,/,$(VS100COMNTOOLS))"
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   319
    ifneq ($(word 2,$(VS100COMNTOOLS)),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   320
      fVS100COMNTOOLS :=$(call FullPath,$(xVS100COMNTOOLS))
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   321
    else
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   322
      fVS100COMNTOOLS :=$(xVS100COMNTOOLS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
  endif
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   325
  ifneq ($(fVS100COMNTOOLS),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   326
    VS100COMNTOOLS :=$(fVS100COMNTOOLS)/
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   327
  endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   328
  # Check to see that both exist
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   329
  ifeq ($(WINDOWSSDKDIR),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   330
    _vs2010_message := No WINDOWSSDKDIR found on system. $(_vs2010_message)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   331
    VS2010_EXISTS   := false
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   332
  endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   333
  ifeq ($(VS100COMNTOOLS),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   334
    _vs2010_message := No VS100COMNTOOLS found on system. $(_vs2010_message)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   335
    VS2010_EXISTS   := false
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   336
  endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   337
  ifeq ($(VS2010_EXISTS),false)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   338
    x:=$(warning WARNING: No VS2010 available. $(_vs2010_message))
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   339
    VS100COMNTOOLS :=
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   340
    WINDOWSSDKDIR  :=
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   341
  else
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   342
    VS2010_EXISTS := true
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   343
    _msvc_dir     :=$(VS100COMNTOOLS)/../../Vc
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   344
  endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   345
  export VS2010_EXISTS
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   346
  export VS100COMNTOOLS
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   347
  export WINDOWSSDKDIR
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   348
endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   349
8827
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   350
ifneq ($(VS2010_EXISTS),true)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   351
  x:=$(error ERROR: No VS2010 found on system.)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   352
endif 
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   353
8827
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   354
# VS2010 Compiler root directory
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   355
_msvc_dir :=$(VS100COMNTOOLS)/../../Vc
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   356
# SDK root directory
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   357
_ms_sdk   :=$(WINDOWSSDKDIR)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   358
# Compiler bin directory and redist directory
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   359
ifeq ($(ARCH_DATA_MODEL), 32)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   360
  _compiler_bin :=$(_msvc_dir)/Bin
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   361
  _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC100.CRT)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   362
endif
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   363
ifeq ($(ARCH_DATA_MODEL), 64)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   364
  _compiler_bin :=$(_msvc_dir)/bin/amd64
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   365
  _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x64/Microsoft.VC100.CRT)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   366
endif
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   367
ifeq ($(_redist_sdk),)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   368
  _redist_sdk   :=$(_system_root)/system32
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   369
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
# Location on system where jdk installs might be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
ifneq ($(_program_files),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
  USRJDKINSTANCES_PATH =$(_program_files)/Java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
  USRJDKINSTANCES_PATH =$(_system_drive)/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
# SLASH_JAVA: location of all network accessable files
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   379
# NOTE: Do not use FullPath on this because it's often a drive letter and
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   380
#       plain drive letters are ambiguous, so just use this 'as is'.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
ifdef ALT_SLASH_JAVA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
  xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))"
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   383
  SLASH_JAVA      :=$(xALT_SLASH_JAVA)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
  ifdef ALT_JDK_JAVA_DRIVE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
    SLASH_JAVA  =$(JDK_JAVA_DRIVE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
    SLASH_JAVA  =J:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
SLASH_JAVA:=$(call AltCheckValue,SLASH_JAVA)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
# JDK_DEVTOOLS_DIR: common path for all the java devtools
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
ifdef ALT_JDK_DEVTOOLS_DIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
  xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
  JDK_DEVTOOLS_DIR      :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
  JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
JDK_DEVTOOLS_DIR:=$(call AltCheckSpaces,JDK_DEVTOOLS_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
JDK_DEVTOOLS_DIR:=$(call AltCheckValue,JDK_DEVTOOLS_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
# COMPILER_PATH: path to where the compiler and tools are installed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
ifdef ALT_COMPILER_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
  xALT_COMPILER_PATH  :="$(subst \,/,$(ALT_COMPILER_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
  fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
  COMPILER_PATH       :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
  COMPILER_PATH :=$(call PrefixPath,$(_compiler_bin))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
# MSDEVTOOLS_PATH: path to where the additional MS Compiler tools are.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
ifdef ALT_MSDEVTOOLS_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
  xALT_MSDEVTOOLS_PATH  :="$(subst \,/,$(ALT_MSDEVTOOLS_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
  fxALT_MSDEVTOOLS_PATH :=$(call FullPath,$(xALT_MSDEVTOOLS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
  MSDEVTOOLS_PATH       :=$(call PrefixPath,$(fxALT_MSDEVTOOLS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
  ifeq ($(ARCH_DATA_MODEL), 64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
    ifdef MSTOOLS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
      xMSTOOLS  :="$(subst \,/,$(MSTOOLS))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
      _ms_tools :=$(call FullPath,$(xMSTOOLS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
      ifdef Mstools
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
        xMSTOOLS  :="$(subst \,/,$(Mstools))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
        _ms_tools :=$(call FullPath,$(xMSTOOLS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
      else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
        _ms_tools :=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
      endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
    ifneq ($(_ms_tools),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
      _ms_tools_bin :=$(_ms_tools)/Bin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
      # Assumes compiler bin is .../Bin/win64/x86/AMD64, rc.exe is 3 levels up
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
      _ms_tools_bin :=$(_compiler_bin)/../../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
    _ms_tools_bin :=$(_compiler_bin)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
  MSDEVTOOLS_PATH :=$(call PrefixPath,$(_ms_tools_bin))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
MSDEVTOOLS_PATH:=$(call AltCheckSpaces,MSDEVTOOLS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
ifdef ALT_DEVTOOLS_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
  xALT_DEVTOOLS_PATH  :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
  fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
  DEVTOOLS_PATH       :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
  ifdef USING_CYGWIN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
    DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
  else
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   457
    ifdef USING_MSYS
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   458
      DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   459
    else
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   460
      xDEVTOOLS_PATH  :="$(_system_drive)/utils"
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   461
      fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   462
      DEVTOOLS_PATH  :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   463
    endif # USING_MSYS
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   464
  endif # USING_CYGWIN
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
# _BOOTDIR2: Second choice
2806
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2624
diff changeset
   470
# The _BOOTDIR3 is defind optionally.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
ifndef ALT_BOOTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
  _BOOTDIR1  =$(_system_drive)/jdk$(PREVIOUS_JDK_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
  _BOOTDIR2  =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
2806
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2624
diff changeset
   474
  _BOOTDIR3  =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
8827
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   477
# Everybody needs the MSVCRNN runtime starting with VS2010
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   478
_NEEDS_MSVCRNN = true
2186
53da56fa3bf9 6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents: 2158
diff changeset
   479
53da56fa3bf9 6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents: 2158
diff changeset
   480
ifeq ($(_NEEDS_MSVCRNN), true)
1776
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
   481
  # MSVCRNN_DLL_PATH: location of msvcrnn.dll that will be re-distributed
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
   482
  ifdef ALT_MSVCRNN_DLL_PATH
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
   483
    xALT_MSVCRNN_DLL_PATH :="$(subst \,/,$(ALT_MSVCRNN_DLL_PATH))"
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
   484
    MSVCRNN_DLL_PATH      :=$(call FullPath,$(xALT_MSVCRNN_DLL_PATH))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
  else
2186
53da56fa3bf9 6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents: 2158
diff changeset
   486
    MSVCRNN_DLL_PATH :=$(_redist_sdk)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
  endif
1776
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
   488
  MSVCRNN_DLL_PATH :=$(call AltCheckSpaces,MSVCRNN_DLL_PATH)
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
   489
  MSVCRNN_DLL_PATH:=$(call AltCheckValue,MSVCRNN_DLL_PATH)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
# DXSDK_PATH: path to Microsoft DirectX SDK Include and Lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
ifdef ALT_DXSDK_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
  xALT_DXSDK_PATH :="$(subst \,/,$(ALT_DXSDK_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
  DXSDK_PATH      :=$(call FullPath,$(xALT_DXSDK_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
  _DXSDK_PATH1 :=$(_dx_sdk_dir)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
  _DXSDK_PATH2 :=$(JDK_DEVTOOLS_DIR)/windows/dxsdk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
  DXSDK_PATH  :=$(call DirExists,$(_DXSDK_PATH1),$(_DXSDK_PATH2),$(_dx_sdk_dir))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
DXSDK_PATH :=$(call AltCheckSpaces,DXSDK_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
DXSDK_PATH:=$(call AltCheckValue,DXSDK_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
# DXSDK_INCLUDE_PATH: path to Microsoft DirectX SDK Include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
ifdef ALT_DXSDK_INCLUDE_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
  xALT_DXSDK_INCLUDE_PATH :="$(subst \,/,$(ALT_DXSDK_INCLUDE_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
  DXSDK_INCLUDE_PATH      :=$(call FullPath,$(xALT_DXSDK_INCLUDE_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
  DXSDK_INCLUDE_PATH =$(subst //,/,$(DXSDK_PATH)/Include)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
# DXSDK_LIB_PATH: path to Microsoft DirectX SDK Lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
ifdef ALT_DXSDK_LIB_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
  xALT_DXSDK_LIB_PATH :="$(subst \,/,$(ALT_DXSDK_LIB_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
  DXSDK_LIB_PATH      :=$(call FullPath,$(xALT_DXSDK_LIB_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
  ifeq ($(ARCH_DATA_MODEL), 64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
    # 64bit libs are located in "Lib/x64" subdir
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
    DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib/x64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
    DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
# DEPLOY_MSSDK: Microsoft SDK for this platform (for deploy)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
ifdef ALT_DEPLOY_MSSDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
  xALT_DEPLOY_MSSDK :="$(subst \,/,$(ALT_DEPLOY_MSSDK))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
  DEPLOY_MSSDK      :=$(call FullPath,$(xALT_DEPLOY_MSSDK))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
  DEPLOY_MSSDK      :=$(_ms_sdk)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
DEPLOY_MSSDK:=$(call AltCheckSpaces,DEPLOY_MSSDK)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
# INSTALL_MSSDK: Microsoft Installer SDK for this platform (for install)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
ifdef ALT_INSTALL_MSSDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
  xALT_INSTALL_MSSDK :="$(subst \,/,$(ALT_INSTALL_MSSDK))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
  INSTALL_MSSDK      :=$(call FullPath,$(xALT_INSTALL_MSSDK))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
else
3111
fefdeafb7ab9 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 2624
diff changeset
   539
  INSTALL_MSSDK      :=$(_ms_sdk)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
INSTALL_MSSDK:=$(call AltCheckSpaces,INSTALL_MSSDK)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
# WSCRIPT: path to wscript.exe (used in creating install bundles)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
ifdef ALT_WSCRIPT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
  xALT_WSCRIPT :="$(subst \,/,$(ALT_WSCRIPT))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
  WSCRIPT  =$(xALT_WSCRIPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
  _WSCRIPT1 :=$(_system_root)/system32/wscript.exe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
  _WSCRIPT2 :=$(DEVTOOLS_PATH)wscript.exe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
  WSCRIPT  :=$(call FileExists,$(_WSCRIPT1),$(_WSCRIPT2))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
WSCRIPT:=$(call AltCheckSpaces,WSCRIPT)
1025
a9ba5ea0f1f7 6614210: JPRT Windows 32bit msival2 build failure when building 'install' workspace
ksrini
parents: 2
diff changeset
   553
# batch mode no modal dialogs on errors, please.
2602
5b394a4b6ce1 6755943: Java JAR Pack200 Decompression should enforce stricter header checks
ksrini
parents: 2
diff changeset
   554
WSCRIPT += -B
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
# CSCRIPT: path to cscript.exe (used in creating install bundles)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
ifdef ALT_CSCRIPT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
  xALT_CSCRIPT :="$(subst \,/,$(ALT_CSCRIPT))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
  CSCRIPT  =$(xALT_CSCRIPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
  _CSCRIPT1 :=$(_system_root)/system32/cscript.exe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
  _CSCRIPT2 :=$(DEVTOOLS_PATH)cscript.exe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
  CSCRIPT  :=$(call FileExists,$(_CSCRIPT1),$(_CSCRIPT2))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
CSCRIPT:=$(call AltCheckSpaces,CSCRIPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
5381
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   567
# CABARC: path to cabarc.exe (used in creating install bundles)
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   568
ifdef ALT_CABARC
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   569
  xALT_CABARC :="$(subst \,/,$(ALT_CABARC))"
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   570
  CABARC  =$(xALT_CABARC)
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   571
else
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   572
  _CABARC1 :=$(_system_root)/system32/cabarc.exe
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   573
  _CABARC2 :=$(DEVTOOLS_PATH)cabarc.exe
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   574
  CABARC  :=$(call FileExists,$(_CABARC1),$(_CABARC2))
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   575
endif
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   576
CABARC:=$(call AltCheckSpaces,CABARC)
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   577
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
# MSICERT: path to msicert.exe (used in creating install bundles)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
ifdef ALT_MSICERT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
  xALT_MSICERT :="$(subst \,/,$(ALT_MSICERT))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
  MSICERT  =$(xALT_MSICERT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
  _MSICERT1 :=$(INSTALL_MSSDK)/Bin/msicert.exe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
  _MSICERT2 :=$(DEVTOOLS_PATH)msicert.exe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
  MSICERT   :=$(call FileExists,$(_MSICERT1),$(_MSICERT2))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
MSICERT:=$(call AltCheckSpaces,MSICERT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
# Import JDK images allow for partial builds, components not built are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
#    imported (or copied from) these import areas when needed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
#   multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
ifdef ALT_BUILD_JDK_IMPORT_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
  BUILD_JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
  BUILD_JDK_IMPORT_PATH   = $(PROMOTED_BUILD_BINARIES)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
BUILD_JDK_IMPORT_PATH:=$(call AltCheckSpaces,BUILD_JDK_IMPORT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
# JDK_IMPORT_PATH: location of previously built JDK (this version) to import
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
ifdef ALT_JDK_IMPORT_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
  JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
  JDK_IMPORT_PATH   = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
JDK_IMPORT_PATH:=$(call AltCheckSpaces,JDK_IMPORT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
ifdef ALT_HOTSPOT_IMPORT_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
  HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
else
3116
244619fd110e 6633813: Add standard hotspot import path for Kernel VM
herrick
parents: 3114
diff changeset
   615
  # Default locations include the current $OUTPUTDIR, RE Promotions,
244619fd110e 6633813: Add standard hotspot import path for Kernel VM
herrick
parents: 3114
diff changeset
   616
  # and a JDK.  Please be aware the JDK does not include a Kernel VM.
244619fd110e 6633813: Add standard hotspot import path for Kernel VM
herrick
parents: 3114
diff changeset
   617
  _HOTSPOT_IMPORT_PATH1 = $(OUTPUTDIR)/hotspot/import
244619fd110e 6633813: Add standard hotspot import path for Kernel VM
herrick
parents: 3114
diff changeset
   618
  _HOTSPOT_IMPORT_PATH2 = $(PROMOTED_BUILD_DISTDIR)/hotspot/import
244619fd110e 6633813: Add standard hotspot import path for Kernel VM
herrick
parents: 3114
diff changeset
   619
  _HOTSPOT_IMPORT_PATH3 = $(JDK_IMPORT_PATH)
244619fd110e 6633813: Add standard hotspot import path for Kernel VM
herrick
parents: 3114
diff changeset
   620
   HOTSPOT_IMPORT_PATH := $(call DirExists,$(_HOTSPOT_IMPORT_PATH1),$(_HOTSPOT_IMPORT_PATH2),$(_HOTSPOT_IMPORT_PATH3))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
HOTSPOT_IMPORT_PATH:=$(call AltCheckSpaces,HOTSPOT_IMPORT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
# HOTSPOT_CLIENT_PATH: location of client jvm library file.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
  ifdef ALT_HOTSPOT_CLIENT_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
    HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
    HOTSPOT_CLIENT_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
  HOTSPOT_CLIENT_PATH:=$(call AltCheckSpaces,HOTSPOT_CLIENT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
  HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
# HOTSPOT_SERVER_PATH: location of server jvm library file.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
ifdef ALT_HOTSPOT_SERVER_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
  HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
  HOTSPOT_SERVER_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
HOTSPOT_SERVER_PATH:=$(call AltCheckSpaces,HOTSPOT_SERVER_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
# HOTSPOT_LIB_PATH: location of jvm.lib file.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
ifdef ALT_HOTSPOT_LIB_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
  xALT_HOTSPOT_LIB_PATH :="$(subst \,/,$(ALT_HOTSPOT_LIB_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
  HOTSPOT_LIB_PATH      :=$(call FullPath,$(xALT_HOTSPOT_LIB_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
  HOTSPOT_LIB_PATH  =$(HOTSPOT_IMPORT_PATH)/lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
HOTSPOT_LIB_PATH:=$(call AltCheckSpaces,HOTSPOT_LIB_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
HOTSPOT_LIB_PATH:=$(call AltCheckValue,HOTSPOT_LIB_PATH)
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   654
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   655
# Special define for checking the binaries
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   656
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   657
# All windows dll and exe files should have been built with -NXCOMPAT
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   658
#   and be setup for dynamic base addresses.
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   659
#   In addition, we should not be dependent on certain dll files that
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   660
#   we do not or cannot redistribute.
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   661
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   662
# List of filenames we should NOT be dependent on
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   663
ifeq ($(MFC_DEBUG),true)
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   664
  BANNED_DLLS=msvcp100[.]dll
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   665
else
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   666
  BANNED_DLLS=msvcp100[.]dll|msvcr100d[.]dll|msvcrtd[.]dll
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   667
endif
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   668
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   669
# Check for -safeseh (only used on 32bit)
8269
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   670
define binary_file_safeseh_verification # binary_file
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   671
( \
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   672
  $(ECHO) "Checking for -SAFESEH usage in: $1" && \
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   673
  if [ "`$(DUMPBIN) -loadconfig $1 | $(EGREP) -i 'Safe Exception Handler Table'`" = "" ] ; then \
8269
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   674
    $(ECHO) "ERROR: Did not find 'Safe Exception Handler Table' in loadconfig: $1" ; \
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   675
    $(DUMPBIN) -loadconfig $1 ; \
8269
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   676
    exit 6 ; \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   677
  fi ; \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   678
)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   679
endef
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   680
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   681
# Check for -NXCOMPAT usage
8269
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   682
define binary_file_nxcompat_verification # binary_file
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   683
( \
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   684
  $(ECHO) "Checking for -NXCOMPAT usage in: $1" && \
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   685
  if [ "`$(DUMPBIN) -headers $1 | $(EGREP) -i 'NX compatible'`" = "" ] ; then \
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   686
    $(ECHO) "ERROR: Did not find 'NX compatible' in headers: $1" ; \
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   687
    $(DUMPBIN) -headers $1 ; \
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   688
    exit 7 ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   689
  fi ; \
8269
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   690
)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   691
endef
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   692
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   693
# Check for -DYNAMICBASE usage
8269
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   694
define binary_file_dynamicbase_verification # binary_file
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   695
( \
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   696
  $(ECHO) "Checking for -DYNAMICBASE usage in: $1" && \
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   697
  if [ "`$(DUMPBIN) -headers $1 | $(EGREP) -i 'Dynamic base'`" = "" ] ; then \
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   698
    $(ECHO) "ERROR: Did not find 'Dynamic base' in headers: $1" ; \
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   699
    $(DUMPBIN) -headers $1 ; \
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   700
    exit 8 ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   701
  fi ; \
8269
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   702
)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   703
endef
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   704
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   705
# Check for banned dll usage
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   706
define binary_file_dll_verification # binary_file
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   707
( \
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   708
  $(ECHO) "Checking for banned dependencies in: $1" && \
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   709
  if [ "`$(DUMPBIN) -dependents $1 | $(EGREP) -i '$(BANNED_DLLS)'`" != "" ] ; then \
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   710
    $(ECHO) "ERROR: Found use of $(BANNED_DLLS)"; \
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 9035
diff changeset
   711
    $(DUMPBIN) -dependents $1 ; \
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   712
    exit 9 ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   713
  fi ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   714
)
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   715
endef
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   716
8269
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   717
# Macro to check it's input file for properly built executables.
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   718
#   Relies on process exit code. Different for 32bit vs 64bit.
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   719
ifeq ($(ARCH_DATA_MODEL),32)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   720
define binary_file_verification # binary_file
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   721
( \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   722
  $(call binary_file_safeseh_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   723
  $(call binary_file_nxcompat_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   724
  $(call binary_file_dynamicbase_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   725
  $(call binary_file_dll_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   726
)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   727
endef
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   728
else
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   729
define binary_file_verification # binary_file
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   730
( \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   731
  $(call binary_file_nxcompat_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   732
  $(call binary_file_dynamicbase_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   733
  $(call binary_file_dll_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   734
)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   735
endef
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   736
endif
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   737