mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles/boards.inc.mk: include BOARDSDIR and RIOTBOARD
This commit is contained in:
parent
1f66c0f3ee
commit
18444ac99a
@ -1,10 +1,18 @@
|
||||
# Default when RIOTBASE is not set and is executed from the RIOT directory
|
||||
BOARDSDIR ?= $(or $(RIOTBASE),$(CURDIR))/boards
|
||||
|
||||
# List all boards.
|
||||
# List all boards in a directory
|
||||
# By default, all directories in BOARDSDIR except 'common'
|
||||
# use 'wildcard */.' to only list directories
|
||||
ALLBOARDS ?= $(sort $(filter-out common,$(patsubst $(BOARDSDIR)/%/.,%,$(wildcard $(BOARDSDIR)/*/.))))
|
||||
_get_boards_in_directory = $(filter-out common,$(patsubst $1/%/.,%,$(wildcard $1/*/.)))
|
||||
|
||||
# If BOARDSDIR is not in RIOTBOARD also list BOARDS in RIOTBOARD
|
||||
ifneq ($(RIOTBOARD),$(BOARDSDIR))
|
||||
ALLBOARDS_RIOTBOARD ?= $(call _get_boards_in_directory,$(RIOTBOARD))
|
||||
endif
|
||||
|
||||
# Get all boards
|
||||
ALLBOARDS ?= $(sort $(call _get_boards_in_directory,$(BOARDSDIR)) $(ALLBOARDS_RIOTBOARD))
|
||||
|
||||
# Set the default value from `BOARDS`
|
||||
BOARDS ?= $(ALLBOARDS)
|
||||
|
Loading…
Reference in New Issue
Block a user