]> granicus.if.org Git - esp-idf/commitdiff
mconf: Don't print a recommendation to use 'make' if CMake build system is in use
authorAngus Gratton <angus@espressif.com>
Thu, 17 May 2018 04:23:49 +0000 (12:23 +0800)
committerAngus Gratton <gus@projectgus.com>
Tue, 29 May 2018 06:34:45 +0000 (16:34 +1000)
Also add some cmake dependencies to rebuild mconf if its source files change.

tools/cmake/kconfig.cmake
tools/kconfig/mconf.c

index f20002e1a5a99a793d7e5e327bd3e4bae1d9af4b..7d1f513049bcb72bfad79401ee38065a98bc004d 100644 (file)
@@ -38,7 +38,7 @@ if(NOT MCONF)
     #
     set(MCONF kconfig_bin/mconf)
 
-    externalproject_add(mconf
+    Externalproject_Add(mconf
         SOURCE_DIR ${IDF_PATH}/tools/kconfig
         CONFIGURE_COMMAND ""
         BINARY_DIR "kconfig_bin"
@@ -47,7 +47,16 @@ if(NOT MCONF)
         INSTALL_COMMAND ""
         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)
+
 endif()
 
 # Find all Kconfig files for all components
index 315ce2c7cb9dbc48b545329ee144c27e569d5c81..75fe1163576c59378c7d8e8fb3e6c2a1f08e7e0f 100644 (file)
@@ -980,11 +980,17 @@ static int handle_exit(void)
                }
                /* fall through */
        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"
-                                "*** End of the configuration.\n"
-                                "*** Execute 'make' to start the build or try 'make help'."
-                                "\n\n"));
+                                        "*** End of the configuration.\n"
+                                        "*** %s\n\n"), build_msg);
+               }
                res = 0;
                break;
        default: