diff --git a/Makefile.include b/Makefile.include
index 351406751dc00019debe6ff0f237a214dc70ea1a..5c815483dea3cbffeea2557fea3943232e967fa2 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -1,3 +1,6 @@
+# 'Makefile.include' directory, must be evaluated before other 'include'
+_riotbase := $(dir $(lastword $(MAKEFILE_LIST)))
+
 # Globally set default goal to `all`
 .DEFAULT_GOAL := all
 
@@ -5,7 +8,7 @@
 -include Makefile.local
 
 # set undefined variables
-RIOTBASE       ?= $(dir $(lastword $(MAKEFILE_LIST)))
+RIOTBASE       ?= $(_riotbase)
 CCACHE_BASEDIR ?= $(RIOTBASE)
 RIOTCPU        ?= $(RIOTBASE)/cpu
 RIOTBOARD      ?= $(RIOTBASE)/boards