corba/make/common/shared/Defs-windows.gmk
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 4 02bb8761fcce
child 2200 69f669804c0a
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
#
02bb8761fcce Initial load
duke
parents:
diff changeset
     2
# Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
02bb8761fcce Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
02bb8761fcce Initial load
duke
parents:
diff changeset
     4
#
02bb8761fcce Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
02bb8761fcce Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
02bb8761fcce Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
02bb8761fcce Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
02bb8761fcce Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
02bb8761fcce Initial load
duke
parents:
diff changeset
    10
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
02bb8761fcce Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
02bb8761fcce Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
02bb8761fcce Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
02bb8761fcce Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
02bb8761fcce Initial load
duke
parents:
diff changeset
    16
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
02bb8761fcce Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
02bb8761fcce Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
02bb8761fcce Initial load
duke
parents:
diff changeset
    20
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
02bb8761fcce Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
02bb8761fcce Initial load
duke
parents:
diff changeset
    23
# have any questions.
02bb8761fcce Initial load
duke
parents:
diff changeset
    24
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    25
02bb8761fcce Initial load
duke
parents:
diff changeset
    26
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    27
# Definitions for Windows.
02bb8761fcce Initial load
duke
parents:
diff changeset
    28
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    29
02bb8761fcce Initial load
duke
parents:
diff changeset
    30
# Default for COMPILER_WARNINGS_FATAL on Windows (C++ compiler warnings)
02bb8761fcce Initial load
duke
parents:
diff changeset
    31
#    Level: Default is 3, 0 means none, 4 is the most but may be unreliable
02bb8761fcce Initial load
duke
parents:
diff changeset
    32
#    Some makefiles may have set this to 0 to turn off warnings completely,
02bb8761fcce Initial load
duke
parents:
diff changeset
    33
#    which also effectively creates a COMPILER_WARNINGS_FATAL=false situation.
02bb8761fcce Initial load
duke
parents:
diff changeset
    34
#    Program.gmk may turn this down to 2 (building .exe's).
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
#    Windows 64bit platforms are less likely to be warning free.
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
#    Historically, Windows 32bit builds should be mostly warning free.
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
ifndef COMPILER_WARNING_LEVEL
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
  COMPILER_WARNING_LEVEL=3
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
ifndef COMPILER_WARNINGS_FATAL
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
  COMPILER_WARNINGS_FATAL=false
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
# Windows should use parallel compilation for best build times
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
ifndef COMPILE_APPROACH
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
  COMPILE_APPROACH = normal
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
# Indication that we are doing an incremental build.
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
#    This may trigger the creation of make depend files.
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
#    (This may not be working on windows yet, always force to false.)
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
override INCREMENTAL_BUILD = false
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
# WARNING: This is extremely touch stuff, between CYGWIN vs. MKS and all
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
#          variations of MKS and CYGWIN releases, and 32bit vs 64bit,
02bb8761fcce Initial load
duke
parents:
diff changeset
    56
#          this file can give you nightmares.
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
# Notes:
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
#   Keep all paths in the windows "mixed" style except CYGWIN UNXIXCOMMAND_PATH.
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
#   Use of PrefixPath is critical, some variables must end with / (see NOTE).
02bb8761fcce Initial load
duke
parents:
diff changeset
    61
#   Use of quotes is critical due to possible spaces in paths coming from
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
#     the environment variables, be careful.
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
#   First convert \ to / with subst, keep it quoted due to blanks, then
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
#     use cygpath -s or dosname -s to get the short non-blank name.
02bb8761fcce Initial load
duke
parents:
diff changeset
    65
#   If the MKS is old and doesn't have a dosname -s, you will be forced
02bb8761fcce Initial load
duke
parents:
diff changeset
    66
#     to set ALT variables with the short non-space directory names.
02bb8761fcce Initial load
duke
parents:
diff changeset
    67
#     If dosname doesn't appear to work, we won't use it.
02bb8761fcce Initial load
duke
parents:
diff changeset
    68
#     The dosname utility also wants to accept stdin if it is not supplied
02bb8761fcce Initial load
duke
parents:
diff changeset
    69
