From 05bbc9208a755c332580136a32d8f89db2ecbc19 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 9 Jun 2015 12:21:42 -0700 Subject: buildgcc: Don't use BUILDDIRPREFIX Change-Id: I7be9b39a0d92882fa437f666d7f4a85e6f0a23f6 Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/10489 Tested-by: build bot (Jenkins) Reviewed-by: Alexander Couzens --- util/crossgcc/buildgcc | 21 ++++++++++----------- 1 file 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 -- cgit v1.2.3