Mercurial > hg > aboriginal
diff root-filesystem.sh @ 941:7dd3fb4dd333
Minor cleanups and comments, introduce check_prerequisite function.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 22 Dec 2009 11:51:52 -0600 |
parents | f2b4d7297c9d |
children | fc134a13357e |
line wrap: on
line diff
--- a/root-filesystem.sh Sun Dec 20 19:56:21 2009 -0600 +++ b/root-filesystem.sh Tue Dec 22 11:51:52 2009 -0600 @@ -2,33 +2,16 @@ # Build a root filesystem for a given target. -# Get lots of predefined environment variables and shell functions. - source sources/include.sh || exit 1 - -# Parse the sources/targets/$1 directory - read_arch_dir "$1" - -# If this target has a base architecture that's already been built, use that. - check_for_base_arch || exit 0 +check_prerequisite "${ARCH}-cc" +check_prerequisite "${FROM_ARCH}-cc" # Announce start of stage. echo "=== Building $STAGE_NAME" -# Die if our prerequisite isn't there. - -for i in "$ARCH" "$FROM_ARCH" -do - if [ -z "$(which "${i}-cc")" ] - then - [ -z "$FAIL_QUIET" ] && echo No "${i}-cc" in '$PATH'. >&2 - exit 1 - fi -done - # Determine which directory layout we're using if [ -z "$ROOT_NODIRS" ] @@ -57,7 +40,7 @@ # and example source code. rm -rf "$ROOT_TOPDIR"/include && - rm -rf "$ROOT_TOPDIR"/lib/*.a && + rm -rf "$ROOT_TOPDIR"/lib/*.[ao] && rm -rf "$ROOT_TOPDIR/src" || dienow elif [ "$NATIVE_TOOLCHAIN" == "headers" ]