#     any path on the command line, this is really dangerous when using
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
#     make variables that can easily become empty, so I use:
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
#        echo $1 | dosname -s     instead of    dosname -s $1
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
#     to prevent dosname from hanging up the make process when $1 is empty.
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
#     The cygpath utility does not have this problem.
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
#   The ALT values should never really have spaces or use \.
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
#   Suspect these environment variables to have spaces and/or \ characters:
02bb8761fcce Initial load
duke
parents:
diff changeset
    76
#     SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
#     MSTOOLS, Mstools, MSSDK, MSSdk, VC71COMNTOOLS, 
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
#     MSVCDIR, MSVCDir.
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
#     So use $(subst \,/,) on them first adding quotes and placing them in
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
#         their own variable assigned with :=, then use FullPath.
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
# Use FullPath to get C:/ style non-spaces path. Never ends with a /!
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
ifdef USING_CYGWIN
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
# We assume cygpath is available in the search path
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
#    NOTE: Use of 'pwd' with CYGWIN will not get you a mixed style path!
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
CYGPATH_CMD=cygpath -a -s -m
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
define FullPath
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
$(shell $(CYGPATH_CMD) $1 2> $(DEV_NULL))
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
define OptFullPath
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
$(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1"; else echo "$1"; fi)
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
else
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
# Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
define FullPath
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
$(shell cd $1 2> $(DEV_NULL) && pwd)
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
define OptFullPath
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
# System drive
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
ifdef SYSTEMDRIVE
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
  _system_drive =$(SYSTEMDRIVE)
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
  ifdef SystemDrive
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
    _system_drive =$(SystemDrive)
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
_system_drive:=$(call CheckValue,_system_drive,C:)
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
ifdef ALT_UNIXCOMMAND_PATH
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
  xALT_UNIXCOMMAND_PATH  :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
  fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
  UNIXCOMMAND_PATH       :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
  ifdef USING_CYGWIN
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
    UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
    ifdef ROOTDIR
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
      xROOTDIR :="$(subst \,/,$(ROOTDIR))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   126
      _rootdir :=$(call FullPath,$(xROOTDIR))
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
      xROOTDIR :="$(_system_drive)/mksnt"
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
      _rootdir :=$(call FullPath,$(xROOTDIR))
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
    ifneq ($(_rootdir),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   132
      UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
02bb8761fcce Initial load
duke
parents:
diff changeset
   133
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   134
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   136
UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   137
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
# Get version of MKS or CYGWIN
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
ifdef USING_CYGWIN
02bb8761fcce Initial load
duke
parents:
diff changeset
   140
_CYGWIN_VER :=$(shell $(UNAME))
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
CYGWIN_VER  :=$(call GetVersion,$(_CYGWIN_VER))
02bb8761fcce Initial load
duke
parents:
diff changeset
   142
else # MKS
02bb8761fcce Initial load
duke
parents:
diff changeset
   143
_MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
02bb8761fcce Initial load
duke
parents:
diff changeset
   144
MKS_VER  :=$(call GetVersion,$(_MKS_VER))
02bb8761fcce Initial load
duke
parents:
diff changeset
   145
# At this point, we can re-define FullPath to use DOSNAME_CMD
02bb8761fcce Initial load
duke
parents:
diff changeset
   146
CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
02bb8761fcce Initial load
duke
parents:
diff changeset
   147
TRY_DOSNAME:=false
02bb8761fcce Initial load
duke
parents:
diff changeset
   148
ifeq ($(CHECK_MKS87),same)
02bb8761fcce Initial load
duke
parents:
diff changeset
   149
TRY_DOSNAME:=true
02bb8761fcce Initial load
duke
parents:
diff changeset
   150
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   151
# Newer should be ok
02bb8761fcce Initial load
duke
parents:
diff changeset
   152
ifeq ($(CHECK_MKS87),newer)
02bb8761fcce Initial load
duke
parents:
diff changeset
   153
TRY_DOSNAME:=true
02bb8761fcce Initial load
duke
parents:
diff changeset
   154
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   155
ifeq ($(TRY_DOSNAME),true)
02bb8761fcce Initial load
duke
parents:
diff changeset
   156
ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
02bb8761fcce Initial load
duke
parents:
diff changeset
   157
_DOSNAME=$(UNIXCOMMAND_PATH)dosname
02bb8761fcce Initial load
duke
parents:
diff changeset
   158
DOSNAME_CMD:=$(_DOSNAME) -s
02bb8761fcce Initial load
duke
parents:
diff changeset
   159
define FullPath
02bb8761fcce Initial load
duke
parents:
diff changeset
   160
$(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL)))
02bb8761fcce Initial load
duke
parents:
diff changeset
   161
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
   162
