diff --git a/makefiles/kconfig.mk b/makefiles/kconfig.mk index 2027c71b51..42bfafbe6d 100644 --- a/makefiles/kconfig.mk +++ b/makefiles/kconfig.mk @@ -85,8 +85,11 @@ $(GENERATED_DIR): $(if $(MAKE_RESTARTS),,$(CLEAN)) # build. SHOULD_RUN_KCONFIG ?= $(or $(wildcard $(APPDIR)/*.config), \ $(wildcard $(APPDIR)/Kconfig), \ - $(if $(CLEAN),,$(wildcard $(KCONFIG_OUT_CONFIG))), \ - $(filter menuconfig, $(MAKECMDGOALS))) + $(if $(CLEAN),,$(wildcard $(KCONFIG_OUT_CONFIG)))) + +ifneq (,$(filter menuconfig, $(MAKECMDGOALS))) + SHOULD_RUN_KCONFIG := 1 +endif # When testing Kconfig we should always run it ifeq (1,$(TEST_KCONFIG))