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:
parent
77599d6d06
commit
a559f87af8
@ -3,7 +3,7 @@
|
|||||||
# parameters <haiku sourcedir> <buildtools dir> [ <haiku output dir> ]
|
# parameters <haiku sourcedir> <buildtools dir> [ <haiku output dir> ]
|
||||||
|
|
||||||
# get and check the parameters
|
# get and check the parameters
|
||||||
if [ $# \< 2 ]; then
|
if [ $# -lt 2 ]; then
|
||||||
echo Usage: $0 '<haiku sourcedir> <buildtools dir> [ <haiku output dir> ]' >&2
|
echo Usage: $0 '<haiku sourcedir> <buildtools dir> [ <haiku output dir> ]' >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -11,7 +11,7 @@ fi
|
|||||||
haikuSourceDir=$1
|
haikuSourceDir=$1
|
||||||
buildToolsDir=$2/legacy
|
buildToolsDir=$2/legacy
|
||||||
|
|
||||||
if [ $# \< 3 ]; then
|
if [ $# -lt 3 ]; then
|
||||||
haikuOutputDir=$haikuSourceDir/generated
|
haikuOutputDir=$haikuSourceDir/generated
|
||||||
else
|
else
|
||||||
haikuOutputDir=$3
|
haikuOutputDir=$3
|
||||||
@ -33,18 +33,18 @@ mkdir -p $haikuOutputDir || exit 1
|
|||||||
|
|
||||||
|
|
||||||
# get absolute paths
|
# get absolute paths
|
||||||
currentDir=$(pwd)
|
currentDir=`pwd`
|
||||||
|
|
||||||
cd $haikuSourceDir
|
cd $haikuSourceDir
|
||||||
haikuSourceDir=$(pwd)
|
haikuSourceDir=`pwd`
|
||||||
cd $currentDir
|
cd $currentDir
|
||||||
|
|
||||||
cd $buildToolsDir
|
cd $buildToolsDir
|
||||||
buildToolsDir=$(pwd)
|
buildToolsDir=`pwd`
|
||||||
cd $currentDir
|
cd $currentDir
|
||||||
|
|
||||||
cd $haikuOutputDir
|
cd $haikuOutputDir
|
||||||
haikuOutputDir=$(pwd)
|
haikuOutputDir=`pwd`
|
||||||
|
|
||||||
|
|
||||||
# create the object and installation directories for the cross compilation tools
|
# create the object and installation directories for the cross compilation tools
|
||||||
@ -80,10 +80,10 @@ copy_headers()
|
|||||||
sourceDir=$1
|
sourceDir=$1
|
||||||
targetDir=$2
|
targetDir=$2
|
||||||
|
|
||||||
headers="$(find $sourceDir -name \*\.h | grep -v /.svn)"
|
headers="`find $sourceDir -name \*\.h | grep -v /.svn`"
|
||||||
headers="$(echo $headers | sed -e s@$sourceDir/@@g)"
|
headers="`echo $headers | sed -e s@$sourceDir/@@g`"
|
||||||
for f in $headers; do
|
for f in $headers; do
|
||||||
headerTargetDir=$targetDir/$(dirname $f)
|
headerTargetDir=$targetDir/`dirname $f`
|
||||||
mkdir -p $headerTargetDir
|
mkdir -p $headerTargetDir
|
||||||
cp $sourceDir/$f $headerTargetDir
|
cp $sourceDir/$f $headerTargetDir
|
||||||
done
|
done
|
||||||
|
10
configure
vendored
10
configure
vendored
@ -187,9 +187,9 @@ get_build_tool_path()
|
|||||||
|
|
||||||
if [ -f "$path" ]; then
|
if [ -f "$path" ]; then
|
||||||
# get absolute path
|
# get absolute path
|
||||||
local oldPwd=$(pwd)
|
local oldPwd="`pwd`"
|
||||||
cd $(dirname "$path")
|
cd "`dirname "$path"`"
|
||||||
path="$(pwd)/$(basename "$path")"
|
path="`pwd`/`basename "$path"`"
|
||||||
cd $oldPwd
|
cd $oldPwd
|
||||||
else
|
else
|
||||||
which "$path" &> /dev/null || {
|
which "$path" &> /dev/null || {
|
||||||
@ -232,7 +232,8 @@ buildCrossTools=
|
|||||||
buildCrossToolsScript="$sourceDir/build/scripts/build_cross_tools"
|
buildCrossToolsScript="$sourceDir/build/scripts/build_cross_tools"
|
||||||
buildCrossToolsMachine=
|
buildCrossToolsMachine=
|
||||||
|
|
||||||
export haikuRequiredLegacyGCCVersion="2.95.3-haiku-080323"
|
haikuRequiredLegacyGCCVersion="2.95.3-haiku-080323"
|
||||||
|
export haikuRequiredLegacyGCCVersion
|
||||||
# version of legacy gcc required to build haiku
|
# version of legacy gcc required to build haiku
|
||||||
|
|
||||||
set_default_value HAIKU_AR ar
|
set_default_value HAIKU_AR ar
|
||||||
@ -304,6 +305,7 @@ case "${platform}" in
|
|||||||
FreeBSD) buildPlatform=freebsd ;;
|
FreeBSD) buildPlatform=freebsd ;;
|
||||||
Haiku) buildPlatform=haiku_host ;;
|
Haiku) buildPlatform=haiku_host ;;
|
||||||
Linux) buildPlatform=linux ;;
|
Linux) buildPlatform=linux ;;
|
||||||
|
SunOS) buildPlatform=sunos ;;
|
||||||
*) echo Unsupported platform: ${platform}
|
*) echo Unsupported platform: ${platform}
|
||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user