aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/conf.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-06-09 01:12:39 -0400
committerSam Ravnborg <sam@mars.ravnborg.org>2006-06-09 01:31:30 -0400
commitc955ccafc38e77312b4c65e5a70960080fb8a3f2 (patch)
treef630610edef42b8ed60c455cfdb74d897190f1d3 /scripts/kconfig/conf.c
parentddc97cacb310ad68483952e67764c4153c138ed2 (diff)
kconfig: fix .config dependencies
This fixes one of the worst kbuild warts left - the broken dependencies used to check and regenerate the .config file. This was done via an indirect dependency and the .config itself had an empty command, which can cause make not to reread the changed .config file. Instead of this we generate now a new file include/config/auto.conf from .config, which is used for kbuild and has the proper dependencies. It's also the main make target now for all files generated during this step (and thus replaces include/linux/autoconf.h). This also means we can now relax the syntax requirements for the .config file and we don't have to rewrite it all the time, i.e. silentoldconfig only writes .config now when it's necessary to keep it in sync with the Kconfig files and even this can be suppressed by setting the environment variable KCONFIG_NOSILENTUPDATE, so the update can (and must) be done manually. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/kconfig/conf.c')
-rw-r--r--scripts/kconfig/conf.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 8012d1076876..9334da65f364 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -599,7 +599,15 @@ int main(int ac, char **av)
599 input_mode = ask_silent; 599 input_mode = ask_silent;
600 valid_stdin = 1; 600 valid_stdin = 1;
601 } 601 }
602 } 602 } else if (sym_change_count) {
603 name = getenv("KCONFIG_NOSILENTUPDATE");
604 if (name && *name) {
605 fprintf(stderr, _("\n*** Kernel configuration requires explicit update.\n\n"));
606 return 1;
607 }
608 } else
609 goto skip_check;
610
603 do { 611 do {
604 conf_cnt = 0; 612 conf_cnt = 0;
605 check_conf(&rootmenu); 613 check_conf(&rootmenu);
@@ -608,5 +616,11 @@ int main(int ac, char **av)
608 fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); 616 fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
609 return 1; 617 return 1;
610 } 618 }
619skip_check:
620 if (input_mode == ask_silent && conf_write_autoconf()) {
621 fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
622 return 1;
623 }
624
611 return 0; 625 return 0;
612} 626}