From 11cf9ecb717e5231303f8526012cb486cd35dad2 Mon Sep 17 00:00:00 2001 From: Mateus Caruccio Date: Thu, 30 Oct 2025 17:35:01 +0000 Subject: [PATCH] Fix ROOT_DIR assignment to use lastword function The cd command also prints the directory, leading to duplicated paths. Signed-off-by: Mateus Caruccio --- makelib/common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makelib/common.mk b/makelib/common.mk index fb8e8b3..85c64ef 100644 --- a/makelib/common.mk +++ b/makelib/common.mk @@ -169,7 +169,7 @@ COMMON_SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST))) # the root directory of this repo ifeq ($(origin ROOT_DIR),undefined) -ROOT_DIR := $(abspath $(shell cd $(COMMON_SELF_DIR)/../.. && pwd -P)) +ROOT_DIR := $(abspath $(lastword $(shell cd $(COMMON_SELF_DIR)/../.. && pwd -P))) endif # the output directory which holds final build produced artifacts