From 378b85bfd050ab8d462cecfcc89a19c9b07c5ce7 Mon Sep 17 00:00:00 2001
From: Martin Lenders <mail@martin-lenders.de>
Date: Wed, 12 Feb 2014 13:09:30 +0100
Subject: [PATCH] Always use absolute paths with configurable paths variables

---
 Makefile.include | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/Makefile.include b/Makefile.include
index 3209ca8c80..4c063a324f 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -1,11 +1,12 @@
 # set undefined variables
-ifeq ($(strip $(RIOTCPU)),)
-	export RIOTCPU =$(RIOTBASE)/cpu
-endif
+RIOTBASE ?= $(shell dirname "$(lastword $(MAKEFILE_LIST))")
+export RIOTBASE := $(abspath $(RIOTBASE))
 
-ifeq ($(strip $(RIOTBOARD)),)
-	export RIOTBOARD =$(RIOTBASE)/boards
-endif
+RIOTCPU ?= $(RIOTBASE)/cpu
+export RIOTCPU := $(abspath $(RIOTCPU))
+
+RIOTBOARD ?= $(RIOTBASE)/boards
+export RIOTBOARD := $(abspath $(RIOTBOARD))
 
 ifeq ($(strip $(MCU)),)
 	MCU = $(CPU)
-- 
GitLab