From 22bdca4e4b0eb33b4093a2d4a172a16170a167cf Mon Sep 17 00:00:00 2001 From: meep-eep Date: Fri, 1 Oct 2004 05:49:10 +0000 Subject: [PATCH] Changes for SunOS compatibility. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1412 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/build.sh | 12 ++++++++++-- sc2/build/unix/build.config | 2 +- sc2/build/unix/build.sh | 2 +- sc2/build/unix/config_functions | 10 ---------- sc2/build/unix/config_proginfo | 2 +- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/sc2/build.sh b/sc2/build.sh index 63501f985..51d2f1cab 100755 --- a/sc2/build.sh +++ b/sc2/build.sh @@ -19,8 +19,16 @@ # You can start this program as 'SH="/bin/sh -x" ./build.sh' to # enable command tracing. -SH="${SH:-/bin/sh}" -export SH +if [ -z "$SH" ]; then + if [ `uname -s` = SunOS ]; then + # /bin/sh of Solaris is incompatible. Fortunately, Sun ships + # a decent sh in /usr/xpg4/bin/ nowadays. + SH=/usr/xpg4/bin/sh + else + SH=/bin/sh + fi + export SH +fi $SH build/unix/build.sh "$@" diff --git a/sc2/build/unix/build.config b/sc2/build/unix/build.config index 8e41047ef..be61af105 100644 --- a/sc2/build/unix/build.config +++ b/sc2/build/unix/build.config @@ -1,4 +1,4 @@ -#!/bin/sh +# This file is sourced by build.sh # Include build functions used here . build/unix/config_functions diff --git a/sc2/build/unix/build.sh b/sc2/build/unix/build.sh index eede70f25..96e49f922 100644 --- a/sc2/build/unix/build.sh +++ b/sc2/build/unix/build.sh @@ -29,7 +29,7 @@ fi # Read in the config settings that affect the build, if present. # Don't reread for every dir when recursing. -if [ -e "$BUILD_WORK/build.vars" -a -z "$BUILD_COMMAND" ]; then +if [ -r "$BUILD_WORK/build.vars" -a -z "$BUILD_COMMAND" ]; then . "$BUILD_WORK/build.vars" fi diff --git a/sc2/build/unix/config_functions b/sc2/build/unix/config_functions index cebf273a4..c3c15ff03 100644 --- a/sc2/build/unix/config_functions +++ b/sc2/build/unix/config_functions @@ -79,16 +79,6 @@ EOF fi } -# Description: Output a message to stderr, unless BUILD_SILENT is set -# Arguments: the message -build_message() { - if [ -z "$BUILD_SILENT" ]; then - cat >&2 << EOF -$@ -EOF - fi -} - # Description: check if a string is lexicographically before # another string # Arguments: $1 - the first string diff --git a/sc2/build/unix/config_proginfo b/sc2/build/unix/config_proginfo index ffae45097..05fb7a20c 100644 --- a/sc2/build/unix/config_proginfo +++ b/sc2/build/unix/config_proginfo @@ -30,7 +30,7 @@ PROG_sed_VERSION='' PROG_make_NAME="Make" case "$OSNAME" in - FreeBSD|OpenBSD) + FreeBSD|OpenBSD|SunOS) PROG_make_FILE="gmake" ;; *)