annotate make/jprt.config @ 63:93c2600a45a4

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