Просмотр исходного кода

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 <aldaya@gmail.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Alejandro Cabrera Aldaya 1 год назад
Родитель
Сommit
49b0e355e6
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Makefile

+ 1 - 1
Makefile

@@ -47,7 +47,7 @@ ifdef PLATFORM_DIR
     platform_parent_dir=$(platform_dir_path)
     platform_parent_dir=$(platform_dir_path)
   else
   else
     PLATFORM=$(shell basename $(platform_dir_path))
     PLATFORM=$(shell basename $(platform_dir_path))
-    platform_parent_dir=$(subst $(PLATFORM),,$(platform_dir_path))
+    platform_parent_dir=$(shell realpath ${platform_dir_path}/..)
   endif
   endif
 else
 else
  platform_parent_dir=$(src_dir)/platform
  platform_parent_dir=$(src_dir)/platform