Skip to content

Commit

Permalink
makefiles/boards.inc.mk: include BOARDSDIR and RIOTBOARD
Browse files Browse the repository at this point in the history
  • Loading branch information
fjmolinas committed Dec 15, 2019
1 parent c895b44 commit 8cb5e10
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions makefiles/boards.inc.mk
Original file line number Diff line number Diff line change
@@ -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 RIOTBOARD also list BOARDS in RIOTBOAR
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)
Expand Down

0 comments on commit 8cb5e10

Please sign in to comment.