make/jprt.config
author rupashka
Thu, 26 Feb 2009 11:44:43 +0300
changeset 2488 4d54c9133cda
parent 1117 78c43ef52a0a
child 2096 da51837a7368
permissions -rw-r--r--
6794831: Infinite loop while painting ticks on Slider with maximum=MAX_INT Reviewed-by: malenkov
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
     1
#!echo "This is not a shell script"
fd16c54261b3 Initial load
duke
parents:
diff changeset
     2
#############################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
     3
#
1117
78c43ef52a0a 6746424: Remove build dependency on findbugs and FINDBUGS_HOME
ohair
parents: 876
diff changeset
     4
# Copyright 2006-2008 Sun Microsystems, Inc.  All Rights Reserved.
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
     5
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fd16c54261b3 Initial load
duke
parents:
diff changeset
     6
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
     7
# This code is free software; you can redistribute it and/or modify it
fd16c54261b3 Initial load
duke
parents:
diff changeset
     8
# under the terms of the GNU General Public License version 2 only, as
fd16c54261b3 Initial load
duke
parents:
diff changeset
     9
# published by the Free Software Foundation.  Sun designates this
fd16c54261b3 Initial load
duke
parents:
diff changeset
    10
# particular file as subject to the "Classpath" exception as provided
fd16c54261b3 Initial load
duke
parents:
diff changeset
    11
# by Sun in the LICENSE file that accompanied this code.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    12
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    13
# This code is distributed in the hope that it will be useful, but WITHOUT
fd16c54261b3 Initial load
duke
parents:
diff changeset
    14
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fd16c54261b3 Initial load
duke
parents:
diff changeset
    15
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fd16c54261b3 Initial load
duke
parents:
diff changeset
    16
# version 2 for more details (a copy is included in the LICENSE file that
fd16c54261b3 Initial load
duke
parents:
diff changeset
    17
# accompanied this code).
fd16c54261b3 Initial load
duke
parents:
diff changeset
    18
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    19
# You should have received a copy of the GNU General Public License version
fd16c54261b3 Initial load
duke
parents:
diff changeset
    20
# 2 along with this work; if not, write to the Free Software Foundation,
fd16c54261b3 Initial load
duke
parents:
diff changeset
    21
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    22
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    23
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
fd16c54261b3 Initial load
duke
parents:
diff changeset
    24
# CA 95054 USA or visit www.sun.com if you need additional information or
fd16c54261b3 Initial load
duke
parents:
diff changeset
    25
# have any questions.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    26
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    27
#############################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
    28
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    29
# JPRT shell configuration for building.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    30
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    31
# Input environment variables:
fd16c54261b3 Initial load
duke
parents:
diff changeset
    32
#    ALT_BOOTDIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
    33
#    ALT_SLASH_JAVA
fd16c54261b3 Initial load
duke
parents:
diff changeset
    34
#    ALT_JDK_IMPORT_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
    35
#    OPENJDK
fd16c54261b3 Initial load
duke
parents:
diff changeset
    36
#    Windows Only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
    37
#      PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
    38
#      VS71COMNTOOLS
fd16c54261b3 Initial load
duke
parents:
diff changeset
    39
#      PROCESSOR_IDENTIFIER
fd16c54261b3 Initial load
duke
parents:
diff changeset
    40
#      ROOTDIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
    41
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    42
# Output variable settings:
fd16c54261b3 Initial load
duke
parents:
diff changeset
    43
#    make            Full path to GNU make
fd16c54261b3 Initial load
duke
parents:
diff changeset
    44
#    compiler_path   Path to compiler bin directory
fd16c54261b3 Initial load
duke
parents:
diff changeset
    45
#    compiler_name   Unique name of this compiler
fd16c54261b3 Initial load
duke
parents:
diff changeset
    46
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    47
# Output environment variables:
fd16c54261b3 Initial load
duke
parents:
diff changeset
    48
