diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2015-06-09 12:21:42 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2015-06-10 06:05:17 +0200 |
commit | 05bbc9208a755c332580136a32d8f89db2ecbc19 (patch) | |
tree | f06aa455deae37b4d4bb708fcd8bb13f8be68f2b | |
parent | 1c70e052aa7d4a177549ddc07e572b4699f3e4ce (diff) | |
download | coreboot-05bbc9208a755c332580136a32d8f89db2ecbc19.tar.xz |
buildgcc: Don't use BUILDDIRPREFIX
Change-Id: I7be9b39a0d92882fa437f666d7f4a85e6f0a23f6
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10489
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
-rwxr-xr-x | util/crossgcc/buildgcc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 1b49cc8be1..ca2e089fd9 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -242,27 +242,29 @@ fn_exists() build() { package=$1 - version="$(eval echo \$$package"_VERSION")" fn_exists build_$package || return - mkdir -p ${BUILDDIRPREFIX}-$package + version="$(eval echo \$$package"_VERSION")" + BUILDDIR=build-${TARGETARCH}-$package + + mkdir -p ${BUILDDIR} [[ "$PACKAGES" == *$package* ]] && \ - if [ -f ${BUILDDIRPREFIX}-$package/.success ]; then + if [ -f ${BUILDDIR}/.success ]; then printf "Skipping $package as it is already built\n" else printf "Building $package $version ... " DIR=$PWD - cd ${BUILDDIRPREFIX}-$package + cd ${BUILDDIR} rm -f .failed build_${package} > build.log 2>&1 - cd $DIR/${BUILDDIRPREFIX}-$package + cd $DIR/${BUILDDIR} if [ ! -f .failed ]; then touch .success; fi cd .. - if [ -r "${BUILDDIRPREFIX}-$package/.failed" ]; then - printf "${RED}failed${NC}. Check ${BUILDDIRPREFIX}-$package/build.log.\n" + if [ -r "${BUILDDIR}/.failed" ]; then + printf "${RED}failed${NC}. Check ${BUILDDIR}/build.log.\n" exit 1 fi printf "${green}ok${NC}\n" @@ -273,7 +275,7 @@ cleanup() { printf "Cleaning up temporary files... " for package in $PACKAGES; do - rm -rf ${BUILDDIRPREFIX}-$package $(eval echo \$$package"_DIR") + rm -rf build-${TARGETARCH}-$package $(eval echo \$$package"_DIR") done printf "${green}ok${NC}\n" } @@ -537,9 +539,6 @@ NAME=clang PACKAGES="LLVM CFE CRT CTE" fi -BUILDDIRPREFIX=build-${TARGETARCH} -BUILDDIR=$PWD/build-clang - if [ "$clean" = "1" ]; then cleanup fi |