endif # test dosname -s
02bb8761fcce Initial load
duke
parents:
diff changeset
   163
endif # TRY_DOSNAME
02bb8761fcce Initial load
duke
parents:
diff changeset
   164
endif # MKS
02bb8761fcce Initial load
duke
parents:
diff changeset
   165
02bb8761fcce Initial load
duke
parents:
diff changeset
   166
# We try to get references to what we need via the default component
02bb8761fcce Initial load
duke
parents:
diff changeset
   167
#    environment variables, or what was used historically.
02bb8761fcce Initial load
duke
parents:
diff changeset
   168
02bb8761fcce Initial load
duke
parents:
diff changeset
   169
# Process Windows values into FullPath values, these paths may have \ chars
02bb8761fcce Initial load
duke
parents:
diff changeset
   170
02bb8761fcce Initial load
duke
parents:
diff changeset
   171
# System root
02bb8761fcce Initial load
duke
parents:
diff changeset
   172
ifdef SYSTEMROOT
02bb8761fcce Initial load
duke
parents:
diff changeset
   173
  xSYSTEMROOT  :="$(subst \,/,$(SYSTEMROOT))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   174
  _system_root :=$(call FullPath,$(xSYSTEMROOT))
02bb8761fcce Initial load
duke
parents:
diff changeset
   175
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   176
  ifdef SystemRoot
02bb8761fcce Initial load
duke
parents:
diff changeset
   177
     xSYSTEMROOT :="$(subst \,/,$(SystemRoot))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   178
    _system_root :=$(call FullPath,$(xSYSTEMROOT))
02bb8761fcce Initial load
duke
parents:
diff changeset
   179
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
    ifdef WINDIR
