corba/make/common/shared/Defs-windows.gmk
author ohair
Mon, 30 Aug 2010 14:39:42 -0700
changeset 6551 476ed8653670
parent 5555 b2b5ed3f0d0d
child 7672 aec650969dd5
permissions -rw-r--r--
6981043: Clean out all native code makefile logic from corba repository Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
#
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 5385
diff changeset
     2
# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
4
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
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 5385
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 5385
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
4
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
#
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 5385
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 5385
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 5385
diff changeset
    23
# questions.
4
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
#    Windows 64bit platforms are less likely to be warning free.
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
#    Historically, Windows 32bit builds should be mostly warning free.
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
ifndef COMPILER_WARNING_LEVEL
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
  COMPILER_WARNING_LEVEL=3
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
ifndef COMPILER_WARNINGS_FATAL
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
  COMPILER_WARNINGS_FATAL=false
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
# Windows should use parallel compilation for best build times
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
ifndef COMPILE_APPROACH
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
  COMPILE_APPROACH = normal
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
# Indication that we are doing an incremental build.
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
#    This may trigger the creation of make depend files.
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
#    (This may not be working on windows yet, always force to false.)
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
override INCREMENTAL_BUILD = false
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
# WARNING: This is extremely touch stuff, between CYGWIN vs. MKS and all
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
#          variations of MKS and CYGWIN releases, and 32bit vs 64bit,
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
#          this file can give you nightmares.
02bb8761fcce Initial load
duke
parents:
diff changeset
    56
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
# Notes:
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
#   Keep all paths in the windows "mixed" style except CYGWIN UNXIXCOMMAND_PATH.
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
#   Use of PrefixPath is critical, some variables must end with / (see NOTE).
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
#   Use of quotes is critical due to possible spaces in paths coming from
02bb8761fcce Initial load
duke
parents:
diff changeset
    61
#     the environment variables, be careful.
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
#   First convert \ to / with subst, keep it quoted due to blanks, then
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
#     use cygpath -s or dosname -s to get the short non-blank name.
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
#   If the MKS is old and doesn't have a dosname -s, you will be forced
02bb8761fcce Initial load
duke
parents:
diff changeset
    65
#     to set ALT variables with the short non-space directory names.
02bb8761fcce Initial load
duke
parents:
diff changeset
    66
#     If dosname doesn't appear to work, we won't use it.
02bb8761fcce Initial load
duke
parents:
diff changeset
    67
#     The dosname utility also wants to accept stdin if it is not supplied
02bb8761fcce Initial load
duke
parents:
diff changeset
    68
#     any path on the command line, this is really dangerous when using
02bb8761fcce Initial load
duke
parents:
diff changeset
    69
#     make variables that can easily become empty, so I use:
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
#        echo $1 | dosname -s     instead of    dosname -s $1
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
#     to prevent dosname from hanging up the make process when $1 is empty.
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
#     The cygpath utility does not have this problem.
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
#   The ALT values should never really have spaces or use \.
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
#   Suspect these environment variables to have spaces and/or \ characters:
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
#     SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
6551
476ed8653670 6981043: Clean out all native code makefile logic from corba repository
ohair
parents: 5555
diff changeset
    76
