From: Alejandro Cabrera Aldaya Date: Tue, 22 Nov 2022 10:28:25 +0000 (+0200) Subject: Makefile: bugfix for handling platform paths X-Git-Tag: v1.3~196 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49b0e355e6586dbb55bc8bb4d3b073f3e692d765;p=platform%2Fkernel%2Fopensbi-spacemit.git Makefile: bugfix for handling platform paths If the path where this repo is located contains the platform name on it, the original Makefile replaced its occurrences from the path making it an invalid path. This commit prevents this behavior replacing only the last part of the path as intended. Signed-off-by: Alejandro Cabrera Aldaya Reviewed-by: Xiang W Reviewed-by: Andrew Jones Reviewed-by: Anup Patel --- diff --git a/Makefile b/Makefile index 98e42fc..92203c5 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ ifdef PLATFORM_DIR platform_parent_dir=$(platform_dir_path) else PLATFORM=$(shell basename $(platform_dir_path)) - platform_parent_dir=$(subst $(PLATFORM),,$(platform_dir_path)) + platform_parent_dir=$(shell realpath ${platform_dir_path}/..) endif else platform_parent_dir=$(src_dir)/platform