diff --git a/Makefile.inc b/Makefile.inc index 63d63e6c9b0..14be82f8534 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -26,7 +26,7 @@ endif SOURCE_DIR ?= $(PROJECT_BASE)/src/ # Kbuild doesn't work correctly if this is an absolute path -override SOURCE_DIR := $(shell python -c "import os.path; print(\"%s\" % os.path.relpath('$(SOURCE_DIR)', '$(ZEPHYR_BASE)'))")/ +override SOURCE_DIR := $(shell python -c "import os.path; print(\"%s\" % os.path.relpath(os.path.realpath('$(SOURCE_DIR)'), os.path.realpath('$(ZEPHYR_BASE)')))")/ export SOURCE_DIR CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \