1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/makefiles/boards.inc.mk

22 lines
775 B
Makefile
Raw Normal View History

# Default when RIOTBASE is not set and is executed from the RIOT directory
2020-01-24 14:45:24 +01:00
RIOTBOARD ?= $(or $(RIOTBASE),$(CURDIR))/boards
BOARDSDIRS ?= $(EXTERNAL_BOARD_DIRS) $(RIOTBOARD)
# List all boards in a directory
# By default, all directories in board directory except 'common'
# use 'wildcard */.' to only list directories
_get_boards_in_directory = $(filter-out common,$(patsubst $1/%/.,%,$(wildcard $1/*/.)))
# Use `:=` so that it is evaluated before BOARDSDIRS gets eventually changed
ALLBOARDS := $(sort \
$(foreach dir,\
$(BOARDSDIRS),\
$(call _get_boards_in_directory,$(dir))))
# Set the default value from `BOARDS`
BOARDS ?= $(ALLBOARDS)
.PHONY: info-boards
info-boards:
@echo $(BOARDS)