From a559f87af8af727bf3ec7d61f0aa5d986b29d659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 12 Apr 2008 02:40:10 +0000 Subject: [PATCH] Remove use of bashisms since we use #!/bin/sh. This should help supporting solaris. Added sunos to the list of platforms, but it needs more work. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24922 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/scripts/build_cross_tools | 18 +++++++++--------- configure | 10 ++++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/build/scripts/build_cross_tools b/build/scripts/build_cross_tools index f8bccceea5..cb12a34d4d 100755 --- a/build/scripts/build_cross_tools +++ b/build/scripts/build_cross_tools @@ -3,7 +3,7 @@ # parameters [ ] # get and check the parameters -if [ $# \< 2 ]; then +if [ $# -lt 2 ]; then echo Usage: $0 ' [ ]' >&2 exit 1 fi @@ -11,7 +11,7 @@ fi haikuSourceDir=$1 buildToolsDir=$2/legacy -if [ $# \< 3 ]; then +if [ $# -lt 3 ]; then haikuOutputDir=$haikuSourceDir/generated else haikuOutputDir=$3 @@ -33,18 +33,18 @@ mkdir -p $haikuOutputDir || exit 1 # get absolute paths -currentDir=$(pwd) +currentDir=`pwd` cd $haikuSourceDir -haikuSourceDir=$(pwd) +haikuSourceDir=`pwd` cd $currentDir cd $buildToolsDir -buildToolsDir=$(pwd) +buildToolsDir=`pwd` cd $currentDir cd $haikuOutputDir -haikuOutputDir=$(pwd) +haikuOutputDir=`pwd` # create the object and installation directories for the cross compilation tools @@ -80,10 +80,10 @@ copy_headers() sourceDir=$1 targetDir=$2 - headers="$(find $sourceDir -name \*\.h | grep -v /.svn)" - headers="$(echo $headers | sed -e s@$sourceDir/@@g)" + headers="`find $sourceDir -name \*\.h | grep -v /.svn`" + headers="`echo $headers | sed -e s@$sourceDir/@@g`" for f in $headers; do - headerTargetDir=$targetDir/$(dirname $f) + headerTargetDir=$targetDir/`dirname $f` mkdir -p $headerTargetDir cp $sourceDir/$f $headerTargetDir done diff --git a/configure b/configure index 40712f3fbe..a631f6d857 100755 --- a/configure +++ b/configure @@ -187,9 +187,9 @@ get_build_tool_path() if [ -f "$path" ]; then # get absolute path - local oldPwd=$(pwd) - cd $(dirname "$path") - path="$(pwd)/$(basename "$path")" + local oldPwd="`pwd`" + cd "`dirname "$path"`" + path="`pwd`/`basename "$path"`" cd $oldPwd else which "$path" &> /dev/null || { @@ -232,7 +232,8 @@ buildCrossTools= buildCrossToolsScript="$sourceDir/build/scripts/build_cross_tools" buildCrossToolsMachine= -export haikuRequiredLegacyGCCVersion="2.95.3-haiku-080323" +haikuRequiredLegacyGCCVersion="2.95.3-haiku-080323" +export haikuRequiredLegacyGCCVersion # version of legacy gcc required to build haiku set_default_value HAIKU_AR ar @@ -304,6 +305,7 @@ case "${platform}" in FreeBSD) buildPlatform=freebsd ;; Haiku) buildPlatform=haiku_host ;; Linux) buildPlatform=linux ;; + SunOS) buildPlatform=sunos ;; *) echo Unsupported platform: ${platform} exit 1 ;; esac