#     VC71COMNTOOLS, 
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
#     MSVCDIR, MSVCDir.
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
#     So use $(subst \,/,) on them first adding quotes and placing them in
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
#         their own variable assigned with :=, then use FullPath.
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
# Use FullPath to get C:/ style non-spaces path. Never ends with a /!
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
ifdef USING_CYGWIN
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
# We assume cygpath is available in the search path
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
#    NOTE: Use of 'pwd' with CYGWIN will not get you a mixed style path!
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
CYGPATH_CMD=cygpath -a -s -m
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
define FullPath
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
$(shell $(CYGPATH_CMD) $1 2> $(DEV_NULL))
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
define OptFullPath
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
$(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1"; else echo "$1"; fi)
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
else
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
# Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
define FullPath
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
$(shell cd $1 2> $(DEV_NULL) && pwd)
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
define OptFullPath
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
# System drive
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
ifdef SYSTEMDRIVE
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
  _system_drive =$(SYSTEMDRIVE)
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
  ifdef SystemDrive
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
    _system_drive =$(SystemDrive)
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
_system_drive:=$(call CheckValue,_system_drive,C:)
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   115
ifndef UNIXCOMMAND_PATH
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   116
  ifdef ALT_UNIXCOMMAND_PATH
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   117
    xALT_UNIXCOMMAND_PATH  :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   118
    fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   119
    UNIXCOMMAND_PATH       :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
  else
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   121
    ifdef USING_CYGWIN
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   122
      UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
    else
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   124
      ifdef ROOTDIR
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   125
        xROOTDIR :="$(subst \,/,$(ROOTDIR))"
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   126
        _rootdir :=$(call FullPath,$(xROOTDIR))
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   127
      else
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   128
        xROOTDIR :="$(_system_drive)/mksnt"
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   129
        _rootdir :=$(call FullPath,$(xROOTDIR))
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   130
      endif
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   131
      ifneq ($(_rootdir),)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   132
        UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   133
      endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   134
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
  endif
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   136
  UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   137
  export UNIXCOMMAND_PATH
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
02bb8761fcce Initial load
duke
parents:
diff changeset
   140
# Get version of MKS or CYGWIN
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
ifdef USING_CYGWIN
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   142
  ifndef CYGWIN_VER
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   143
    _CYGWIN_VER :=$(shell $(UNAME))
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   144
    CYGWIN_VER  :=$(call GetVersion,$(_CYGWIN_VER))
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   145
    export CYGWIN_VER
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   146
  endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   147
else # MKS
02bb8761fcce Initial load
duke
parents:
diff changeset
   148
_MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
02bb8761fcce Initial load
duke
parents:
diff changeset
   149
MKS_VER  :=$(call GetVersion,$(_MKS_VER))
02bb8761fcce Initial load
duke
parents:
diff changeset
   150
# At this point, we can re-define FullPath to use DOSNAME_CMD
02bb8761fcce Initial load
duke
parents:
diff changeset
   151
CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
02bb8761fcce Initial load
duke
parents:
diff changeset
   152
TRY_DOSNAME:=false
02bb8761fcce Initial load
duke
parents:
diff changeset
   153
ifeq ($(CHECK_MKS87),same)
02bb8761fcce Initial load
duke
parents:
diff changeset
   154
TRY_DOSNAME:=true
02bb8761fcce Initial load
duke
parents:
diff changeset
   155
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   156
# Newer should be ok
02bb8761fcce Initial load
duke
parents:
diff changeset
   157
ifeq ($(CHECK_MKS87),newer)
02bb8761fcce Initial load
duke
parents:
diff changeset
   158
TRY_DOSNAME:=true
02bb8761fcce Initial load
duke
parents:
diff changeset
   159
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   160
ifeq ($(TRY_DOSNAME),true)
02bb8761fcce Initial load
duke
parents:
diff changeset
   161
ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
02bb8761fcce Initial load
duke
parents:
diff changeset
   162
_DOSNAME=$(UNIXCOMMAND_PATH)dosname
02bb8761fcce Initial load
duke
parents:
diff changeset
   163
DOSNAME_CMD:=$(_DOSNAME) -s
02bb8761fcce Initial load
duke
parents:
diff changeset
   164
define FullPath
02bb8761fcce Initial load
duke
parents:
diff changeset
   165
$(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL)))
02bb8761fcce Initial load
duke
parents:
diff changeset
   166
endef
02bb8761fcce Initial load
duke
parents:
diff changeset
   167
endif # test dosname -s
02bb8761fcce Initial load
duke
parents:
diff changeset
   168
endif # TRY_DOSNAME
02bb8761fcce Initial load
duke
parents:
diff changeset
   169
endif # MKS
02bb8761fcce Initial load
duke
parents:
diff changeset
   170
02bb8761fcce Initial load
duke
parents:
diff changeset
   171
# We try to get references to what we need via the default component
02bb8761fcce Initial load
duke
parents:
diff changeset
   172
#    environment variables, or what was used historically.
02bb8761fcce Initial load
duke
parents:
diff changeset
   173
02bb8761fcce Initial load
duke
parents:
diff changeset
   174
# Process Windows values into FullPath values, these paths may have \ chars
02bb8761fcce Initial load
duke
parents:
diff changeset
   175
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   176
# Program Files directory
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   177
ifndef SHORTPROGRAMFILES
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   178
  ifdef PROGRAMFILES
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   179
    xPROGRAMFILES      :="$(subst \,/,$(PROGRAMFILES))"
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
  else
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   181
    ifeq ($(ARCH_DATA_MODEL), 32)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   182
      xPROGRAMFILES    :="$(_system_drive)/Program Files"
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
    else
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   184
      xPROGRAMFILES    :="$(_system_drive)/Program Files (x86)"
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
  ifeq ($(ARCH_DATA_MODEL), 32)
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   188
    SHORTPROGRAMFILES  :=$(call FullPath,$(xPROGRAMFILES))
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
  else
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   190
    ifdef PROGRAMW6432
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   191
      xPROGRAMW6432    :="$(subst \,/,$(PROGRAMW6432))"
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   192
    else
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   193
      xPROGRAMW6432    :="$(_system_drive)/Program Files"
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   194
    endif
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   195
    SHORTPROGRAMFILES  :=$(call FullPath,$(xPROGRAMW6432))
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   196
  endif
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   197
  ifneq ($(word 1,$(SHORTPROGRAMFILES)),$(SHORTPROGRAMFILES))
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   198
    SHORTPROGRAMFILES  :=
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   199
  endif
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   200
  export SHORTPROGRAMFILES
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   201
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   202
02bb8761fcce Initial load
duke
parents:
diff changeset
   203
