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

Makefile.include: detect if BASELIBS changed after its first use

This commit is contained in:
Gaëtan Harter 2018-06-20 18:59:21 +02:00
parent fb27a801af
commit 90fdd09176
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B

View File

@ -362,6 +362,9 @@ LINKFLAGPREFIX ?= -Wl,
DIRS += $(EXTERNAL_MODULE_DIRS)
# Save value to verify it is not modified later
_BASELIBS_VALUE_BEFORE_USAGE := $(BASELIBS)
# Linker rule
$(ELFFILE): FORCE
ifeq ($(BUILDOSXNATIVE),1)
@ -644,4 +647,12 @@ ifneq (all, $(.DEFAULT_GOAL))
$(error .DEFAULT_GOAL := $(.DEFAULT_GOAL))
endif
# Detect if BASELIBS changed since its first use
ifneq ($(_BASELIBS_VALUE_BEFORE_USAGE),$(BASELIBS))
$(warning $(sort $(filter-out $(_BASELIBS_VALUE_BEFORE_USAGE), $(BASELIBS)) \
$(filter-out $(BASELIBS), $(_BASELIBS_VALUE_BEFORE_USAGE))))
$(error BASELIBS value changed)
endif
endif # BOARD=none