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