Skip to content

Commit

Permalink
Merge pull request #11662 from cladmi/pr/make/boards.inc.mk
Browse files Browse the repository at this point in the history
makefiles/boards.inc.mk: list boards variables
  • Loading branch information
kaspar030 committed Jun 11, 2019
2 parents 0119827 + 45e611d commit c4c79f4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -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
3 changes: 3 additions & 0 deletions Makefile.include
Expand Up @@ -97,6 +97,9 @@ include $(RIOTMAKE)/color.inc.mk
# include concurrency helpers
include $(RIOTMAKE)/info-nproc.inc.mk

# List of boards variables
include $(RIOTMAKE)/boards.inc.mk

GLOBAL_GOALS += buildtest info-boards-supported info-boards-features-missing info-buildsizes info-buildsizes-diff
ifneq (, $(filter $(GLOBAL_GOALS), $(MAKECMDGOALS)))
BOARD=none
Expand Down
2 changes: 2 additions & 0 deletions makefiles/app_dirs.inc.mk
Expand Up @@ -21,3 +21,5 @@ info-applications-supported-boards:
@for dir in $(APPLICATION_DIRS); do \
make --no-print-directory -C $${dir} info-boards-supported 2>/dev/null | xargs -n 1 echo $${dir}; \
done
# BOARDS values from 'boards.inc.mk' to only evaluate it once
info-applications-supported-boards: export BOARDS ?=
14 changes: 14 additions & 0 deletions 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)
1 change: 0 additions & 1 deletion makefiles/info-global.inc.mk
Expand Up @@ -37,7 +37,6 @@ define board_missing_features
endif
endef

BOARDS ?= $(shell find $(RIOTBOARD)/* -maxdepth 0 -type d \! -name "common" -exec basename {} \;)
BOARDS := $(filter $(if $(BOARD_WHITELIST), $(BOARD_WHITELIST), %), $(BOARDS))
BOARDS := $(filter-out $(BOARD_BLACKLIST), $(BOARDS))

Expand Down

0 comments on commit c4c79f4

Please sign in to comment.