Makefile: bugfix for handling platform paths
PATCH 1/1 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.
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -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 dirname $(shell realpath $(platform_dir_path))) endif else platform_parent_dir=$(src_dir)/platform
Signature · 1 line
2.34.1
PATCH 1/1 Makefile: bugfix for handling platform paths
? 2022-11-22???? 12:28 +0200?Alejandro Cabrera Aldaya???
Quoted 15 lines
If the path where this repo is located contains the platform name on it, the original
Makefilereplaced 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 <[email protected]>---
?Makefile | 2 +-
?1 file changed, 1 insertion(+), 1 deletion(-)Makefile +0
-0@@ -47,7 +47,7 @@ ifdef PLATFORM_DIR ???? platform_parent_dir=$(platform_dir_path)
Quoted 5 lines
?? else
???? PLATFORM=$(shell basename $(platform_dir_path))
-??? platform_parent_dir=$(subst $(PLATFORM),,$(platform_dir_path)) +??? platform_parent_dir=$(shell dirname $(shell realpath $(platform_dir_path)))???
Looks good, could simplify it a bit.
platform_parent_dir=$(shell realpath ${platform_dir_path}/..)Quoted 7 lines
?? endif
?else
? platform_parent_dir=$(src_dir)/platformSignature · 1 line
2.34.1
PATCH 1/1 Makefile: bugfix for handling platform paths
Quoted 23 lines · Xiang W
? 2022-11-22???? 12:28 +0200?Alejandro Cabrera Aldaya???
Quoted 15 lines
If the path where this repo is located contains the platform name on it, the original
Makefilereplaced 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 <[email protected]>---
?Makefile | 2 +-
?1 file changed, 1 insertion(+), 1 deletion(-)Makefile +0
-0@@ -47,7 +47,7 @@ ifdef PLATFORM_DIR ???? platform_parent_dir=$(platform_dir_path)Quoted 5 lines
?? else
???? PLATFORM=$(shell basename $(platform_dir_path))
-??? platform_parent_dir=$(subst $(PLATFORM),,$(platform_dir_path)) +??? platform_parent_dir=$(shell dirname $(shell realpath $(platform_dir_path)))???Looks good, could simplify it a bit.
Quoted 1 line
platform_parent_dir=$(shell realpath ${platform_dir_path}/..)I like this simplified version better.
Thanks,
drew
Quoted 17 lines
Reviewed-by Xiang W <[email protected]>Quoted 7 lines
?? endif
?else
? platform_parent_dir=$(src_dir)/platformSignature · 1 line
2.34.1Signature · 3 lines
opensbi mailing list opensbi at lists.infradead.org http://lists.infradead.org/mailman/listinfo/opensbi
Anup Patel
AppliedPATCH 1/1 Makefile: bugfix for handling platform paths
In reply to Xiang WQuoted 24 lines · Xiang W
? 2022-11-22???? 12:28 +0200?Alejandro Cabrera Aldaya???
Quoted 14 lines
If the path where this repo is located contains the platform name on it, the original
Makefilereplaced 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 <[email protected]>--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Makefile +0
-0Makefile ifdef PLATFORM_DIR · line 51
Quoted 6 lines
Makefile +1
-1@@ -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 dirname $(shell realpath $(platform_dir_path)))Looks good, could simplify it a bit.
Quoted 3 lines
platform_parent_dir=$(shell realpath ${platform_dir_path}/..)Reviewed-by Xiang W <[email protected]>
I have considered the simplified version at the time of merging this patch.
Applied this patch to the riscv/opensbi repo.
Thanks,
Anup
Quoted 15 lines
Quoted 8 lines
Makefile +0
-0endif elseplatform_parent_dir=$(src_dir)/platform
--
2.34.1--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi