Makefile.include: introduce 'BOARDSDIR' for boards directory

Introduce a new variable 'BOARDSDIR' to use when referencing the base
boards directory.

This is a transition to allow defining external boards while still using
the `RIOT/boards` directory for like `boards/common` for example through
'RIOTBOARD'.
This commit is contained in:
Gaëtan Harter 2019-09-09 16:55:55 +02:00 committed by Alexandre Abadie
parent fc84c90f66
commit f76a2d201e
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 9 additions and 0 deletions

View File

@ -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.)

View File

@ -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