build: detect duplicates in REPOSITORIES

This commit is contained in:
Christian Helmuth 2021-12-16 11:34:06 +01:00 committed by Norman Feske
parent 7dcd9a9f8d
commit c8a3497662

View File

@ -76,6 +76,15 @@ export BOARD
REPOSITORIES := $(realpath $(shell echo $(REPOSITORIES)))
BASE_DIR := $(realpath $(shell echo $(BASE_DIR)))
define nl
endef
ifneq ($(words $(REPOSITORIES)),$(words $(sort $(REPOSITORIES))))
$(error detected duplicates in REPOSITORIES $(foreach p,$(REPOSITORIES),$(nl) $(p)))
endif
#
# Configure shell program before executing any shell commands. On Ubuntu the
# standard shell is dash, which breaks colored output via its built-in echo