From f7f58d6a6b4c62c5df8e53f36e9c9bb15347067c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Mon, 27 May 2019 20:56:47 +0200 Subject: [PATCH] makefiles/boards.inc.mk: list boards variables * Add a variable to list all boards without using 'find'. * By default 'BOARDS' is the list of all boards. * Add the 'info-boards' target that lists BOARDS. * Use in RIOT/Makefile --- Makefile | 1 + makefiles/boards.inc.mk | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 makefiles/boards.inc.mk diff --git a/Makefile b/Makefile index cd6eddd1c3..144cbd7e65 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,7 @@ welcome: print-versions: @./dist/tools/ci/print_toolchain_versions.sh +include makefiles/boards.inc.mk include makefiles/app_dirs.inc.mk -include makefiles/tests.inc.mk diff --git a/makefiles/boards.inc.mk b/makefiles/boards.inc.mk new file mode 100644 index 0000000000..5049c44c5b --- /dev/null +++ b/makefiles/boards.inc.mk @@ -0,0 +1,14 @@ +# Default when RIOTBASE is not set and is executed from the RIOT directory +RIOTBOARD ?= $(or $(RIOTBASE),$(CURDIR))/boards + +# List all boards. +# By default, all directories in RIOTBOARD except 'common' +# use 'wildcard */.' to only list directories +ALLBOARDS ?= $(sort $(filter-out common,$(patsubst $(RIOTBOARD)/%/.,%,$(wildcard $(RIOTBOARD)/*/.)))) + +# Set the default value from `BOARDS` +BOARDS ?= $(ALLBOARDS) + +.PHONY: info-boards +info-boards: + @echo $(BOARDS)