Commit 4e96f934 authored by Ben Avison's avatar Ben Avison
Browse files

Tweak to cross-compilation scripts

Detail:
  Now uses environment variable RISCOS to point to root of source tree.
  This makes it easier to keep the two forks of each script in line when cloning the file for a component at a different directory depth, and also allows it to be overridden from the command line.
parent f49941d2
...@@ -7,12 +7,13 @@ TARGET=all ...@@ -7,12 +7,13 @@ TARGET=all
[[ "$1" =~ (all|install|debug|clean|links) ]] && TARGET=$1 && shift [[ "$1" =~ (all|install|debug|clean|links) ]] && TARGET=$1 && shift
[ -z "$1" ] || BUILD=$1 && shift [ -z "$1" ] || BUILD=$1 && shift
[ -n "$BUILD" ] || BUILD=ROOL/CTools [ -n "$BUILD" ] || BUILD=ROOL/CTools
[ -n "$RISCOS" ] || RISCOS=../../../../..
cd $(dirname $0) cd $(dirname $0)
# Two ways of doing the same thing # Two ways of doing the same thing
if [ -n "$BUILDUSINGSUBSHELL" ]; then if [ -n "$BUILDUSINGSUBSHELL" ]; then
HERE=`pwd` HERE=`pwd`
cd ../../../../.. cd $RISCOS
if [ $TARGET == "install" ]; then if [ $TARGET == "install" ]; then
Env/$BUILD.sh "cd $HERE && make install COMPONENT=squeeze INSTTYPE=tool INSTDIR=$INSTALLDIR/Library -I\$MAKEFILEDIR --no-print-directory" Env/$BUILD.sh "cd $HERE && make install COMPONENT=squeeze INSTTYPE=tool INSTDIR=$INSTALLDIR/Library -I\$MAKEFILEDIR --no-print-directory"
Env/$BUILD.sh "cd $HERE && make install COMPONENT=squeeze INSTTYPE=app INSTDIR=$INSTALLDIR/Tools/Tools -I\$MAKEFILEDIR --no-print-directory" Env/$BUILD.sh "cd $HERE && make install COMPONENT=squeeze INSTTYPE=app INSTDIR=$INSTALLDIR/Tools/Tools -I\$MAKEFILEDIR --no-print-directory"
...@@ -20,7 +21,7 @@ if [ -n "$BUILDUSINGSUBSHELL" ]; then ...@@ -20,7 +21,7 @@ if [ -n "$BUILDUSINGSUBSHELL" ]; then
Env/$BUILD.sh "cd $HERE && make $TARGET COMPONENT=squeeze -I\$MAKEFILEDIR --no-print-directory" Env/$BUILD.sh "cd $HERE && make $TARGET COMPONENT=squeeze -I\$MAKEFILEDIR --no-print-directory"
fi fi
else else
pushd ../../../../.. > /dev/null pushd $RISCOS > /dev/null
source Env/$BUILD.sh source Env/$BUILD.sh
popd > /dev/null popd > /dev/null
if [ $TARGET == "install" ]; then if [ $TARGET == "install" ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment