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
This commit is contained in:
François Revol 2008-04-12 02:40:10 +00:00
parent 77599d6d06
commit a559f87af8
2 changed files with 15 additions and 13 deletions

View File

@ -3,7 +3,7 @@
# parameters <haiku sourcedir> <buildtools dir> [ <haiku output dir> ]
# get and check the parameters
if [ $# \< 2 ]; then
if [ $# -lt 2 ]; then
echo Usage: $0 '<haiku sourcedir> <buildtools dir> [ <haiku output dir> ]' >&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

10
configure vendored
View File

@ -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