#    PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
    49
#    ALT_COMPILER_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
    50
#    OPENJDK only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
    51
#      ALT_CLOSED_JDK_IMPORT_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
    52
#      ALT_JDK_DEVTOOLS_DIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
    53
#    Windows Only:
fd16c54261b3 Initial load
duke
parents:
diff changeset
    54
#      ALT_MSDEVTOOLS_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
    55
#      ALT_DEVTOOLS_PATH (To avoid the C:/UTILS default)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    56
#      LIB
fd16c54261b3 Initial load
duke
parents:
diff changeset
    57
#      INCLUDE
fd16c54261b3 Initial load
duke
parents:
diff changeset
    58
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    59
# After JDK6, most settings will be found via ALT_SLASH_JAVA or
fd16c54261b3 Initial load
duke
parents:
diff changeset
    60
#   by way of other system environment variables. If this was JDK5
fd16c54261b3 Initial load
duke
parents:
diff changeset
    61
#   or an older JDK, you might need to export more ALT_* variables.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    62
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    63
# On Windows AMD64, if MSSDK is not set, assumes Platform SDK is installed at:
fd16c54261b3 Initial load
duke
parents:
diff changeset
    64
#          C:/Program Files/Microsoft Platform SDK
fd16c54261b3 Initial load
duke
parents:
diff changeset
    65
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    66
#############################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
    67
fd16c54261b3 Initial load
duke
parents:
diff changeset
    68
#############################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
    69
# Error
fd16c54261b3 Initial load
duke
parents:
diff changeset
    70
error() # message
fd16c54261b3 Initial load
duke
parents:
diff changeset
    71
{
fd16c54261b3 Initial load
duke
parents:
diff changeset
    72
  echo "ERROR: $1"
fd16c54261b3 Initial load
duke
parents:
diff changeset
    73
  exit 6
fd16c54261b3 Initial load
duke
parents:
diff changeset
    74
}
fd16c54261b3 Initial load
duke
parents:
diff changeset
    75
# Directory must exist
fd16c54261b3 Initial load
duke
parents:
diff changeset
    76
