summaryrefslogtreecommitdiff
path: root/util/crossgcc
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2013-12-19 22:06:22 +0100
committerJonathan A. Kollasch <jakllsch@kollasch.net>2013-12-22 04:53:12 +0100
commit44af57a78bcb478f70f3047fcf950424f8e8e01c (patch)
tree4fc5e44dea41f4834e64575903e5120e6a97e8d1 /util/crossgcc
parent9d1d7409686465f51bf6d940fc17f595e8d51f0e (diff)
buildgcc: defer cleaning up the tree a bit
cleanup() uses BUILDDIRPREFIX, which is set after the getopt loop. Change-Id: I8a904781ee4fefc42681d31e94b64008cf03750a Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/4544 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Diffstat (limited to 'util/crossgcc')
-rwxr-xr-xutil/crossgcc/buildgcc6
1 files changed, 5 insertions, 1 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 5d7ac6f49f..87054f2b07 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -208,7 +208,7 @@ while true ; do
case "$1" in
-V|--version) shift; myversion; exit 0;;
-h|--help) shift; myhelp; exit 0;;
- -c|--clean) shift; cleanup;;
+ -c|--clean) shift; clean=1;;
-t|--savetemps) shift; SAVETEMPS=1;;
-d|--directory) shift; TARGETDIR="$1"; shift;;
-p|--platform) shift; TARGETARCH="$1"; shift;;
@@ -235,6 +235,10 @@ esac
echo "Target arch is now $TARGETARCH"
BUILDDIRPREFIX=build-${TARGETARCH}
+if [ "$clean" = "1" ]; then
+ cleanup
+fi
+
GDB_PACKAGE="GDB"
PYTHON_PACKAGE="PYTHON"
EXPAT_PACKAGE="EXPAT"