diff --git a/Makefile.include b/Makefile.include index 12206d33bb..2467c29f97 100644 --- a/Makefile.include +++ b/Makefile.include @@ -25,6 +25,7 @@ include $(RIOT_MAKEFILES_GLOBAL_PRE) RIOTBASE ?= $(_riotbase) RIOTCPU ?= $(RIOTBASE)/cpu RIOTBOARD ?= $(RIOTBASE)/boards +BOARDSDIR ?= $(RIOTBOARD) RIOTMAKE ?= $(RIOTBASE)/makefiles RIOTPKG ?= $(RIOTBASE)/pkg RIOTTOOLS ?= $(RIOTBASE)/dist/tools @@ -81,6 +82,13 @@ override BINDIR := $(abspath $(BINDIR)) override PKGDIRBASE := $(abspath $(PKGDIRBASE)) override DLCACHE_DIR := $(abspath $(DLCACHE_DIR)) +# Keep standard make behavior for new variables +__DIRECTORY_VARIABLES += \ + BOARDSDIR \ + # + +BOARDSDIR := $(abspath $(BOARDSDIR)) + # Ensure that all directories are set and don't contain spaces. ifneq (, $(filter-out 1, $(foreach v,$(__DIRECTORY_VARIABLES),$(words $($(v)))))) $(info Aborting compilation for your safety.) diff --git a/makefiles/vars.inc.mk b/makefiles/vars.inc.mk index bc2732b496..4fcb7489e7 100644 --- a/makefiles/vars.inc.mk +++ b/makefiles/vars.inc.mk @@ -26,6 +26,7 @@ export APPDEPS # Files / Makefile targets that need to be created export RIOTBASE # The root folder of RIOT. The folder where this very file lives in. export RIOTCPU # For third party CPUs this folder is the base of the CPUs. export RIOTBOARD # For third party BOARDs this folder is the base of the BOARDs. +export BOARDSDIR # For third party BOARDs this folder is the base of the BOARDs. (Migration in progress) export RIOTPKG # For overriding RIOT's pkg directory export RIOTTOOLS # Location of host machine tools export RIOTPROJECT # Top level git root of the project being built, or PWD if not a git repository