dirMustExist() # dir name
fd16c54261b3 Initial load
duke
parents:
diff changeset
    77
{
fd16c54261b3 Initial load
duke
parents:
diff changeset
    78
  if [ ! -d "$1" ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
    79
    error "Directory for $2 does not exist: $1"
fd16c54261b3 Initial load
duke
parents:
diff changeset
    80
  fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
    81
}
fd16c54261b3 Initial load
duke
parents:
diff changeset
    82
# File must exist
fd16c54261b3 Initial load
duke
parents:
diff changeset
    83
fileMustExist() # dir name
fd16c54261b3 Initial load
duke
parents:
diff changeset
    84
{
fd16c54261b3 Initial load
duke
parents:
diff changeset
    85
  if [ ! -f "$1" ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
    86
    error "File for $2 does not exist: $1"
fd16c54261b3 Initial load
duke
parents:
diff changeset
    87
  fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
    88
}
fd16c54261b3 Initial load
duke
parents:
diff changeset
    89
#############################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
    90
fd16c54261b3 Initial load
duke
parents:
diff changeset
    91
# Should be set by JPRT as the 3 basic inputs
fd16c54261b3 Initial load
duke
parents:
diff changeset
    92
bootdir="${ALT_BOOTDIR}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
    93
slashjava="${ALT_SLASH_JAVA}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
    94
jdk_import="${ALT_JDK_IMPORT_PATH}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
    95
fd16c54261b3 Initial load
duke
parents:
diff changeset
    96
# The /java/devtools items
fd16c54261b3 Initial load
duke
parents:
diff changeset
    97
jdk_devtools="${slashjava}/devtools"
fd16c54261b3 Initial load
duke
parents:
diff changeset
    98
share="${jdk_devtools}/share"
fd16c54261b3 Initial load
duke
parents:
diff changeset
    99
fd16c54261b3 Initial load
duke
parents:
diff changeset
   100
# Needed for langtools, maybe other parts of the build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   101
ANT_HOME="${share}/ant/latest"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   102
export ANT_HOME
fd16c54261b3 Initial load
duke
parents:
diff changeset
   103
fd16c54261b3 Initial load
duke
parents:
diff changeset
   104
# The 3 bin directories in common to all platforms
fd16c54261b3 Initial load
duke
parents:
diff changeset
   105
sharebin="${share}/bin"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   106
antbin="${ANT_HOME}/bin"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   107
fd16c54261b3 Initial load
duke
parents:
diff changeset
   108
# Check input
fd16c54261b3 Initial load
duke
parents:
diff changeset
   109
dirMustExist "${bootdir}"         ALT_BOOTDIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
   110
dirMustExist "${slashjava}"       ALT_SLASH_JAVA
fd16c54261b3 Initial load
duke
parents:
diff changeset
   111
dirMustExist "${jdk_import}"      ALT_JDK_IMPORT_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   112
dirMustExist "${ANT_HOME}"        ANT_HOME
fd16c54261b3 Initial load
duke
parents:
diff changeset
   113
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 740
diff changeset
   114
# If ALT_PREVIOUS_RELEASE_IMAGE not defined, set it to the bootdir area for
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   115
#    any possible image comparisons.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   116
#    We assume bootdir is a previous jdk release image, valid for comparison
fd16c54261b3 Initial load
duke
parents:
diff changeset
   117
#    reasons.
874
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 740
diff changeset
   118
if [ "${ALT_PREVIOUS_RELEASE_IMAGE}" = "" ] ; then
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 740
diff changeset
   119
   ALT_PREVIOUS_RELEASE_IMAGE="${bootdir}"
638ddad10e12 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 740
diff changeset
   120
   export ALT_PREVIOUS_RELEASE_IMAGE
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   121
fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   122
fd16c54261b3 Initial load
duke
parents:
diff changeset
   123
# Use the JDK import for now (FIXME: use the binary plugs?)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   124
if [ "${OPENJDK}" = true ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   125
  ALT_CLOSED_JDK_IMPORT_PATH="${jdk_import}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   126
  export ALT_CLOSED_JDK_IMPORT_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   127
fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   128
fd16c54261b3 Initial load
duke
parents:
diff changeset
   129
# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   130
osname=`uname -s`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   131
if [ "${osname}" = SunOS ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   132
   
fd16c54261b3 Initial load
duke
parents:
diff changeset
   133
    # SOLARIS: Sparc or X86
fd16c54261b3 Initial load
duke
parents:
diff changeset
   134
    osarch=`uname -p`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   135
    if [ "${osarch}" = sparc ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   136
	solaris_arch=sparc
fd16c54261b3 Initial load
duke
parents:
diff changeset
   137
    else
fd16c54261b3 Initial load
duke
parents:
diff changeset
   138
	solaris_arch=i386
fd16c54261b3 Initial load
duke
parents:
diff changeset
   139
    fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   140
740
b13aca6dc92a 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 0
diff changeset
   141
    # Get the compilers into path (make sure it matches ALT setting)
b13aca6dc92a 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 0
diff changeset
   142
    if [ "${JPRT_SOLARIS_COMPILER_NAME}" != "" ] ; then
b13aca6dc92a 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 0
diff changeset
   143
        compiler_name=${JPRT_SOLARIS_COMPILER_NAME}
b13aca6dc92a 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 0
diff changeset
   144
    else
875
c879050e4c17 6724669: JDK7: Official change to Sun Studio 12 compilers on Solaris
ohair
parents: 740
diff changeset
   145
	compiler_name=SS12
740
b13aca6dc92a 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 0
diff changeset
   146
    fi
b13aca6dc92a 6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents: 0
diff changeset
   147
    compiler_path=${jdk_devtools}/${solaris_arch}/SUNWspro/${compiler_name}/bin
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   148
    ALT_COMPILER_PATH="${compiler_path}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   149
    export ALT_COMPILER_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   150
    dirMustExist "${compiler_path}" ALT_COMPILER_PATH
1117
78c43ef52a0a 6746424: Remove build dependency on findbugs and FINDBUGS_HOME
ohair
parents: 876
diff changeset
   151
    path4sdk=${compiler_path}:${sharebin}:${antbin}
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   152
fd16c54261b3 Initial load
duke
parents:
diff changeset
   153
    # Add basic solaris system paths
fd16c54261b3 Initial load
duke
parents:
diff changeset
   154
    path4sdk=${path4sdk}:/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin
fd16c54261b3 Initial load
duke
parents:
diff changeset
   155
fd16c54261b3 Initial load
duke
parents:
diff changeset
   156
    # Get the previous JDK to be used to bootstrap the build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   157
    path4sdk=${bootdir}/bin:${path4sdk}
fd16c54261b3 Initial load
duke
parents:
diff changeset
   158
fd16c54261b3 Initial load
duke
parents:
diff changeset
   159
    # Find GNU make
fd16c54261b3 Initial load
duke
parents:
diff changeset
   160
    make=/usr/sfw/bin/gmake
fd16c54261b3 Initial load
duke
parents:
diff changeset
   161
    if [ ! -f ${make} ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   162
	make=/opt/sfw/bin/gmake
fd16c54261b3 Initial load
duke
parents:
diff changeset
   163
	if [ ! -f ${make} ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   164
	    make=${jdk_devtools}/${solaris_arch}/bin/gnumake
fd16c54261b3 Initial load
duke
parents:
diff changeset
   165
        fi 
fd16c54261b3 Initial load
duke
parents:
diff changeset
   166
    fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   167
    fileMustExist "${make}" make
fd16c54261b3 Initial load
duke
parents:
diff changeset
   168
fd16c54261b3 Initial load
duke
parents:
diff changeset
   169
    # File creation mask
fd16c54261b3 Initial load
duke
parents:
diff changeset
   170
    umask 002
fd16c54261b3 Initial load
duke
parents:
diff changeset
   171
fd16c54261b3 Initial load
duke
parents:
diff changeset
   172
elif [ "${osname}" = Linux ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   173
   
fd16c54261b3 Initial load
duke
parents:
diff changeset
   174
    # LINUX: X86, AMD64
fd16c54261b3 Initial load
duke
parents:
diff changeset
   175
    osarch=`uname -m`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   176
    if [ "${osarch}" = i686 ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   177
	linux_arch=i586
fd16c54261b3 Initial load
duke
parents:
diff changeset
   178
    elif [ "${osarch}" = x86_64 ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   179
	linux_arch=amd64
fd16c54261b3 Initial load
duke
parents:
diff changeset
   180
    fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   181
fd16c54261b3 Initial load
duke
parents:
diff changeset
   182
    # Get the compilers into path (make sure it matches ALT setting)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   183
    compiler_path=/usr/bin
fd16c54261b3 Initial load
duke
parents:
diff changeset
   184
    compiler_name=usr_bin
fd16c54261b3 Initial load
duke
parents:
diff changeset
   185
    ALT_COMPILER_PATH="${compiler_path}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   186
    export ALT_COMPILER_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   187
    dirMustExist "${compiler_path}" ALT_COMPILER_PATH
1117
78c43ef52a0a 6746424: Remove build dependency on findbugs and FINDBUGS_HOME
ohair
parents: 876
diff changeset
   188
    path4sdk=${compiler_path}:${sharebin}:${antbin}
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   189
    
fd16c54261b3 Initial load
duke
parents:
diff changeset
   190
    # Add basic paths
fd16c54261b3 Initial load
duke
parents:
diff changeset
   191
    path4sdk=${path4sdk}:/usr/bin:/bin:/usr/sbin:/sbin
fd16c54261b3 Initial load
duke
parents:
diff changeset
   192
fd16c54261b3 Initial load
duke
parents:
diff changeset
   193
    # Get the previous JDK to be used to bootstrap the build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   194
    path4sdk=${bootdir}/bin:${path4sdk}
fd16c54261b3 Initial load
duke
parents:
diff changeset
   195
    
fd16c54261b3 Initial load
duke
parents:
diff changeset
   196
    # Find GNU make
fd16c54261b3 Initial load
duke
parents:
diff changeset
   197
    make=/usr/bin/make
fd16c54261b3 Initial load
duke
parents:
diff changeset
   198
    fileMustExist "${make}" make
fd16c54261b3 Initial load
duke
parents:
diff changeset
   199
fd16c54261b3 Initial load
duke
parents:
diff changeset
   200
    umask 002
fd16c54261b3 Initial load
duke
parents:
diff changeset
   201
   
fd16c54261b3 Initial load
duke
parents:
diff changeset
   202
    # Linux platform may be old, use motif files from the devtools area
fd16c54261b3 Initial load
duke
parents:
diff changeset
   203
    if [ "${OPENJDK}" = true ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   204
      ALT_JDK_DEVTOOLS_DIR="${jdk_devtools}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   205
      export ALT_JDK_DEVTOOLS_DIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
   206
    fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   207
fd16c54261b3 Initial load
duke
parents:
diff changeset
   208
fd16c54261b3 Initial load
duke
parents:
diff changeset
   209
else
fd16c54261b3 Initial load
duke
parents:
diff changeset
   210
fd16c54261b3 Initial load
duke
parents:
diff changeset
   211
    # Windows: Differs on CYGWIN vs. MKS, and the compiler available.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   212
    #   Also, blanks in pathnames gives GNU make headaches, so anything placed
fd16c54261b3 Initial load
duke
parents:
diff changeset
   213
    #   in any ALT_* variable should be the short windows dosname.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   214
   
fd16c54261b3 Initial load
duke
parents:
diff changeset
   215
    # WINDOWS: Install and use MKS or CYGWIN (should have already been done)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   216
    #   Assumption here is that you are in a shell window via MKS or cygwin.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   217
    #   MKS install should have defined the environment variable ROOTDIR.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   218
    #   We also need to figure out which one we have: X86, AMD64
fd16c54261b3 Initial load
duke
parents:
diff changeset
   219
    if [ "`echo ${PROCESSOR_IDENTIFIER} | fgrep AMD64`" != "" ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   220
	windows_arch=amd64
fd16c54261b3 Initial load
duke
parents:
diff changeset
   221
    else
fd16c54261b3 Initial load
duke
parents:
diff changeset
   222
	windows_arch=i586
fd16c54261b3 Initial load
duke
parents:
diff changeset
   223
    fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   224
    
fd16c54261b3 Initial load
duke
parents:
diff changeset
   225
    # We need to determine if we are running a CYGWIN shell or an MKS shell
fd16c54261b3 Initial load
duke
parents:
diff changeset
   226
    #    (if uname isn't available, then it will be unix_toolset=unknown)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   227
    unix_toolset=unknown
fd16c54261b3 Initial load
duke
parents:
diff changeset
   228
    if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   229
        # We kind of assume ROOTDIR is where MKS is and it's ok
fd16c54261b3 Initial load
duke
parents:
diff changeset
   230
        unix_toolset=MKS
fd16c54261b3 Initial load
duke
parents:
diff changeset
   231
        mkshome=`dosname -s "${ROOTDIR}"`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   232
	# Utility to convert to short pathnames without spaces
fd16c54261b3 Initial load
duke
parents:
diff changeset
   233
	dosname="${mkshome}/mksnt/dosname -s"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   234
        # Most unix utilities are in the mksnt directory of ROOTDIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
   235
        unixcommand_path="${mkshome}/mksnt"
1117
78c43ef52a0a 6746424: Remove build dependency on findbugs and FINDBUGS_HOME
ohair
parents: 876
diff changeset
   236
        path4sdk="${sharebin};${antbin};${unixcommand_path}"
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   237
        dirMustExist "${unixcommand_path}" ALT_UNIXCOMMAND_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   238
	devtools_path="${jdk_devtools}/win32/bin"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   239
	path4sdk="${devtools_path};${path4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   240
	# Normally this need not be set, but on Windows it's default is C:/UTILS
fd16c54261b3 Initial load
duke
parents:
diff changeset
   241
        ALT_DEVTOOLS_PATH="${devtools_path}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   242
	export ALT_DEVTOOLS_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   243
        dirMustExist "${devtools_path}" ALT_DEVTOOLS_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   244
        # Find GNU make
fd16c54261b3 Initial load
duke
parents:
diff changeset
   245
        make="${devtools_path}/gnumake.exe"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   246
        fileMustExist "${make}" make
fd16c54261b3 Initial load
duke
parents:
diff changeset
   247
    elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   248
        # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
fd16c54261b3 Initial load
duke
parents:
diff changeset
   249
        unix_toolset=CYGWIN
fd16c54261b3 Initial load
duke
parents:
diff changeset
   250
	# Utility to convert to short pathnames without spaces
fd16c54261b3 Initial load
duke
parents:
diff changeset
   251
	dosname="/usr/bin/cygpath -a -m -s"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   252
        # Most unix utilities are in the /usr/bin
fd16c54261b3 Initial load
duke
parents:
diff changeset
   253
        unixcommand_path="/usr/bin"
1117
78c43ef52a0a 6746424: Remove build dependency on findbugs and FINDBUGS_HOME
ohair
parents: 876
diff changeset
   254
        path4sdk="${sharebin};${antbin};${unixcommand_path}"
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   255
        dirMustExist "${unixcommand_path}" ALT_UNIXCOMMAND_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   256
        # Find GNU make
fd16c54261b3 Initial load
duke
parents:
diff changeset
   257
        make="${unixcommand_path}/make.exe"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   258
        fileMustExist "${make}" make
fd16c54261b3 Initial load
duke
parents:
diff changeset
   259
    else
fd16c54261b3 Initial load
duke
parents:
diff changeset
   260
      echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   261
    fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   262
fd16c54261b3 Initial load
duke
parents:
diff changeset
   263
    # WINDOWS: Compiler setup (nasty part)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   264
    #   NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   265
    #   NOTE: CYGWIN has a link.exe too, make sure the compilers are first
fd16c54261b3 Initial load
duke
parents:
diff changeset
   266
    if [ "${windows_arch}" = i586 ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   267
        # 32bit Windows compiler settings
fd16c54261b3 Initial load
duke
parents:
diff changeset
   268
        # VisualStudio .NET 2003 VC++ 7.1 (VS71COMNTOOLS should be defined)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   269
        vs_root=`${dosname} "${VS71COMNTOOLS}/../.."`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   270
        # Fill in PATH, LIB, and INCLUDE (unset all others to make sure)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   271
        msdev_root="${vs_root}/Common7/Tools"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   272
        msdevtools_path="${msdev_root}/bin"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   273
        vc7_root="${vs_root}/Vc7"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   274
        compiler_path="${vc7_root}/bin"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   275
        compiler_name=VS2003
fd16c54261b3 Initial load
duke
parents:
diff changeset
   276
        platform_sdk="${vc7_root}/PlatformSDK"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   277
        # LIB and INCLUDE must use ; as a separator
fd16c54261b3 Initial load
duke
parents:
diff changeset
   278
        include4sdk="${vc7_root}/atlmfc/include"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   279
        include4sdk="${include4sdk};${vc7_root}/include"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   280
        include4sdk="${include4sdk};${platform_sdk}/include/prerelease"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   281
        include4sdk="${include4sdk};${platform_sdk}/include"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   282
        include4sdk="${include4sdk};${vs_root}/SDK/v1.1/include"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   283
        lib4sdk="${vc7_root}/atlmfc/lib"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   284
        lib4sdk="${lib4sdk};${vc7_root}/lib"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   285
        lib4sdk="${lib4sdk};${platform_sdk}/lib/prerelease"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   286
        lib4sdk="${lib4sdk};${platform_sdk}/lib"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   287
        lib4sdk="${lib4sdk};${vs_root}/SDK/v1.1/lib"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   288
        # Search path and DLL locating path
fd16c54261b3 Initial load
duke
parents:
diff changeset
   289
        #   WARNING: CYGWIN has a link.exe too, make sure compilers are first
fd16c54261b3 Initial load
duke
parents:
diff changeset
   290
        path4sdk="${vs_root}/Common7/Tools/bin;${path4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   291
	path4sdk="${vs_root}/SDK/v1.1/bin;${path4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   292
        path4sdk="${vs_root}/Common7/Tools;${path4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   293
	path4sdk="${vs_root}/Common7/Tools/bin/prerelease;${path4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   294
        path4sdk="${vs_root}/Common7/IDE;${path4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   295
	path4sdk="${compiler_path};${path4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   296
    elif [ "${windows_arch}" = amd64 ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   297
        # AMD64 64bit Windows compiler settings
fd16c54261b3 Initial load
duke
parents:
diff changeset
   298
	if [ "${MSSDK}" != "" ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   299
	    platform_sdk="${MSSDK}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   300
	else
fd16c54261b3 Initial load
duke
parents:
diff changeset
   301
	    platform_sdk=`${dosname} "C:/Program Files/Microsoft Platform SDK/"`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   302
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   303
	compiler_path="${platform_sdk}/Bin/win64/x86/AMD64"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   304
        compiler_name=VS2005_PSDK
fd16c54261b3 Initial load
duke
parents:
diff changeset
   305
	msdevtools_path="${platform_sdk}/Bin"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   306
        # LIB and INCLUDE must use ; as a separator
fd16c54261b3 Initial load
duke
parents:
diff changeset
   307
        include4sdk="${platform_sdk}/Include"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   308
	include4sdk="${include4sdk};${platform_sdk}/Include/crt/sys"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   309
	include4sdk="${include4sdk};${platform_sdk}/Include/mfc"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   310
	include4sdk="${include4sdk};${platform_sdk}/Include/atl"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   311
	include4sdk="${include4sdk};${platform_sdk}/Include/crt"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   312
        lib4sdk="${platform_sdk}/Lib/AMD64"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   313
        lib4sdk="${lib4sdk};${platform_sdk}/Lib/AMD64/atlmfc"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   314
        # Search path and DLL locating path
fd16c54261b3 Initial load
duke
parents:
diff changeset
   315
        #   WARNING: CYGWIN has a link.exe too, make sure compilers are first
fd16c54261b3 Initial load
duke
parents:
diff changeset
   316
        path4sdk="${platform_sdk}/bin;${path4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   317
        path4sdk="${compiler_path};${path4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   318
    fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   319
    # Export LIB and INCLUDE
fd16c54261b3 Initial load
duke
parents:
diff changeset
   320
    unset lib
fd16c54261b3 Initial load
duke
parents:
diff changeset
   321
    unset Lib
fd16c54261b3 Initial load
duke
parents:
diff changeset
   322
    LIB="${lib4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   323
    export LIB
fd16c54261b3 Initial load
duke
parents:
diff changeset
   324
    unset include
fd16c54261b3 Initial load
duke
parents:
diff changeset
   325
    unset Include
fd16c54261b3 Initial load
duke
parents:
diff changeset
   326
    INCLUDE="${include4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   327
    export INCLUDE
fd16c54261b3 Initial load
duke
parents:
diff changeset
   328
    # Set the ALT variable
fd16c54261b3 Initial load
duke
parents:
diff changeset
   329
    ALT_COMPILER_PATH=`${dosname} "${compiler_path}"`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   330
    export ALT_COMPILER_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   331
    dirMustExist "${compiler_path}" ALT_COMPILER_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   332
    ALT_MSDEVTOOLS_PATH=`${dosname} "${msdevtools_path}"`
fd16c54261b3 Initial load
duke
parents:
diff changeset
   333
    export ALT_MSDEVTOOLS_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   334
    dirMustExist "${msdevtools_path}" ALT_MSDEVTOOLS_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   335
    
fd16c54261b3 Initial load
duke
parents:
diff changeset
   336
    # WINDOWS: Get the previous JDK to be used to bootstrap the build
fd16c54261b3 Initial load
duke
parents:
diff changeset
   337
    path4sdk="${bootdir}/bin;${path4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   338
fd16c54261b3 Initial load
duke
parents:
diff changeset
   339
    # Turn all \\ into /, remove duplicates and trailing /
fd16c54261b3 Initial load
duke
parents:
diff changeset
   340
    slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   341
    
fd16c54261b3 Initial load
duke
parents:
diff changeset
   342
    # For windows, it's hard to know where the system is, so we just add this
fd16c54261b3 Initial load
duke
parents:
diff changeset
   343
    #    to PATH.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   344
    path4sdk="${slash_path};${PATH}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   345
    
fd16c54261b3 Initial load
duke
parents:
diff changeset
   346
    # Convert path4sdk to cygwin style
fd16c54261b3 Initial load
duke
parents:
diff changeset
   347
    if [ "${unix_toolset}" = CYGWIN ] ; then
fd16c54261b3 Initial load
duke
parents:
diff changeset
   348
	path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   349
    fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   350
fd16c54261b3 Initial load
duke
parents:
diff changeset
   351
    # Set special windows ALT variables
fd16c54261b3 Initial load
duke
parents:
diff changeset
   352
    ALT_ISHIELDDIR="C:/ishield802"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   353
    export ALT_ISHIELDDIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
   354
fd16c54261b3 Initial load
duke
parents:
diff changeset
   355
    # Sponsors binaries
fd16c54261b3 Initial load
duke
parents:
diff changeset
   356
    ALT_SPONSOR1DIR=C:/sponsor_binaries
fd16c54261b3 Initial load
duke
parents:
diff changeset
   357
    export ALT_SPONSOR1DIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
   358
    ALT_SPONSOR2DIR=C:/sponsor_binaries 
fd16c54261b3 Initial load
duke
parents:
diff changeset
   359
    export ALT_SPONSOR2DIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
   360
fd16c54261b3 Initial load
duke
parents:
diff changeset
   361
fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   362
fd16c54261b3 Initial load
duke
parents:
diff changeset
   363
# Export PATH setting
fd16c54261b3 Initial load
duke
parents:
diff changeset
   364
PATH="${path4sdk}"
fd16c54261b3 Initial load
duke
parents:
diff changeset
   365
export PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   366
fd16c54261b3 Initial load
duke
parents:
diff changeset
   367
# Things we need to unset
fd16c54261b3 Initial load
duke
parents:
diff changeset
   368
unset LD_LIBRARY_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   369
unset LD_LIBRARY_PATH_32
fd16c54261b3 Initial load
duke
parents:
diff changeset
   370
unset LD_LIBRARY_PATH_64
fd16c54261b3 Initial load
duke
parents:
diff changeset
   371
unset JAVA_HOME
fd16c54261b3 Initial load
duke
parents:
diff changeset
   372