1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 01:23:49 +01:00

sys/log: check that one and only one backend

This commit is contained in:
Leandro Lanzieri 2021-11-30 12:24:43 +01:00
parent 81b93c9b95
commit dadaace394
No known key found for this signature in database
GPG Key ID: F4E9A721761C7593

View File

@ -1,3 +1,15 @@
# check that one, and only one log backend is being used
USED_LOG_BACKENDS := $(sort $(filter log_%,$(USEMODULE)))
ifeq (0,$(words $(USED_LOG_BACKENDS)))
$(error The log module is being used but no backend is provided.)
else ifeq (1,$(words $(USED_LOG_BACKENDS)))
# only one backend is provided, this is correct
else
$(info Only one log backend can be used at a time.)
$(error Currently selecting: $(USED_LOG_BACKENDS))
endif
ifneq (,$(filter log_printfnoformat,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/log/log_printfnoformat
endif