# Location on system where jdk installs might be
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   204
ifneq ($(SHORTPROGRAMFILES),)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   205
  USRJDKINSTANCES_PATH =$(SHORTPROGRAMFILES)/Java
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   206
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   207
  USRJDKINSTANCES_PATH =$(_system_drive)/
02bb8761fcce Initial load
duke
parents:
diff changeset
   208
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   209
02bb8761fcce Initial load
duke
parents:
diff changeset
   210
# SLASH_JAVA: location of all network accessable files
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   211
ifndef SLASH_JAVA
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   212
  ifdef ALT_SLASH_JAVA
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   213
    xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))"
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   214
    SLASH_JAVA      :=$(call FullPath,$(xALT_SLASH_JAVA))
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   215
  else
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   216
    ifdef ALT_JDK_JAVA_DRIVE
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   217
      SLASH_JAVA  =$(JDK_JAVA_DRIVE)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   218
    else
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   219
      SLASH_JAVA  =J:
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   220
    endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   221
  endif
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   222
  SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   223
  SLASH_JAVA:=$(call AltCheckValue,SLASH_JAVA)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   224
  export SLASH_JAVA
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   225
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   226
02bb8761fcce Initial load
duke
parents:
diff changeset
   227
# JDK_DEVTOOLS_DIR: common path for all the java devtools
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   228
ifndef JDK_DEVTOOLS_DIR
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   229
  ifdef ALT_JDK_DEVTOOLS_DIR
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   230
    xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))"
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   231
    JDK_DEVTOOLS_DIR      :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR))
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   232
  else
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   233
    JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   234
  endif
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   235
  JDK_DEVTOOLS_DIR:=$(call AltCheckSpaces,JDK_DEVTOOLS_DIR)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   236
  JDK_DEVTOOLS_DIR:=$(call AltCheckValue,JDK_DEVTOOLS_DIR)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   237
  export JDK_DEVTOOLS_DIR
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   238
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   239
02bb8761fcce Initial load
duke
parents:
diff changeset
   240
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
02bb8761fcce Initial load
duke
parents:
diff changeset
   241
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   242
ifndef DEVTOOLS_PATH
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   243
  ifdef ALT_DEVTOOLS_PATH
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   244
    xALT_DEVTOOLS_PATH  :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   245
    fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   246
    DEVTOOLS_PATH       :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH))
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   247
  else
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   248
    ifdef USING_CYGWIN
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   249
      DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   250
    else
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   251
      xDEVTOOLS_PATH  :="$(_system_drive)/utils"
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   252
      fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   253
      DEVTOOLS_PATH  :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   254
    endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   255
  endif
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   256
  DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   257
  export DEVTOOLS_PATH
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   258
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   259
02bb8761fcce Initial load
duke
parents:
diff changeset
   260
# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
02bb8761fcce Initial load
duke
parents:
diff changeset
   261
# _BOOTDIR2: Second choice
02bb8761fcce Initial load
duke
parents:
diff changeset
   262
ifndef ALT_BOOTDIR
02bb8761fcce Initial load
duke
parents:
diff changeset
   263
  _BOOTDIR1  =$(_system_drive)/jdk$(PREVIOUS_JDK_VERSION)
02bb8761fcce Initial load
duke
parents:
diff changeset
   264
  _BOOTDIR2  =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
02bb8761fcce Initial load
duke
parents:
diff changeset
   265
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   266
02bb8761fcce Initial load
duke
parents:
diff changeset
   267
# Import JDK images allow for partial builds, components not built are
02bb8761fcce Initial load
duke
parents:
diff changeset
   268
#    imported (or copied from) these import areas when needed.
02bb8761fcce Initial load
duke
parents:
diff changeset
   269
02bb8761fcce Initial load
duke
parents:
diff changeset
   270
# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
02bb8761fcce Initial load
duke
parents:
diff changeset
   271
#   multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   272
ifndef BUILD_JDK_IMPORT_PATH
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   273
  ifdef ALT_BUILD_JDK_IMPORT_PATH
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   274
    BUILD_JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   275
  else
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   276
    BUILD_JDK_IMPORT_PATH   = $(PROMOTED_BUILD_BINARIES)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   277
  endif
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   278
  BUILD_JDK_IMPORT_PATH:=$(call AltCheckSpaces,BUILD_JDK_IMPORT_PATH)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   279
  BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   280
  export BUILD_JDK_IMPORT_PATH
4
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
# JDK_IMPORT_PATH: location of previously built JDK (this version) to import
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   284
ifndef JDK_IMPORT_PATH
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   285
  ifdef ALT_JDK_IMPORT_PATH
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   286
    JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   287
  else
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   288
    JDK_IMPORT_PATH   = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   289
  endif
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   290
  JDK_IMPORT_PATH:=$(call AltCheckSpaces,JDK_IMPORT_PATH)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   291
  JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3291
diff changeset
   292
  export JDK_IMPORT_PATH
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   293
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   294