summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-02-22 02:40:11 -0500
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-02-27 08:25:10 -0500
commit058507195b534e6a1b3e8bf716b816ecf090c9c3 (patch)
tree47a85d83d90e76ef19a5338edb7e17564c26be44
parent9390dff66a52d1a60c6e517d8fa6cdbdffc83cb1 (diff)
kbuild: move ".config not found!" message from Kconfig to Makefile
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>
-rw-r--r--Makefile10
-rw-r--r--scripts/kconfig/conf.c13
2 files changed, 8 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 0f438aaeb6e7..0e1f6c3f00a2 100644
--- a/Makefile
+++ b/Makefile
@@ -628,8 +628,14 @@ ifeq ($(may-sync-config),1)
628# because some architectures define CROSS_COMPILE there. 628# because some architectures define CROSS_COMPILE there.
629-include include/config/auto.conf.cmd 629-include include/config/auto.conf.cmd
630 630
631# To avoid any implicit rule to kick in, define an empty command 631$(KCONFIG_CONFIG):
632$(KCONFIG_CONFIG): ; 632 @echo >&2 '***'
633 @echo >&2 '*** Configuration file "$@" not found!'
634 @echo >&2 '***'
635 @echo >&2 '*** Please run some configurator (e.g. "make oldconfig" or'
636 @echo >&2 '*** "make menuconfig" or "make xconfig").'
637 @echo >&2 '***'
638 @/bin/false
633 639
634# The actual configuration files used during the build are stored in 640# The actual configuration files used during the build are stored in
635# include/generated/ and include/config/. Update them if .config is newer than 641# include/generated/ and include/config/. Update them if .config is newer than
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index da89ef788a8d..ef3678c24bab 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -488,7 +488,6 @@ int main(int ac, char **av)
488 const char *progname = av[0]; 488 const char *progname = av[0];
489 int opt; 489 int opt;
490 const char *name, *defconfig_file = NULL /* gcc uninit */; 490 const char *name, *defconfig_file = NULL /* gcc uninit */;
491 struct stat tmpstat;
492 int no_conf_write = 0; 491 int no_conf_write = 0;
493 492
494 tty_stdio = isatty(0) && isatty(1); 493 tty_stdio = isatty(0) && isatty(1);
@@ -560,18 +559,6 @@ int main(int ac, char **av)
560 name = av[optind]; 559 name = av[optind];
561 conf_parse(name); 560 conf_parse(name);
562 //zconfdump(stdout); 561 //zconfdump(stdout);
563 if (sync_kconfig) {
564 name = conf_get_configname();
565 if (stat(name, &tmpstat)) {
566 fprintf(stderr, "***\n"
567 "*** Configuration file \"%s\" not found!\n"
568 "***\n"
569 "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
570 "*** \"make menuconfig\" or \"make xconfig\").\n"
571 "***\n", name);
572 exit(1);
573 }
574 }
575 562
576 switch (input_mode) { 563 switch (input_mode) {
577 case defconfig: 564 case defconfig: