1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/make/bsd/build.sh Sun Sep 25 16:03:29 2011 -0700 1.3 @@ -0,0 +1,95 @@ 1.4 +#! /bin/sh 1.5 +# 1.6 +# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. 1.7 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 +# 1.9 +# This code is free software; you can redistribute it and/or modify it 1.10 +# under the terms of the GNU General Public License version 2 only, as 1.11 +# published by the Free Software Foundation. 1.12 +# 1.13 +# This code is distributed in the hope that it will be useful, but WITHOUT 1.14 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.15 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.16 +# version 2 for more details (a copy is included in the LICENSE file that 1.17 +# accompanied this code). 1.18 +# 1.19 +# You should have received a copy of the GNU General Public License version 1.20 +# 2 along with this work; if not, write to the Free Software Foundation, 1.21 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.22 +# 1.23 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.24 +# or visit www.oracle.com if you need additional information or have any 1.25 +# questions. 1.26 +# 1.27 +# 1.28 + 1.29 +# Make sure the variable JAVA_HOME is set before running this script. 1.30 + 1.31 +set -u 1.32 + 1.33 + 1.34 +if [ $# != 2 ]; then 1.35 + echo "Usage : $0 Build_Options Location" 1.36 + echo "Build Options : debug or optimized or basicdebug or basic or clean" 1.37 + echo "Location : specify any workspace which has gamma sources" 1.38 + exit 1 1.39 +fi 1.40 + 1.41 +# Just in case: 1.42 +case ${JAVA_HOME} in 1.43 +/*) true;; 1.44 +?*) JAVA_HOME=`( cd $JAVA_HOME; pwd )`;; 1.45 +esac 1.46 + 1.47 +case `uname -m` in 1.48 + i386|i486|i586|i686) 1.49 + mach=i386 1.50 + ;; 1.51 + *) 1.52 + echo "Unsupported machine: " `uname -m` 1.53 + exit 1 1.54 + ;; 1.55 +esac 1.56 + 1.57 +if [ "${JAVA_HOME}" = "" -o ! -d "${JAVA_HOME}" -o ! -d ${JAVA_HOME}/jre/lib/${mach} ]; then 1.58 + echo "JAVA_HOME needs to be set to a valid JDK path" 1.59 + echo "ksh : export JAVA_HOME=/net/tetrasparc/export/gobi/JDK1.2_fcs_V/bsd" 1.60 + echo "csh : setenv JAVA_HOME /net/tetrasparc/export/gobi/JDK1.2_fcs_V/bsd" 1.61 + exit 1 1.62 +fi 1.63 + 1.64 + 1.65 +LD_LIBRARY_PATH=${JAVA_HOME}/jre/lib/`uname -p`:\ 1.66 +${JAVA_HOME}/jre/lib/`uname -p`/native_threads:${LD_LIBRARY_PATH-.} 1.67 + 1.68 +# This is necessary as long as we are using the old launcher 1.69 +# with the new distribution format: 1.70 +CLASSPATH=${JAVA_HOME}/jre/lib/rt.jar:${CLASSPATH-.} 1.71 + 1.72 + 1.73 +for gm in gmake gnumake 1.74 +do 1.75 + if [ "${GNUMAKE-}" != "" ]; then break; fi 1.76 + ($gm --version >/dev/null) 2>/dev/null && GNUMAKE=$gm 1.77 +done 1.78 +: ${GNUMAKE:?'Cannot locate the gnumake program. Stop.'} 1.79 + 1.80 + 1.81 +echo "### ENVIRONMENT SETTINGS:" 1.82 +export JAVA_HOME ; echo "JAVA_HOME=$JAVA_HOME" 1.83 +export LD_LIBRARY_PATH ; echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" 1.84 +export CLASSPATH ; echo "CLASSPATH=$CLASSPATH" 1.85 +export GNUMAKE ; echo "GNUMAKE=$GNUMAKE" 1.86 +echo "###" 1.87 + 1.88 +Build_Options=$1 1.89 +Location=$2 1.90 + 1.91 +case ${Location} in 1.92 +/*) true;; 1.93 +?*) Location=`(cd ${Location}; pwd)`;; 1.94 +esac 1.95 + 1.96 +echo \ 1.97 +${GNUMAKE} -f ${Location}/make/bsd/Makefile $Build_Options GAMMADIR=${Location} 1.98 +${GNUMAKE} -f ${Location}/make/bsd/Makefile $Build_Options GAMMADIR=${Location}