From e4bded931531b7d713c073e8ed4e6ee463506662 Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Sat, 30 Apr 2022 21:48:51 +0000 Subject: [PATCH] makefile_helper: only source necessary values from buildsystem's config Signed-off-by: Ian Leonard --- scripts/makefile_helper | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/makefile_helper b/scripts/makefile_helper index 9184efffda..1cfbe06fee 100755 --- a/scripts/makefile_helper +++ b/scripts/makefile_helper @@ -6,13 +6,16 @@ set -e # If config/options can't be sourced, abort. PWD isn't the expected ROOT. -. config/options "" +# Only source from config/options what will be used +BUILD_ROOT=$(PROJECT= DEVICE= ARCH= . config/options "" && echo "${BUILD_ROOT}") +BUILD_BASE=$(PROJECT= DEVICE= ARCH= . config/options "" && echo "${BUILD_BASE}") if [ -z "${BUILD_BASE}" -o -z "${BUILD_ROOT}" ]; then # make sure variables are set before running an rm echo "error: ${0}: both BUILD_BASE and BUILD_ROOT must be set when running \"[clean|distclean]\"; aborting" exit 1 fi + # task handling case $1 in --clean)