1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/make/jprt.config Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,336 @@ 1.4 +#!echo "This is not a shell script" 1.5 +############################################################################# 1.6 +# 1.7 +# Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved. 1.8 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.9 +# 1.10 +# This code is free software; you can redistribute it and/or modify it 1.11 +# under the terms of the GNU General Public License version 2 only, as 1.12 +# published by the Free Software Foundation. Sun designates this 1.13 +# particular file as subject to the "Classpath" exception as provided 1.14 +# by Sun in the LICENSE file that accompanied this code. 1.15 +# 1.16 +# This code is distributed in the hope that it will be useful, but WITHOUT 1.17 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.18 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.19 +# version 2 for more details (a copy is included in the LICENSE file that 1.20 +# accompanied this code). 1.21 +# 1.22 +# You should have received a copy of the GNU General Public License version 1.23 +# 2 along with this work; if not, write to the Free Software Foundation, 1.24 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.25 +# 1.26 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1.27 +# CA 95054 USA or visit www.sun.com if you need additional information or 1.28 +# have any questions. 1.29 +# 1.30 +############################################################################# 1.31 +# 1.32 +# JPRT shell configuration for building. 1.33 +# 1.34 +# Input environment variables: 1.35 +# ALT_BOOTDIR 1.36 +# ALT_SLASH_JAVA 1.37 +# ALT_JDK_IMPORT_PATH 1.38 +# Windows Only: 1.39 +# PATH 1.40 +# VS71COMNTOOLS 1.41 +# PROCESSOR_IDENTIFIER 1.42 +# ROOTDIR 1.43 +# 1.44 +# Output variable settings: 1.45 +# make Full path to GNU make 1.46 +# compiler_path Path to compiler bin directory 1.47 +# compiler_name Unique name of this compiler 1.48 +# 1.49 +# Output environment variables: 1.50 +# PATH 1.51 +# ALT_COMPILER_PATH 1.52 +# Windows Only: 1.53 +# ALT_MSDEVTOOLS_PATH 1.54 +# ALT_DEVTOOLS_PATH (To avoid the C:/UTILS default) 1.55 +# LIB 1.56 +# INCLUDE 1.57 +# 1.58 +# After JDK6, most settings will be found via ALT_SLASH_JAVA or 1.59 +# by way of other system environment variables. If this was JDK5 1.60 +# or an older JDK, you might need to export more ALT_* variables. 1.61 +# 1.62 +# On Windows AMD64, if MSSDK is not set, assumes Platform SDK is installed at: 1.63 +# C:/Program Files/Microsoft Platform SDK 1.64 +# 1.65 +############################################################################# 1.66 + 1.67 +############################################################################# 1.68 +# Error 1.69 +error() # message 1.70 +{ 1.71 + echo "ERROR: $1" 1.72 + exit 6 1.73 +} 1.74 +# Directory must exist 1.75 +dirMustExist() # dir name 1.76 +{ 1.77 + if [ ! -d "$1" ] ; then 1.78 + error "Directory for $2 does not exist: $1" 1.79 + fi 1.80 +} 1.81 +# File must exist 1.82 +fileMustExist() # dir name 1.83 +{ 1.84 + if [ ! -f "$1" ] ; then 1.85 + error "File for $2 does not exist: $1" 1.86 + fi 1.87 +} 1.88 +############################################################################# 1.89 + 1.90 +# Should be set by JPRT as the 3 basic inputs 1.91 +bootdir="${ALT_BOOTDIR}" 1.92 +slashjava="${ALT_SLASH_JAVA}" 1.93 +jdk_import="${ALT_JDK_IMPORT_PATH}" 1.94 + 1.95 +# The /java/devtools items 1.96 +jdk_devtools="${slashjava}/devtools" 1.97 +share="${jdk_devtools}/share" 1.98 + 1.99 +# Needed for langtools, maybe other parts of the build 1.100 +ANT_HOME="${share}/ant/latest" 1.101 +export ANT_HOME 1.102 +FINDBUGS_HOME="${share}/findbugs/latest" 1.103 +export FINDBUGS_HOME 1.104 + 1.105 +# The 3 bin directories in common to all platforms 1.106 +sharebin="${share}/bin" 1.107 +antbin="${ANT_HOME}/bin" 1.108 +findbugsbin="${FINDBUGS_HOME}/bin" 1.109 + 1.110 +# Check input 1.111 +dirMustExist "${bootdir}" ALT_BOOTDIR 1.112 +dirMustExist "${slashjava}" ALT_SLASH_JAVA 1.113 +dirMustExist "${jdk_import}" ALT_JDK_IMPORT_PATH 1.114 +dirMustExist "${ANT_HOME}" ANT_HOME 1.115 +dirMustExist "${FINDBUGS_HOME}" FINDBUGS_HOME 1.116 + 1.117 +# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise. 1.118 +osname=`uname -s` 1.119 +if [ "${osname}" = SunOS ] ; then 1.120 + 1.121 + # SOLARIS: Sparc or X86 1.122 + osarch=`uname -p` 1.123 + if [ "${osarch}" = sparc ] ; then 1.124 + solaris_arch=sparc 1.125 + else 1.126 + solaris_arch=i386 1.127 + fi 1.128 + 1.129 + # Get the SS11 compilers into path (make sure it matches ALT setting) 1.130 + compiler_path=${jdk_devtools}/${solaris_arch}/SUNWspro/SS11/bin 1.131 + compiler_name=SS11 1.132 + ALT_COMPILER_PATH="${compiler_path}" 1.133 + export ALT_COMPILER_PATH 1.134 + dirMustExist "${compiler_path}" ALT_COMPILER_PATH 1.135 + path4sdk=${compiler_path}:${sharebin}:${antbin}:${findbugsbin} 1.136 + 1.137 + # Add basic solaris system paths 1.138 + path4sdk=${path4sdk}:/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin 1.139 + 1.140 + # Get the previous JDK to be used to bootstrap the build 1.141 + path4sdk=${bootdir}/bin:${path4sdk} 1.142 + 1.143 + # Find GNU make 1.144 + make=/usr/sfw/bin/gmake 1.145 + if [ ! -f ${make} ] ; then 1.146 + make=/opt/sfw/bin/gmake 1.147 + if [ ! -f ${make} ] ; then 1.148 + make=${jdk_devtools}/${solaris_arch}/bin/gnumake 1.149 + fi 1.150 + fi 1.151 + fileMustExist "${make}" make 1.152 + 1.153 + # File creation mask 1.154 + umask 002 1.155 + 1.156 +elif [ "${osname}" = Linux ] ; then 1.157 + 1.158 + # LINUX: X86, AMD64 1.159 + osarch=`uname -m` 1.160 + if [ "${osarch}" = i686 ] ; then 1.161 + linux_arch=i586 1.162 + elif [ "${osarch}" = x86_64 ] ; then 1.163 + linux_arch=amd64 1.164 + fi 1.165 + 1.166 + # Get the compilers into path (make sure it matches ALT setting) 1.167 + compiler_path=/usr/bin 1.168 + compiler_name=usr_bin 1.169 + ALT_COMPILER_PATH="${compiler_path}" 1.170 + export ALT_COMPILER_PATH 1.171 + dirMustExist "${compiler_path}" ALT_COMPILER_PATH 1.172 + path4sdk=${compiler_path}:${sharebin}:${antbin}:${findbugsbin} 1.173 + 1.174 + # Add basic paths 1.175 + path4sdk=${path4sdk}:/usr/bin:/bin:/usr/sbin:/sbin 1.176 + 1.177 + # Get the previous JDK to be used to bootstrap the build 1.178 + path4sdk=${bootdir}/bin:${path4sdk} 1.179 + 1.180 + # Find GNU make 1.181 + make=/usr/bin/make 1.182 + fileMustExist "${make}" make 1.183 + 1.184 + umask 002 1.185 + 1.186 +else 1.187 + 1.188 + # Windows: Differs on CYGWIN vs. MKS, and the compiler available. 1.189 + # Also, blanks in pathnames gives GNU make headaches, so anything placed 1.190 + # in any ALT_* variable should be the short windows dosname. 1.191 + 1.192 + # WINDOWS: Install and use MKS or CYGWIN (should have already been done) 1.193 + # Assumption here is that you are in a shell window via MKS or cygwin. 1.194 + # MKS install should have defined the environment variable ROOTDIR. 1.195 + # We also need to figure out which one we have: X86, AMD64 1.196 + if [ "`echo ${PROCESSOR_IDENTIFIER} | fgrep AMD64`" != "" ] ; then 1.197 + windows_arch=amd64 1.198 + else 1.199 + windows_arch=i586 1.200 + fi 1.201 + 1.202 + # We need to determine if we are running a CYGWIN shell or an MKS shell 1.203 + # (if uname isn't available, then it will be unix_toolset=unknown) 1.204 + unix_toolset=unknown 1.205 + if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then 1.206 + # We kind of assume ROOTDIR is where MKS is and it's ok 1.207 + unix_toolset=MKS 1.208 + mkshome=`dosname -s "${ROOTDIR}"` 1.209 + # Utility to convert to short pathnames without spaces 1.210 + dosname="${mkshome}/mksnt/dosname -s" 1.211 + # Most unix utilities are in the mksnt directory of ROOTDIR 1.212 + unixcommand_path="${mkshome}/mksnt" 1.213 + path4sdk="${sharebin};${antbin};${findbugsbin};${unixcommand_path}" 1.214 + dirMustExist "${unixcommand_path}" ALT_UNIXCOMMAND_PATH 1.215 + devtools_path="${jdk_devtools}/win32/bin" 1.216 + path4sdk="${devtools_path};${path4sdk}" 1.217 + # Normally this need not be set, but on Windows it's default is C:/UTILS 1.218 + ALT_DEVTOOLS_PATH="${devtools_path}" 1.219 + export ALT_DEVTOOLS_PATH 1.220 + dirMustExist "${devtools_path}" ALT_DEVTOOLS_PATH 1.221 + # Find GNU make 1.222 + make="${devtools_path}/gnumake.exe" 1.223 + fileMustExist "${make}" make 1.224 + elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then 1.225 + # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist 1.226 + unix_toolset=CYGWIN 1.227 + # Utility to convert to short pathnames without spaces 1.228 + dosname="/usr/bin/cygpath -a -m -s" 1.229 + # Most unix utilities are in the /usr/bin 1.230 + unixcommand_path="/usr/bin" 1.231 + path4sdk="${sharebin};${antbin};${findbugsbin};${unixcommand_path}" 1.232 + dirMustExist "${unixcommand_path}" ALT_UNIXCOMMAND_PATH 1.233 + # Find GNU make 1.234 + make="${unixcommand_path}/make.exe" 1.235 + fileMustExist "${make}" make 1.236 + else 1.237 + echo "WARNING: Cannot figure out if this is MKS or CYGWIN" 1.238 + fi 1.239 + 1.240 + # WINDOWS: Compiler setup (nasty part) 1.241 + # NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE. 1.242 + # NOTE: CYGWIN has a link.exe too, make sure the compilers are first 1.243 + if [ "${windows_arch}" = i586 ] ; then 1.244 + # 32bit Windows compiler settings 1.245 + # VisualStudio .NET 2003 VC++ 7.1 (VS71COMNTOOLS should be defined) 1.246 + vs_root=`${dosname} "${VS71COMNTOOLS}/../.."` 1.247 + # Fill in PATH, LIB, and INCLUDE (unset all others to make sure) 1.248 + msdev_root="${vs_root}/Common7/Tools" 1.249 + msdevtools_path="${msdev_root}/bin" 1.250 + vc7_root="${vs_root}/Vc7" 1.251 + compiler_path="${vc7_root}/bin" 1.252 + compiler_name=VS2003 1.253 + platform_sdk="${vc7_root}/PlatformSDK" 1.254 + # LIB and INCLUDE must use ; as a separator 1.255 + include4sdk="${vc7_root}/atlmfc/include" 1.256 + include4sdk="${include4sdk};${vc7_root}/include" 1.257 + include4sdk="${include4sdk};${platform_sdk}/include/prerelease" 1.258 + include4sdk="${include4sdk};${platform_sdk}/include" 1.259 + include4sdk="${include4sdk};${vs_root}/SDK/v1.1/include" 1.260 + lib4sdk="${vc7_root}/atlmfc/lib" 1.261 + lib4sdk="${lib4sdk};${vc7_root}/lib" 1.262 + lib4sdk="${lib4sdk};${platform_sdk}/lib/prerelease" 1.263 + lib4sdk="${lib4sdk};${platform_sdk}/lib" 1.264 + lib4sdk="${lib4sdk};${vs_root}/SDK/v1.1/lib" 1.265 + # Search path and DLL locating path 1.266 + # WARNING: CYGWIN has a link.exe too, make sure compilers are first 1.267 + path4sdk="${vs_root}/Common7/Tools/bin;${path4sdk}" 1.268 + path4sdk="${vs_root}/SDK/v1.1/bin;${path4sdk}" 1.269 + path4sdk="${vs_root}/Common7/Tools;${path4sdk}" 1.270 + path4sdk="${vs_root}/Common7/Tools/bin/prerelease;${path4sdk}" 1.271 + path4sdk="${vs_root}/Common7/IDE;${path4sdk}" 1.272 + path4sdk="${compiler_path};${path4sdk}" 1.273 + elif [ "${windows_arch}" = amd64 ] ; then 1.274 + # AMD64 64bit Windows compiler settings 1.275 + if [ "${MSSDK}" != "" ] ; then 1.276 + platform_sdk="${MSSDK}" 1.277 + else 1.278 + platform_sdk=`${dosname} "C:/Program Files/Microsoft Platform SDK/"` 1.279 + fi 1.280 + compiler_path="${platform_sdk}/Bin/win64/x86/AMD64" 1.281 + compiler_name=VS2005_PSDK 1.282 + msdevtools_path="${platform_sdk}/Bin" 1.283 + # LIB and INCLUDE must use ; as a separator 1.284 + include4sdk="${platform_sdk}/Include" 1.285 + include4sdk="${include4sdk};${platform_sdk}/Include/crt/sys" 1.286 + include4sdk="${include4sdk};${platform_sdk}/Include/mfc" 1.287 + include4sdk="${include4sdk};${platform_sdk}/Include/atl" 1.288 + include4sdk="${include4sdk};${platform_sdk}/Include/crt" 1.289 + lib4sdk="${platform_sdk}/Lib/AMD64" 1.290 + lib4sdk="${lib4sdk};${platform_sdk}/Lib/AMD64/atlmfc" 1.291 + # Search path and DLL locating path 1.292 + # WARNING: CYGWIN has a link.exe too, make sure compilers are first 1.293 + path4sdk="${platform_sdk}/bin;${path4sdk}" 1.294 + path4sdk="${compiler_path};${path4sdk}" 1.295 + fi 1.296 + # Export LIB and INCLUDE 1.297 + unset lib 1.298 + unset Lib 1.299 + LIB="${lib4sdk}" 1.300 + export LIB 1.301 + unset include 1.302 + unset Include 1.303 + INCLUDE="${include4sdk}" 1.304 + export INCLUDE 1.305 + # Set the ALT variable 1.306 + ALT_COMPILER_PATH=`${dosname} "${compiler_path}"` 1.307 + export ALT_COMPILER_PATH 1.308 + dirMustExist "${compiler_path}" ALT_COMPILER_PATH 1.309 + ALT_MSDEVTOOLS_PATH=`${dosname} "${msdevtools_path}"` 1.310 + export ALT_MSDEVTOOLS_PATH 1.311 + dirMustExist "${msdevtools_path}" ALT_MSDEVTOOLS_PATH 1.312 + 1.313 + # WINDOWS: Get the previous JDK to be used to bootstrap the build 1.314 + path4sdk="${bootdir}/bin;${path4sdk}" 1.315 + 1.316 + # Turn all \\ into /, remove duplicates and trailing / 1.317 + slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`" 1.318 + 1.319 + # For windows, it's hard to know where the system is, so we just add this 1.320 + # to PATH. 1.321 + path4sdk="${slash_path};${PATH}" 1.322 + 1.323 + # Convert path4sdk to cygwin style 1.324 + if [ "${unix_toolset}" = CYGWIN ] ; then 1.325 + path4sdk="`/usr/bin/cygpath -p ${path4sdk}`" 1.326 + fi 1.327 + 1.328 +fi 1.329 + 1.330 +# Export PATH setting 1.331 +PATH="${path4sdk}" 1.332 +export PATH 1.333 + 1.334 +# Things we need to unset 1.335 +unset LD_LIBRARY_PATH 1.336 +unset LD_LIBRARY_PATH_32 1.337 +unset LD_LIBRARY_PATH_64 1.338 +unset JAVA_HOME 1.339 +