annotate make/solaris/build.sh @ 196:d1605aabd0a1

6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
author xdono
date Wed, 02 Jul 2008 12:55:16 -0700
parents a294fd0c4b38
children c18cbe5936b8
rev   line source
duke@0 1 #! /bin/sh
duke@0 2 #
xdono@196 3 # Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
duke@0 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 5 #
duke@0 6 # This code is free software; you can redistribute it and/or modify it
duke@0 7 # under the terms of the GNU General Public License version 2 only, as
duke@0 8 # published by the Free Software Foundation.
duke@0 9 #
duke@0 10 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 13 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 14 # accompanied this code).
duke@0 15 #
duke@0 16 # You should have received a copy of the GNU General Public License version
duke@0 17 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 19 #
duke@0 20 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@0 21 # CA 95054 USA or visit www.sun.com if you need additional information or
duke@0 22 # have any questions.
duke@0 23 #
duke@0 24 #
duke@0 25
duke@0 26 # Make sure the variable JAVA_HOME is set before running this script.
duke@0 27
duke@0 28 set -u
duke@0 29
duke@0 30
duke@0 31 usage() {
duke@0 32 (
duke@0 33 echo "Usage : $0 [-sb | -sbfast] config ws_path"
duke@0 34 echo ""
duke@0 35 echo "Where:"
duke@0 36 echo " -sb ::= enable source browser info generation for"
duke@0 37 echo " all configs during compilation"
duke@0 38 echo ""
duke@0 39 echo " -sbfast ::= enable source browser info generation for"
duke@0 40 echo " all configs without compilation"
duke@0 41 echo ""
duke@0 42 echo " config ::= debug | debug1 | debugcore"
duke@0 43 echo " fastdebug | fastdebug1 | fastdebugcore"
duke@0 44 echo " jvmg | jvmg1 | jvmgcore"
duke@0 45 echo " optimized | optimized1 | optimizedcore"
duke@0 46 echo " profiled | profiled1 | profiledcore"
duke@0 47 echo " product | product1 | productcore"
duke@0 48 echo ""
duke@0 49 echo " ws_path ::= path to HotSpot workspace"
duke@0 50 ) >&2
duke@0 51 exit 1
duke@0 52 }
duke@0 53
duke@0 54 # extract possible options
duke@0 55 options=""
duke@0 56 if [ $# -gt 2 ]; then
duke@0 57 case "$1" in
duke@0 58 -sb)
duke@0 59 options="CFLAGS_BROWSE=-xsb"
duke@0 60 shift
duke@0 61 ;;
duke@0 62 -sbfast)
duke@0 63 options="CFLAGS_BROWSE=-xsbfast"
duke@0 64 shift
duke@0 65 ;;
duke@0 66 *)
duke@0 67 echo "Unknown option: '$1'" >&2
duke@0 68 usage
duke@0 69 ;;
duke@0 70 esac
duke@0 71 fi
duke@0 72
duke@0 73 # should be just two args left at this point
duke@0 74 if [ $# != 2 ]; then
duke@0 75 usage
duke@0 76 fi
duke@0 77
duke@0 78 # Just in case:
duke@0 79 case ${JAVA_HOME} in
duke@0 80 /*) true;;
duke@0 81 ?*) JAVA_HOME=`( cd $JAVA_HOME; pwd )`;;
duke@0 82 esac
duke@0 83
duke@0 84 if [ "${JAVA_HOME}" = "" -o ! -d "${JAVA_HOME}" -o ! -d ${JAVA_HOME}/jre/lib/`uname -p` ]; then
duke@0 85 echo "JAVA_HOME needs to be set to a valid JDK path"
duke@0 86 echo "ksh : export JAVA_HOME=/net/tetrasparc/export/gobi/JDK1.2_fcs_V/solaris"
duke@0 87 echo "csh : setenv JAVA_HOME /net/tetrasparc/export/gobi/JDK1.2_fcs_V/solaris"
duke@0 88 exit 1
duke@0 89 fi
duke@0 90
duke@0 91
duke@0 92 LD_LIBRARY_PATH=${JAVA_HOME}/jre/lib/`uname -p`:\
duke@0 93 ${JAVA_HOME}/jre/lib/`uname -p`/native_threads:${LD_LIBRARY_PATH-.}
duke@0 94
duke@0 95 # This is necessary as long as we are using the old launcher
duke@0 96 # with the new distribution format:
duke@0 97 CLASSPATH=${JAVA_HOME}/jre/lib/rt.jar:${CLASSPATH-.}
duke@0 98
duke@0 99
duke@0 100 for gm in gmake gnumake
duke@0 101 do
duke@0 102 if [ "${GNUMAKE-}" != "" ]; then break; fi
duke@0 103 ($gm --version >/dev/null) 2>/dev/null && GNUMAKE=$gm
duke@0 104 done
duke@0 105 : ${GNUMAKE:?'Cannot locate the gnumake program. Stop.'}
duke@0 106
duke@0 107
duke@0 108 echo "### ENVIRONMENT SETTINGS:"
duke@0 109 export JAVA_HOME ; echo "JAVA_HOME=$JAVA_HOME"
duke@0 110 export LD_LIBRARY_PATH ; echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
duke@0 111 export CLASSPATH ; echo "CLASSPATH=$CLASSPATH"
duke@0 112 export GNUMAKE ; echo "GNUMAKE=$GNUMAKE"
duke@0 113 echo "###"
duke@0 114
duke@0 115 config=$1
duke@0 116 ws_path=$2
duke@0 117
duke@0 118 case ${ws_path} in
duke@0 119 /*) true;;
duke@0 120 ?*) ws_path=`(cd ${ws_path}; pwd)`;;
duke@0 121 esac
duke@0 122
duke@0 123 echo \
kamg@91 124 ${GNUMAKE} -f ${ws_path}/make/solaris/Makefile \
duke@0 125 $config GAMMADIR=${ws_path} $options
kamg@91 126 ${GNUMAKE} -f ${ws_path}/make/solaris/Makefile \
duke@0 127 $config GAMMADIR=${ws_path} $options