From b62b810620a758bb3016f4c94c152138518ef277 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Fri, 10 Jun 2016 14:15:05 -0400 Subject: [PATCH] Revert "build: Do not depend on python while creating the relative path" This patch while it fixes a few bugs, introduces other issues, espcially when building on windows. This reverts commit ae327c60c96e4d5e1f88b8ec86e79de20f72a6fd. Change-Id: I1ffcd6c88d17f5bd6a66df28d99d2d27c0683930 Signed-off-by: Anas Nashif --- Makefile.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index f075d18f2fc..729cfd65b88 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -39,9 +39,9 @@ $(error BOARD is not defined!) endif SOURCE_DIR ?= $(PROJECT_BASE)/src/ -override SOURCE_DIR := $(abspath $(SOURCE_DIR)) -# Kbuild doesn't work correctly if SOURCE_DIR is an absolute path -override SOURCE_DIR := $(subst $(ZEPHYR_BASE),.,$(SOURCE_DIR))/ +# Kbuild doesn't work correctly if this is an absolute path +# FIXME Do not depend on python +override SOURCE_DIR := $(shell python -c "import os.path; print(\"%s\" % os.path.relpath(os.path.realpath('$(SOURCE_DIR)'), os.path.realpath('$(ZEPHYR_BASE)')))")/ override SOURCE_DIR := $(subst \,/,$(SOURCE_DIR)) export SOURCE_DIR