From 2f0efe151084f9c77e4c1f6dce9e5711b02ba7a7 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 9 Nov 2016 20:38:16 +1100 Subject: [PATCH] build system: Fix defconfig vs menuconfig regression in 155f9124 --- make/build_examples.sh | 2 +- make/project_config.mk | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/make/build_examples.sh b/make/build_examples.sh index d264862874..53cba23b1e 100755 --- a/make/build_examples.sh +++ b/make/build_examples.sh @@ -22,7 +22,7 @@ for example in ${IDF_PATH}/examples/*; do pushd ${EXAMPLE_NUM}/`basename ${example}` # can't do "make defconfig all" as this will trip menuconfig # sometimes - make defconfig && make || RESULT=$? + make defconfig V=1 && make V=1 || RESULT=$? popd EXAMPLE_NUM=$(( $EXAMPLE_NUM + 1 )) done diff --git a/make/project_config.mk b/make/project_config.mk index 4d0f6c2059..555086fb8d 100644 --- a/make/project_config.mk +++ b/make/project_config.mk @@ -21,13 +21,17 @@ KCONFIG_TOOL_ENV=KCONFIG_AUTOHEADER=$(abspath $(BUILD_DIR_BASE)/include/sdkconfi COMPONENT_KCONFIGS="$(COMPONENT_KCONFIGS)" KCONFIG_CONFIG=$(SDKCONFIG) \ COMPONENT_KCONFIGS_PROJBUILD="$(COMPONENT_KCONFIGS_PROJBUILD)" -menuconfig: $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig $(BUILD_DIR_BASE) +menuconfig: $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig $(summary) MENUCONFIG $(Q) $(KCONFIG_TOOL_ENV) $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig ifeq ("$(wildcard $(SDKCONFIG))","") -#No sdkconfig found. Need to run menuconfig to make this if we need it. +ifeq ("$(filter defconfig,$(MAKECMDGOALS))","") +# if not configuration is present and defconfig is not a target, run makeconfig $(SDKCONFIG): menuconfig +else +$(SDKCONFIG): defconfig +endif endif defconfig: $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig $(BUILD_DIR_BASE)