mconf: Don't print a recommendation to use 'make' if CMake build system is in use

Also add some cmake dependencies to rebuild mconf if its source files change.
This commit is contained in:
Angus Gratton
2018-05-17 12:23:49 +08:00
committed by Angus Gratton
parent 8cf82be917
commit 61aff5162c
2 changed files with 20 additions and 5 deletions

View File

@@ -38,7 +38,7 @@ if(NOT MCONF)
# #
set(MCONF kconfig_bin/mconf) set(MCONF kconfig_bin/mconf)
externalproject_add(mconf Externalproject_Add(mconf
SOURCE_DIR ${IDF_PATH}/tools/kconfig SOURCE_DIR ${IDF_PATH}/tools/kconfig
CONFIGURE_COMMAND "" CONFIGURE_COMMAND ""
BINARY_DIR "kconfig_bin" BINARY_DIR "kconfig_bin"
@@ -47,7 +47,16 @@ if(NOT MCONF)
INSTALL_COMMAND "" INSTALL_COMMAND ""
EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_ALL 1
) )
file(GLOB mconf_srcfiles ${IDF_PATH}/tools/kconfig/*.c)
ExternalProject_Add_StepDependencies(mconf build
${mconf_srcfiles}
${IDF_PATH}/tools/kconfig/Makefile
${CMAKE_CURRENT_LIST_FILE})
unset(mconf_srcfiles)
set(menuconfig_depends DEPENDS mconf) set(menuconfig_depends DEPENDS mconf)
endif() endif()
# Find all Kconfig files for all components # Find all Kconfig files for all components

View File

@@ -980,11 +980,17 @@ static int handle_exit(void)
} }
/* fall through */ /* fall through */
case -1: case -1:
if (!silent) if (!silent) {
const char *is_cmake = getenv("IDF_CMAKE");
const char *build_msg;
if (is_cmake && is_cmake[0] == 'y')
build_msg = _("Ready to use CMake (or 'idf.py build') to build the project.");
else
build_msg = _("Execute 'make' to start the build or try 'make help'.");
printf(_("\n\n" printf(_("\n\n"
"*** End of the configuration.\n" "*** End of the configuration.\n"
"*** Execute 'make' to start the build or try 'make help'." "*** %s\n\n"), build_msg);
"\n\n")); }
res = 0; res = 0;
break; break;
default: default: