diff options
author | Gilles Peskine <Gilles.Peskine@arm.com> | 2023-10-04 20:03:55 +0200 |
---|---|---|
committer | Dave Rodgman <dave.rodgman@arm.com> | 2023-10-13 12:25:18 +0100 |
commit | 9a32632577c9ea24f6c8f2e487e6b2ed8511dca4 (patch) | |
tree | 49a7bfdcec63a194fdf0916df16be69a0d6d06a4 /3rdparty | |
parent | 4b779bef9eec31859e16c11df507235d86aa8e28 (diff) | |
download | mbedtls-9a32632577c9ea24f6c8f2e487e6b2ed8511dca4.zip mbedtls-9a32632577c9ea24f6c8f2e487e6b2ed8511dca4.tar.gz mbedtls-9a32632577c9ea24f6c8f2e487e6b2ed8511dca4.tar.bz2 |
Fix 3rdparty/Makefile.inc when included recursively
3rdparty/Makefile.inc could only be used when included from the primary
makefile passed to make. It could not be used directly, or included from a
makefile that is itself included. This was due to counting from the left of
$(MAKEFILE_LIST) instead of using the last element.
Since each include directive appends to $(MAKEFILE_LIST), when using it to
determine $(THIRDPARTY_DIR), we need to use a simply-expanded variable.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Diffstat (limited to '3rdparty')
-rw-r--r-- | 3rdparty/Makefile.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/3rdparty/Makefile.inc b/3rdparty/Makefile.inc index 80dc126..70f316b 100644 --- a/3rdparty/Makefile.inc +++ b/3rdparty/Makefile.inc @@ -1,3 +1,3 @@ -THIRDPARTY_DIR = $(dir $(word 2, $(MAKEFILE_LIST))) +THIRDPARTY_DIR := $(dir $(lastword $(MAKEFILE_LIST))) include $(THIRDPARTY_DIR)/everest/Makefile.inc include $(THIRDPARTY_DIR)/p256-m/Makefile.inc |