From 90692ac92bcdaf2fddb71777ee41caf9be99af1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Mon, 9 Sep 2019 17:00:59 +0200 Subject: [PATCH] makefiles: use 'BOARDSDIR' for the boards directory in compilation Replace uses of 'RIOTBOARD' by 'BOARDSDIR' during the compilation. --- Makefile.dep | 2 +- Makefile.features | 6 +++++- Makefile.include | 6 +++--- makefiles/application.inc.mk | 2 +- makefiles/boards.inc.mk | 6 +++--- makefiles/info.inc.mk | 1 + makefiles/scan-build.inc.mk | 1 + 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Makefile.dep b/Makefile.dep index 0c54aeb7fc..a89a5d2547 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -6,7 +6,7 @@ OLD_USEPKG := $(sort $(USEPKG)) -include $(APPDIR)/Makefile.board.dep # include board dependencies --include $(RIOTBOARD)/$(BOARD)/Makefile.dep +-include $(BOARDSDIR)/$(BOARD)/Makefile.dep # include cpu dependencies -include $(RIOTCPU)/$(CPU)/Makefile.dep diff --git a/Makefile.features b/Makefile.features index 64831850a7..536eeb90bd 100644 --- a/Makefile.features +++ b/Makefile.features @@ -5,7 +5,11 @@ # This makes them available when setting features based on CPU_MODEL in the cpu # Makefile.features and also during dependency resolution. -include $(RIOTBOARD)/$(BOARD)/Makefile.features +# Transition: +# Moving 'CPU/CPU_MODEL' to Makefile.features is an ongoing work and may not +# reflect the state of all boards for the moment. + +include $(BOARDSDIR)/$(BOARD)/Makefile.features # Sanity check ifeq (,$(CPU)) diff --git a/Makefile.include b/Makefile.include index 2467c29f97..b2a269c2ef 100644 --- a/Makefile.include +++ b/Makefile.include @@ -259,7 +259,7 @@ LAZYSPONGE_FLAGS ?= $(if $(filter 1,$(QUIET)),,--verbose) ifeq (, $(APPLICATION)) $(error An application name must be specified as APPLICATION.) endif -ifneq (0,$(shell test -d $(RIOTBOARD)/$(BOARD); echo $$?)) +ifneq (0,$(shell test -d $(BOARDSDIR)/$(BOARD); echo $$?)) $(error The specified board $(BOARD) does not exist.) endif @@ -317,8 +317,8 @@ include $(RIOTMAKE)/pseudomodules.inc.mk include $(RIOTMAKE)/defaultmodules.inc.mk # Include Board and CPU configuration -INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/$(BOARD)/include)) -include $(RIOTBOARD)/$(BOARD)/Makefile.include +INCLUDES += $(addprefix -I,$(wildcard $(BOARDSDIR)/$(BOARD)/include)) +include $(BOARDSDIR)/$(BOARD)/Makefile.include INCLUDES += -I$(RIOTCPU)/$(CPU)/include include $(RIOTCPU)/$(CPU)/Makefile.include diff --git a/makefiles/application.inc.mk b/makefiles/application.inc.mk index e34ad39f2f..0d750371c4 100644 --- a/makefiles/application.inc.mk +++ b/makefiles/application.inc.mk @@ -1,6 +1,6 @@ MODULE = $(APPLICATION_MODULE) -DIRS += $(RIOTCPU)/$(CPU) $(RIOTBOARD)/$(BOARD) +DIRS += $(RIOTCPU)/$(CPU) $(BOARDSDIR)/$(BOARD) DIRS += $(RIOTBASE)/core $(RIOTBASE)/drivers $(RIOTBASE)/sys # For regular modules, adding files to BLOBS to their Makefile is sufficient to diff --git a/makefiles/boards.inc.mk b/makefiles/boards.inc.mk index 5049c44c5b..7a56a238fc 100644 --- a/makefiles/boards.inc.mk +++ b/makefiles/boards.inc.mk @@ -1,10 +1,10 @@ # Default when RIOTBASE is not set and is executed from the RIOT directory -RIOTBOARD ?= $(or $(RIOTBASE),$(CURDIR))/boards +BOARDSDIR ?= $(or $(RIOTBASE),$(CURDIR))/boards # List all boards. -# By default, all directories in RIOTBOARD except 'common' +# By default, all directories in BOARDSDIR except 'common' # use 'wildcard */.' to only list directories -ALLBOARDS ?= $(sort $(filter-out common,$(patsubst $(RIOTBOARD)/%/.,%,$(wildcard $(RIOTBOARD)/*/.)))) +ALLBOARDS ?= $(sort $(filter-out common,$(patsubst $(BOARDSDIR)/%/.,%,$(wildcard $(BOARDSDIR)/*/.)))) # Set the default value from `BOARDS` BOARDS ?= $(ALLBOARDS) diff --git a/makefiles/info.inc.mk b/makefiles/info.inc.mk index e87e3c3e64..f8ee66741e 100644 --- a/makefiles/info.inc.mk +++ b/makefiles/info.inc.mk @@ -36,6 +36,7 @@ info-build: @echo '' @echo 'RIOTBASE: $(RIOTBASE)' @echo 'RIOTBOARD: $(RIOTBOARD)' + @echo 'BOARDSDIR: $(BOARDSDIR)' @echo 'RIOTCPU: $(RIOTCPU)' @echo 'RIOTPKG: $(RIOTPKG)' @echo '' diff --git a/makefiles/scan-build.inc.mk b/makefiles/scan-build.inc.mk index 9fcf881b0d..ddf231048e 100644 --- a/makefiles/scan-build.inc.mk +++ b/makefiles/scan-build.inc.mk @@ -7,6 +7,7 @@ SCANBUILD_ENV_VARS := \ BINDIR \ BINDIRBASE \ BOARD \ + BOARDSDIR \ BUILD_DIR \ BUILDRELPATH \ CC \