kbuild: move ".config not found!" message from Kconfig to Makefile
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 22 Feb 2019 07:40:11 +0000 (16:40 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 27 Sep 2019 20:30:55 +0000 (22:30 +0200)
If you run "make" in a pristine source tree, currently Kbuild will
start to build Kconfig to let it show the error message.

It would be more straightforward to check it in Makefile and let
it fail immediately.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/conf.c

index 2949b7d983193e8ae9eb7e26d4612e1f0827dd4b..9cb55bfbd46061eb0f86e6982a737690366eec2e 100644 (file)
@@ -488,7 +488,6 @@ int main(int ac, char **av)
        const char *progname = av[0];
        int opt;
        const char *name, *defconfig_file = NULL /* gcc uninit */;
-       struct stat tmpstat;
        int no_conf_write = 0;
 
        tty_stdio = isatty(0) && isatty(1);
@@ -560,18 +559,6 @@ int main(int ac, char **av)
        name = av[optind];
        conf_parse(name);
        //zconfdump(stdout);
-       if (sync_kconfig) {
-               name = conf_get_configname();
-               if (stat(name, &tmpstat)) {
-                       fprintf(stderr, "***\n"
-                               "*** Configuration file \"%s\" not found!\n"
-                               "***\n"
-                               "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
-                               "*** \"make menuconfig\" or \"make xconfig\").\n"
-                               "***\n", name);
-                       exit(1);
-               }
-       }
 
        switch (input_mode) {
        case defconfig: