mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefile: add check for ERROR_ Kconfig symbols
This adds a check in the build process to verify that no ERROR_ Kconfig symbols are set. These symbols indicate invalid conditions in the Kconfig configuration.
This commit is contained in:
parent
c21b72b5e8
commit
34d84ad8c6
@ -644,7 +644,7 @@ endif
|
||||
..compiler-check:
|
||||
$(call check_cmd,$(CC),Compiler)
|
||||
|
||||
..build-message:
|
||||
..build-message: $(if $(SHOULD_RUN_KCONFIG), check-kconfig-errors)
|
||||
@$(COLOR_ECHO) '$(COLOR_GREEN)Building application "$(APPLICATION)" for "$(BOARD)" with MCU "$(MCU)".$(COLOR_RESET)'
|
||||
@$(COLOR_ECHO)
|
||||
|
||||
|
@ -168,4 +168,19 @@ $(KCONFIG_GENERATED_AUTOCONF_HEADER_C): $(KCONFIG_OUT_CONFIG) $(GENERATED_DIR_DE
|
||||
# Try to load the list of Kconfig files used
|
||||
-include $(KCONFIG_OUT_DEP)
|
||||
|
||||
# capture all ERROR_ prefixed Kconfig symbols
|
||||
_KCONFIG_ERROR_VARS = $(filter CONFIG_ERROR_%,$(.VARIABLES))
|
||||
_KCONFIG_ERRORS = $(foreach v,$(_KCONFIG_ERROR_VARS),$($(v)))
|
||||
|
||||
# this checks that no Kconfig error symbols are set. These symbols are used
|
||||
# to indicate invalid conditions
|
||||
check-kconfig-errors: $(KCONFIG_OUT_CONFIG) $(KCONFIG_GENERATED_AUTOCONF_HEADER_C)
|
||||
ifneq (,$(_KCONFIG_ERRORS))
|
||||
@$(COLOR_ECHO) "$(COLOR_RED) !! There are ERRORS in the configuration !! $(COLOR_RESET)"
|
||||
@for err in $(_KCONFIG_ERRORS); do \
|
||||
echo "- $$err"; \
|
||||
done
|
||||
@false
|
||||
endif
|
||||
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user