02bb8761fcce Initial load
duke
parents:
diff changeset
   181
      xWINDIR      :="$(subst \,/,$(WINDIR))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   182
      _system_root :=$(call FullPath,$(xWINDIR))
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   184
      ifdef windir
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
        xWINDIR      :="$(subst \,/,$(windir))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
        _system_root :=$(call FullPath,$(xWINDIR))
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
      endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   188
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   190
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   191
_system_root:=$(call CheckValue,_system_root,$(_system_drive)/WINNT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   192
02bb8761fcce Initial load
duke
parents:
diff changeset
   193
# Program Files directory
02bb8761fcce Initial load
duke
parents:
diff changeset
   194
ifdef PROGRAMFILES
02bb8761fcce Initial load
duke
parents:
diff changeset
   195
  xPROGRAMFILES      :="$(subst \,/,$(PROGRAMFILES))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   196
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   197
  ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   198
    xPROGRAMFILES    :="$(_system_drive)/Program Files"
02bb8761fcce Initial load
duke
parents:
diff changeset
   199
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   200
    xPROGRAMFILES    :="$(_system_drive)/Program Files (x86)"
02bb8761fcce Initial load
duke
parents:
diff changeset
   201
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   202
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   203
ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   204
  _program_files     :=$(call FullPath,$(xPROGRAMFILES))
02bb8761fcce Initial load
duke
parents:
diff changeset
   205
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   206
  ifdef PROGRAMW6432
02bb8761fcce Initial load
duke
parents:
diff changeset
   207
    xPROGRAMW6432    :="$(subst \,/,$(PROGRAMW6432))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   208
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   209
    xPROGRAMW6432    :="$(_system_drive)/Program Files"
02bb8761fcce Initial load
duke
parents:
diff changeset
   210
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   211
  _program_files     :=$(call FullPath,$(xPROGRAMW6432))
02bb8761fcce Initial load
duke
parents:
diff changeset
   212
  _program_files32   :=$(call FullPath,$(xPROGRAMFILES))
02bb8761fcce Initial load
duke
parents:
diff changeset
   213
  ifneq ($(word 1,$(_program_files32)),$(_program_files32))
02bb8761fcce Initial load
duke
parents:
diff changeset
   214
    _program_files32:=
02bb8761fcce Initial load
duke
parents:
diff changeset
   215
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   216
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   217
ifneq ($(word 1,$(_program_files)),$(_program_files))
02bb8761fcce Initial load
duke
parents:
diff changeset
   218
  _program_files:=
02bb8761fcce Initial load
duke
parents:
diff changeset
   219
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   220
02bb8761fcce Initial load
duke
parents:
diff changeset
   221
# Compilers, SDK, and Visual Studio (MSDEV) [32bit is different from 64bit]
02bb8761fcce Initial load
duke
parents:
diff changeset
   222
ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   223
  # Try looking in MSVCDIR or MSVCDir area first (set by vcvars32.bat)
02bb8761fcce Initial load
duke
parents:
diff changeset
   224
  ifdef MSVCDIR
02bb8761fcce Initial load
duke
parents:
diff changeset
   225
    xMSVCDIR  :="$(subst \,/,$(MSVCDIR))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   226
    _msvc_dir :=$(call FullPath,$(xMSVCDIR))
02bb8761fcce Initial load
duke
parents:
diff changeset
   227
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   228
    ifdef MSVCDir
02bb8761fcce Initial load
duke
parents:
diff changeset
   229
      xMSVCDIR  :="$(subst \,/,$(MSVCDir))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   230
      _msvc_dir :=$(call FullPath,$(xMSVCDIR))
02bb8761fcce Initial load
duke
parents:
diff changeset
   231
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   232
      ifneq ($(_program_files),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   233
        xMSVCDIR  :="$(_program_files)/Microsoft Visual Studio .NET 2003/Vc7"
02bb8761fcce Initial load
duke
parents:
diff changeset
   234
        _msvc_dir :=$(call FullPath,$(xMSVCDIR))
02bb8761fcce Initial load
duke
parents:
diff changeset
   235
      endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   236
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   237
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   238
  ifneq ($(subst MSDev98,OLDOLDOLD,$(_msvc_dir)),$(_msvc_dir))
02bb8761fcce Initial load
duke
parents:
diff changeset
   239
    _msvc_dir :=
02bb8761fcce Initial load
duke
parents:
diff changeset
   240
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   241
  # If we still don't have it, look for VS71COMNTOOLS, setup by installer?
02bb8761fcce Initial load
duke
parents:
diff changeset
   242
  ifeq ($(_msvc_dir),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   243
    ifdef VS71COMNTOOLS  # /Common/Tools directory, use ../../Vc7
02bb8761fcce Initial load
duke
parents:
diff changeset
   244
      xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   245
      _vs71tools     :=$(call FullPath,$(xVS71COMNTOOLS))
02bb8761fcce Initial load
duke
parents:
diff changeset
   246
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   247
    ifneq ($(_vs71tools),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   248
      _msvc_dir :=$(_vs71tools)/../../Vc7
02bb8761fcce Initial load
duke
parents:
diff changeset
   249
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   250
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   251
  ifneq ($(_msvc_dir),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   252
    _compiler_bin :=$(_msvc_dir)/Bin
02bb8761fcce Initial load
duke
parents:
diff changeset
   253
    _redist_sdk   :=$(_msvc_dir)/../SDK/v1.1/Bin
02bb8761fcce Initial load
duke
parents:
diff changeset
   254
    _ms_sdk       :=$(_msvc_dir)/PlatformSDK
02bb8761fcce Initial load
duke
parents:
diff changeset
   255
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   256
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   257
02bb8761fcce Initial load
duke
parents:
diff changeset
   258
# The Microsoft Platform SDK installed by itself
02bb8761fcce Initial load
duke
parents:
diff changeset
   259
ifneq ($(_program_files),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   260
  xPSDK  :="$(_program_files)/Microsoft Platform SDK"
02bb8761fcce Initial load
duke
parents:
diff changeset
   261
  _psdk  :=$(call FullPath,$(xPSDK))
02bb8761fcce Initial load
duke
parents:
diff changeset
   262
  ifeq ($(_psdk),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   263
    xPSDK  :="$(_program_files)/Microsoft SDK"
02bb8761fcce Initial load
duke
parents:
diff changeset
   264
    _psdk :=$(call FullPath,$(xMSSDK))
02bb8761fcce Initial load
duke
parents:
diff changeset
   265
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   266
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   267
02bb8761fcce Initial load
duke
parents:
diff changeset
   268
# If no SDK found yet, look in other places
02bb8761fcce Initial load
duke
parents:
diff changeset
   269
ifeq ($(_ms_sdk),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   270
  ifdef MSSDK
02bb8761fcce Initial load
duke
parents:
diff changeset
   271
    xMSSDK  :="$(subst \,/,$(MSSDK))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   272
    _ms_sdk :=$(call FullPath,$(xMSSDK))
02bb8761fcce Initial load
duke
parents:
diff changeset
   273
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   274
    ifdef MSSdk
02bb8761fcce Initial load
duke
parents:
diff changeset
   275
      xMSSDK  :="$(subst \,/,$(MSSdk))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   276
      _ms_sdk :=$(call FullPath,$(xMSSDK))
02bb8761fcce Initial load
duke
parents:
diff changeset
   277
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   278
      _ms_sdk :=$(_psdk)
02bb8761fcce Initial load
duke
parents:
diff changeset
   279
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   280
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   281
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   282
02bb8761fcce Initial load
duke
parents:
diff changeset
   283
# Compilers for 64bit are from SDK
02bb8761fcce Initial load
duke
parents:
diff changeset
   284
ifeq ($(ARCH_DATA_MODEL), 64)
02bb8761fcce Initial load
duke
parents:
diff changeset
   285
  ifneq ($(_ms_sdk),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   286
    ifeq ($(ARCH), ia64)
02bb8761fcce Initial load
duke
parents:
diff changeset
   287
      _compiler_bin :=$(_ms_sdk)/Bin/Win64
02bb8761fcce Initial load
duke
parents:
diff changeset
   288
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   289
    ifeq ($(ARCH), amd64)
02bb8761fcce Initial load
duke
parents:
diff changeset
   290
      _compiler_bin :=$(_ms_sdk)/Bin/Win64/x86/$(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   291
      _redist_sdk   :=$(_ms_sdk)/redist/win64/AMD64
02bb8761fcce Initial load
duke
parents:
diff changeset
   292
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   293
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   294
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   295
02bb8761fcce Initial load
duke
parents:
diff changeset
   296
# Location on system where jdk installs might be
02bb8761fcce Initial load
duke
parents:
diff changeset
   297
ifneq ($(_program_files),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   298
  USRJDKINSTANCES_PATH =$(_program_files)/Java
02bb8761fcce Initial load
duke
parents:
diff changeset
   299
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   300
  USRJDKINSTANCES_PATH =$(_system_drive)/
02bb8761fcce Initial load
duke
parents:
diff changeset
   301
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   302
02bb8761fcce Initial load
duke
parents:
diff changeset
   303
# SLASH_JAVA: location of all network accessable files
02bb8761fcce Initial load
duke
parents:
diff changeset
   304
ifdef ALT_SLASH_JAVA
02bb8761fcce Initial load
duke
parents:
diff changeset
   305
  xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   306
  SLASH_JAVA      :=$(call FullPath,$(xALT_SLASH_JAVA))
02bb8761fcce Initial load
duke
parents:
diff changeset
   307
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   308
  ifdef ALT_JDK_JAVA_DRIVE
02bb8761fcce Initial load
duke
parents:
diff changeset
   309
    SLASH_JAVA  =$(JDK_JAVA_DRIVE)
02bb8761fcce Initial load
duke
parents:
diff changeset
   310
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   311
    SLASH_JAVA  =J:
02bb8761fcce Initial load
duke
parents:
diff changeset
   312
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   313
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   314
SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
02bb8761fcce Initial load
duke
parents:
diff changeset
   315
SLASH_JAVA:=$(call AltCheckValue,SLASH_JAVA)
02bb8761fcce Initial load
duke
parents:
diff changeset
   316
02bb8761fcce Initial load
duke
parents:
diff changeset
   317
# JDK_DEVTOOLS_DIR: common path for all the java devtools
02bb8761fcce Initial load
duke
parents:
diff changeset
   318
ifdef ALT_JDK_DEVTOOLS_DIR
02bb8761fcce Initial load
duke
parents:
diff changeset
   319
  xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   320
  JDK_DEVTOOLS_DIR      :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR))
02bb8761fcce Initial load
duke
parents:
diff changeset
   321
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   322
  JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
02bb8761fcce Initial load
duke
parents:
diff changeset
   323
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   324
JDK_DEVTOOLS_DIR:=$(call AltCheckSpaces,JDK_DEVTOOLS_DIR)
02bb8761fcce Initial load
duke
parents:
diff changeset
   325
JDK_DEVTOOLS_DIR:=$(call AltCheckValue,JDK_DEVTOOLS_DIR)
02bb8761fcce Initial load
duke
parents:
diff changeset
   326
02bb8761fcce Initial load
duke
parents:
diff changeset
   327
# COMPILER_PATH: path to where the compiler and tools are installed.
02bb8761fcce Initial load
duke
parents:
diff changeset
   328
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
02bb8761fcce Initial load
duke
parents:
diff changeset
   329
ifdef ALT_COMPILER_PATH
02bb8761fcce Initial load
duke
parents:
diff changeset
   330
  xALT_COMPILER_PATH  :="$(subst \,/,$(ALT_COMPILER_PATH))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   331
  fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
02bb8761fcce Initial load
duke
parents:
diff changeset
   332
  COMPILER_PATH       :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
02bb8761fcce Initial load
duke
parents:
diff changeset
   333
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   334
  COMPILER_PATH :=$(call PrefixPath,$(_compiler_bin))
02bb8761fcce Initial load
duke
parents:
diff changeset
   335
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   336
COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   337
02bb8761fcce Initial load
duke
parents:
diff changeset
   338
# MSDEVTOOLS_PATH: path to where the additional MS Compiler tools are.
02bb8761fcce Initial load
duke
parents:
diff changeset
   339
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
02bb8761fcce Initial load
duke
parents:
diff changeset
   340
ifdef ALT_MSDEVTOOLS_PATH
02bb8761fcce Initial load
duke
parents:
diff changeset
   341
  xALT_MSDEVTOOLS_PATH  :="$(subst \,/,$(ALT_MSDEVTOOLS_PATH))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   342
  fxALT_MSDEVTOOLS_PATH :=$(call FullPath,$(xALT_MSDEVTOOLS_PATH))
02bb8761fcce Initial load
duke
parents:
diff changeset
   343
  MSDEVTOOLS_PATH       :=$(call PrefixPath,$(fxALT_MSDEVTOOLS_PATH))
02bb8761fcce Initial load
duke
parents:
diff changeset
   344
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   345
  ifeq ($(ARCH_DATA_MODEL), 64)
02bb8761fcce Initial load
duke
parents:
diff changeset
   346
    ifdef MSTOOLS
02bb8761fcce Initial load
duke
parents:
diff changeset
   347
      xMSTOOLS  :="$(subst \,/,$(MSTOOLS))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   348
      _ms_tools :=$(call FullPath,$(xMSTOOLS))
02bb8761fcce Initial load
duke
parents:
diff changeset
   349
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   350
      ifdef Mstools
02bb8761fcce Initial load
duke
parents:
diff changeset
   351
        xMSTOOLS  :="$(subst \,/,$(Mstools))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   352
        _ms_tools :=$(call FullPath,$(xMSTOOLS))
02bb8761fcce Initial load
duke
parents:
diff changeset
   353
      else
02bb8761fcce Initial load
duke
parents:
diff changeset
   354
        _ms_tools :=
02bb8761fcce Initial load
duke
parents:
diff changeset
   355
      endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   356
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   357
    ifneq ($(_ms_tools),)
02bb8761fcce Initial load
duke
parents:
diff changeset
   358
      _ms_tools_bin :=$(_ms_tools)/Bin
02bb8761fcce Initial load
duke
parents:
diff changeset
   359
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   360
      # Assumes compiler bin is .../Bin/win64/x86/AMD64, rc.exe is 3 levels up
02bb8761fcce Initial load
duke
parents:
diff changeset
   361
      _ms_tools_bin :=$(_compiler_bin)/../../..
02bb8761fcce Initial load
duke
parents:
diff changeset
   362
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   363
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   364
    _ms_tools_bin :=$(_compiler_bin)
02bb8761fcce Initial load
duke
parents:
diff changeset
   365
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   366
  MSDEVTOOLS_PATH :=$(call PrefixPath,$(_ms_tools_bin))
02bb8761fcce Initial load
duke
parents:
diff changeset
   367
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   368
MSDEVTOOLS_PATH:=$(call AltCheckSpaces,MSDEVTOOLS_PATH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   369
02bb8761fcce Initial load
duke
parents:
diff changeset
   370
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
02bb8761fcce Initial load
duke
parents:
diff changeset
   371
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
02bb8761fcce Initial load
duke
parents:
diff changeset
   372
ifdef ALT_DEVTOOLS_PATH
02bb8761fcce Initial load
duke
parents:
diff changeset
   373
  xALT_DEVTOOLS_PATH  :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
02bb8761fcce Initial load
duke
parents:
diff changeset
   374
  fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
02bb8761fcce Initial load
duke
parents:
diff changeset
   375
  DEVTOOLS_PATH       :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH))
02bb8761fcce Initial load
duke
parents:
diff changeset
   376
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   377
  ifdef USING_CYGWIN
02bb8761fcce Initial load
duke
parents:
diff changeset
   378
    DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   379
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   380
    xDEVTOOLS_PATH  :="$(_system_drive)/utils"
02bb8761fcce Initial load
duke
parents:
diff changeset
   381
    fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
02bb8761fcce Initial load
duke
parents:
diff changeset
   382
    DEVTOOLS_PATH  :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
02bb8761fcce Initial load
duke
parents:
diff changeset
   383
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   384
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   385
DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   386
02bb8761fcce Initial load
duke
parents:
diff changeset
   387
# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
02bb8761fcce Initial load
duke
parents:
diff changeset
   388
# _BOOTDIR2: Second choice
02bb8761fcce Initial load
duke
parents:
diff changeset
   389
ifndef ALT_BOOTDIR
02bb8761fcce Initial load
duke
parents:
diff changeset
   390
  _BOOTDIR1  =$(_system_drive)/jdk$(PREVIOUS_JDK_VERSION)
02bb8761fcce Initial load
duke
parents:
diff changeset
   391
  _BOOTDIR2  =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
02bb8761fcce Initial load
duke
parents:
diff changeset
   392
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   393
02bb8761fcce Initial load
duke
parents:
diff changeset
   394
# Import JDK images allow for partial builds, components not built are
02bb8761fcce Initial load
duke
parents:
diff changeset
   395
#    imported (or copied from) these import areas when needed.
02bb8761fcce Initial load
duke
parents:
diff changeset
   396
02bb8761fcce Initial load
duke
parents:
diff changeset
   397
# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
02bb8761fcce Initial load
duke
parents:
diff changeset
   398
#   multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
02bb8761fcce Initial load
duke
parents:
diff changeset
   399
ifdef ALT_BUILD_JDK_IMPORT_PATH
02bb8761fcce Initial load
duke
parents:
diff changeset
   400
  BUILD_JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
02bb8761fcce Initial load
duke
parents:
diff changeset
   401
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   402
  BUILD_JDK_IMPORT_PATH   = $(PROMOTED_BUILD_BINARIES)
02bb8761fcce Initial load
duke
parents:
diff changeset
   403
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   404
BUILD_JDK_IMPORT_PATH:=$(call AltCheckSpaces,BUILD_JDK_IMPORT_PATH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   405
BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   406
02bb8761fcce Initial load
duke
parents:
diff changeset
   407
# JDK_IMPORT_PATH: location of previously built JDK (this version) to import
02bb8761fcce Initial load
duke
parents:
diff changeset
   408
ifdef ALT_JDK_IMPORT_PATH
02bb8761fcce Initial load
duke
parents:
diff changeset
   409
  JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
02bb8761fcce Initial load
duke
parents:
diff changeset
   410
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   411
  JDK_IMPORT_PATH   = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   412
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   413
JDK_IMPORT_PATH:=$(call AltCheckSpaces,JDK_IMPORT_PATH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   414
JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
02bb8761fcce Initial load
duke
parents:
diff changeset
   415