aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@arm.com>2020-07-30 08:50:10 +0100
committerManish Pandey <manish.pandey2@arm.com>2020-08-04 18:02:02 +0100
commit29214e95c444b53f544b97127b3e70583d356bee (patch)
tree6f247daa8612a8b5519f923ce4219255589846fb /Makefile
parentcf44cb2c65e7472153a9e5bb2d3cbe0d08cdd3d3 (diff)
downloadtrusted-firmware-a-29214e95c444b53f544b97127b3e70583d356bee.tar.gz
Use abspath to dereference $BUILD_BASE
If the user tries to change BUILD_BASE to put the build products outside the build tree the compile will fail due to hard coded assumptions that $BUILD_BASE is a relative path. Fix by using $(abspath $(BUILD_BASE)) to rationalize to an absolute path every time and remove the relative path assumptions. This patch also adds documentation that BUILD_BASE can be specified by the user. Signed-off-by: Grant Likely <grant.likely@arm.com> Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ib1af874de658484aaffc672f30029b852d2489c8
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index fa711e26a6..6e14bdc3b4 100644
--- a/Makefile
+++ b/Makefile
@@ -451,8 +451,10 @@ include common/backtrace/backtrace.mk
include ${MAKE_HELPERS_DIRECTORY}plat_helpers.mk
-BUILD_BASE := ./build
-BUILD_PLAT := ${BUILD_BASE}/${PLAT}/${BUILD_TYPE}
+ifeq (${BUILD_BASE},)
+ BUILD_BASE := ./build
+endif
+BUILD_PLAT := $(abspath ${BUILD_BASE})/${PLAT}/${BUILD_TYPE}
SPDS := $(sort $(filter-out none, $(patsubst services/spd/%,%,$(wildcard services/spd/*))))