Skip to content

Commit cd3d42f

Browse files
authored
Fix ROOT_DIR assignment to use lastword function
The cd command also prints the directory, leading to duplicated paths.
1 parent 99c79f0 commit cd3d42f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

makelib/common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ COMMON_SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
169169

170170
# the root directory of this repo
171171
ifeq ($(origin ROOT_DIR),undefined)
172-
ROOT_DIR := $(abspath $(shell cd $(COMMON_SELF_DIR)/../.. && pwd -P))
172+
ROOT_DIR := $(abspath $(lastword $(shell cd $(COMMON_SELF_DIR)/../.. && pwd -P)))
173173
endif
174174

175175
# the output directory which holds final build produced artifacts

0 commit comments

Comments
 (0)