hotspot/make/jprt.config
author ohair
Tue, 27 May 2008 09:47:18 -0700
changeset 584 02175b2b64e6
parent 1 489c9b5090e2
child 670 ddf3e9583f2f
permissions -rw-r--r--
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles) Summary: Allows for building with SS12, no longer requires SS11, warns if not SS11 for now. Once SS12 is validated and performance measurements look ok, SS12 will be the validated compiler. Reviewed-by: sspitsyn, ikrylov
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
#!echo "This is not a shell script"
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
# Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
# This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
# under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
# published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
# This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
# version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
# accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
# You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
# 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
# CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
# have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
#  
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
#############################################################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
# Error
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
error() # message
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
{
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
  echo "ERROR: $1"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
  exit 6
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
# Directory must exist
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
dirMustExist() # dir name
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
{
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
  if [ ! -d "$1" ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
    error "Directory for $2 does not exist: $1"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
# File must exist
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
fileMustExist() # dir name
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
{
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
  if [ ! -f "$1" ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
    error "File for $2 does not exist: $1"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
#############################################################################
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
# Should be set by JPRT as the 3 basic inputs
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
bootdir="${ALT_BOOTDIR}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
slashjava="${ALT_SLASH_JAVA}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
jdk_import="${ALT_JDK_IMPORT_PATH}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
# Check input
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
dirMustExist "${bootdir}"    ALT_BOOTDIR
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
dirMustExist "${slashjava}"  ALT_SLASH_JAVA
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
dirMustExist "${jdk_import}" ALT_JDK_IMPORT_PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
osname=`uname -s`
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
if [ "${osname}" = SunOS ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
   
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
    # SOLARIS: Sparc or X86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
    osarch=`uname -p`
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
    if [ "${osarch}" = sparc ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
	solaris_arch=sparc
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
    else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
	solaris_arch=i386
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
    fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
584
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    71
    if [ "${JPRT_SOLARIS_COMPILER_NAME}" != "" ] ; then
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    72
        compiler_name=${JPRT_SOLARIS_COMPILER_NAME}
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    73
    else
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    74
        if [ "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6"      -o \
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    75
             "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6u10"   -o \
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    76
             "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6perf" ] ; then
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    77
            # All jdk6 builds use SS11
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    78
            compiler_name=SS11
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    79
        else
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    80
            # FIXUP: Change to SS12 once it has been validated.
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    81
	    #compiler_name=SS12
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    82
            compiler_name=SS11
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    83
        fi
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    84
    fi
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    85
    
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    86
    # Get into path (make sure it matches ALT setting)
02175b2b64e6 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 1
diff changeset
    87
    compiler_path=${slashjava}/devtools/${solaris_arch}/SUNWspro/${compiler_name}/bin
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
    dirMustExist "${compiler_path}" COMPILER_PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
    path4sdk=${compiler_path}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
    # Add basic solaris system paths
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
    path4sdk=${path4sdk}:/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
    # Get the previous JDK to be used to bootstrap the build
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
    path4sdk=${bootdir}/bin:${path4sdk}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
    # Find GNU make
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
    make=/usr/sfw/bin/gmake
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
    if [ ! -f ${make} ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
	make=/opt/sfw/bin/gmake
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
	if [ ! -f ${make} ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
	    make=${slashjava}/devtools/${solaris_arch}/bin/gnumake
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
        fi 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
    fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
    fileMustExist "${make}" make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
    # File creation mask
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
    umask 002
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
elif [ "${osname}" = Linux ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
   
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
    # LINUX: X86, AMD64
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    osarch=`uname -m`
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
    if [ "${osarch}" = i686 ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
	linux_arch=i586
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
    elif [ "${osarch}" = x86_64 ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
	linux_arch=amd64
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
    fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
    # Get the compilers into path (make sure it matches ALT setting)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
    compiler_path=/usr/bin
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
    dirMustExist "${compiler_path}" COMPILER_PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
    path4sdk=${compiler_path}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
    # Add basic paths
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
    path4sdk=${path4sdk}:/usr/bin:/bin:/usr/sbin:/sbin
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
    # Get the previous JDK to be used to bootstrap the build
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
    path4sdk=${bootdir}/bin:${path4sdk}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
    # Find GNU make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
    make=/usr/bin/make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
    fileMustExist "${make}" make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
    umask 002
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
    # Windows: Differs on CYGWIN vs. MKS, and the compiler available.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
    #   Also, blanks in pathnames gives GNU make headaches, so anything placed
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
    #   in any ALT_* variable should be the short windows dosname.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
   
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
    # WINDOWS: Install and use MKS or CYGWIN (should have already been done)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
    #   Assumption here is that you are in a shell window via MKS or cygwin.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
    #   MKS install should have defined the environment variable ROOTDIR.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
    #   We also need to figure out which one we have: X86, AMD64
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
    if [ "`echo ${PROCESSOR_IDENTIFIER} | fgrep AMD64`" != "" ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
	windows_arch=amd64
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
    else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
	windows_arch=i586
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
    fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
    # We need to determine if we are running a CYGWIN shell or an MKS shell
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
    #    (if uname isn't available, then it will be unix_toolset=unknown)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
    unix_toolset=unknown
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
    if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
        # We kind of assume ROOTDIR is where MKS is and it's ok
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
        unix_toolset=MKS
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
        mkshome=`dosname -s "${ROOTDIR}"`
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
	# Utility to convert to short pathnames without spaces
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
	dosname="${mkshome}/mksnt/dosname -s"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
        # Most unix utilities are in the mksnt directory of ROOTDIR
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
        unixcommand_path="${mkshome}/mksnt"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
        path4sdk="${unixcommand_path}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
        dirMustExist "${unixcommand_path}" UNIXCOMMAND_PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
	devtools_path="${slashjava}/devtools/win32/bin"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
	path4sdk="${devtools_path};${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
        dirMustExist "${devtools_path}" DEVTOOLS_PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
        # Find GNU make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
        make="${devtools_path}/gnumake.exe"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
        fileMustExist "${make}" make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
    elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
        # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
        unix_toolset=CYGWIN
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
	# Utility to convert to short pathnames without spaces
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
	dosname="/usr/bin/cygpath -a -m -s"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
        # Most unix utilities are in the /usr/bin
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
        unixcommand_path="/usr/bin"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
        path4sdk="${unixcommand_path}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
        dirMustExist "${unixcommand_path}" UNIXCOMMAND_PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
        # Find GNU make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
        make="${unixcommand_path}/make.exe"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
        fileMustExist "${make}" make
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
    else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
      echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
    fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
    # WINDOWS: Compiler setup (nasty part)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
    #   NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
    #   NOTE: CYGWIN has a link.exe too, make sure the compilers are first
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
    if [ "${windows_arch}" = i586 ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
        # 32bit Windows compiler settings
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
        # VisualStudio .NET 2003 VC++ 7.1 (VS71COMNTOOLS should be defined)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
        vs_root=`${dosname} "${VS71COMNTOOLS}/../.."`
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
        # Fill in PATH, LIB, and INCLUDE (unset all others to make sure)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
        vc7_root="${vs_root}/Vc7"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
        compiler_path="${vc7_root}/bin"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
        platform_sdk="${vc7_root}/PlatformSDK"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
        # LIB and INCLUDE must use ; as a separator
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
        include4sdk="${vc7_root}/atlmfc/include"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
        include4sdk="${include4sdk};${vc7_root}/include"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
        include4sdk="${include4sdk};${platform_sdk}/include/prerelease"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
        include4sdk="${include4sdk};${platform_sdk}/include"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
        include4sdk="${include4sdk};${vs_root}/SDK/v1.1/include"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
        lib4sdk="${vc7_root}/atlmfc/lib"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
        lib4sdk="${lib4sdk};${vc7_root}/lib"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
        lib4sdk="${lib4sdk};${platform_sdk}/lib/prerelease"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
        lib4sdk="${lib4sdk};${platform_sdk}/lib"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
        lib4sdk="${lib4sdk};${vs_root}/SDK/v1.1/lib"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
        # Search path and DLL locating path
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
        #   WARNING: CYGWIN has a link.exe too, make sure compilers are first
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
        path4sdk="${vs_root}/Common7/Tools/bin;${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
	path4sdk="${vs_root}/SDK/v1.1/bin;${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
        path4sdk="${vs_root}/Common7/Tools;${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
	path4sdk="${vs_root}/Common7/Tools/bin/prerelease;${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
        path4sdk="${vs_root}/Common7/IDE;${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
	path4sdk="${compiler_path};${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
    elif [ "${windows_arch}" = amd64 ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
        # AMD64 64bit Windows compiler settings
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
	if [ "${MSSDK}" != "" ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
	    platform_sdk="${MSSDK}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
	else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
	    platform_sdk=`${dosname} "C:/Program Files/Microsoft Platform SDK/"`
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
	fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
	compiler_path="${platform_sdk}/Bin/win64/x86/AMD64"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
        # LIB and INCLUDE must use ; as a separator
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
        include4sdk="${platform_sdk}/Include"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
	include4sdk="${include4sdk};${platform_sdk}/Include/crt/sys"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
	include4sdk="${include4sdk};${platform_sdk}/Include/mfc"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
	include4sdk="${include4sdk};${platform_sdk}/Include/atl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
	include4sdk="${include4sdk};${platform_sdk}/Include/crt"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
        lib4sdk="${platform_sdk}/Lib/AMD64"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
        lib4sdk="${lib4sdk};${platform_sdk}/Lib/AMD64/atlmfc"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
        # Search path and DLL locating path
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
        #   WARNING: CYGWIN has a link.exe too, make sure compilers are first
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
        path4sdk="${platform_sdk}/bin;${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
        path4sdk="${compiler_path};${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
    fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
    # Export LIB and INCLUDE
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
    unset lib
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
    unset Lib
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
    LIB="${lib4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
    export LIB
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
    unset include
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
    unset Include
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
    INCLUDE="${include4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
    export INCLUDE
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
    # Set the ALT variable
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
    dirMustExist "${compiler_path}" COMPILER_PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
    # WINDOWS: Get the previous JDK to be used to bootstrap the build
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
    path4sdk="${bootdir}/bin;${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
    # Turn all \\ into /, remove duplicates and trailing /
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
    slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
    # For windows, it's hard to know where the system is, so we just add this
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
    #    to PATH.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
    path4sdk="${slash_path};${PATH}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
    # Convert path4sdk to cygwin style
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
    if [ "${unix_toolset}" = CYGWIN ] ; then
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
	path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
    fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
fi
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
# Export PATH setting
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
PATH="${path4sdk}"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
export PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
# Unset certain vars
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
unset LD_LIBRARY_PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
unset LD_LIBRARY_PATH_32
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
unset LD_LIBRARY_PATH_64
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276