Mercurial > hg > aboriginal
diff build.sh @ 984:9840847885e8
Add export_if_blank and make lots of build paths overrideable.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 24 Feb 2010 10:08:38 -0600 |
parents | fc134a13357e |
children | bbcafba8a594 |
line wrap: on
line diff
--- a/build.sh Sun Feb 21 17:07:55 2010 -0600 +++ b/build.sh Wed Feb 24 10:08:38 2010 -0600 @@ -12,12 +12,14 @@ fi ARCH="$1" +[ -z "$BUILD" ] && BUILD="build" + # A function to skip stages that have already been done (because the # tarball they create is already there). not_already() { - if [ -f "build/$1-$ARCH.tar.bz2" ] + if [ -f "$BUILD/$1-$ARCH.tar.bz2" ] then echo "=== Skipping $1-$ARCH (already there)" return 1 @@ -44,7 +46,7 @@ then # If we need to build cross compiler, assume root filesystem is stale. - rm -rf "build/root-filesystem-$ARCH.tar.bz2" + rm -rf "$BUILD/root-filesystem-$ARCH.tar.bz2" time ./simple-cross-compiler.sh "$ARCH" || exit 1 fi @@ -74,7 +76,7 @@ if not_already native-compiler && [ -z "$NO_NATIVE_COMPILER" ] then - rm -rf "build/root-filesystem-$ARCH.tar.bz2" + rm -rf "$BUILD/root-filesystem-$ARCH.tar.bz2" BUILD_STATIC={$BUILD_STATIC:-1} ./native-compiler.sh "$ARCH" || exit 1 fi @@ -86,7 +88,7 @@ # If we need to build root filesystem, assume system image is stale. - rm -rf "build/system-image-$ARCH.tar.bz2" + rm -rf "$BUILD/system-image-$ARCH.tar.bz2" time ./root-filesystem.sh "$ARCH" || exit 1 fi