Doing another 'make' after a 'make clean' was broken until now. Fix it
authorUwe Hermann <uwe@hermann-uwe.de>
Thu, 3 Apr 2008 22:20:35 +0000 (22:20 +0000)
committerUwe Hermann <uwe@hermann-uwe.de>
Thu, 3 Apr 2008 22:20:35 +0000 (22:20 +0000)
by not deleting build/config.h during 'make clean' (only in 'make distclean').

Also, change the default behaviour of 'make' from asking the user to
run 'make config' (or similar) to actually _run_ 'make config' without
asking questions. It's always possible to explicitly invoke
'make menuconfig' or 'make xconfig' and so on, of course.

Finally, make _all_ targets (allyesconfig, randconfig, and so on)
generate a build/config.h file, as we always #include it.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3211 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

payloads/coreinfo/Makefile
payloads/coreinfo/util/kconfig/conf.c
payloads/coreinfo/util/kconfig/confdata.c

index a05edbc051a459bdbd5986686215a6e16594e036..e3d4b6ed1b4f3812942e39a800e9ca9d7766e6e6 100644 (file)
@@ -59,8 +59,7 @@ TARGET  = $(obj)/coreinfo.elf
 
 ifeq ($(strip $(HAVE_DOTCONFIG)),)
 
-all:
-       $(Q)printf "Please run make config/menuconfig/xconfig/gconfig first.\n"
+all: config
 
 else
 
@@ -91,9 +90,10 @@ prepare:
        $(Q)mkdir -p $(obj)/util/kconfig/lxdialog
 
 clean:
-       $(Q)rm -rf build
+       $(Q)rm -rf build/util build/*.conf build/*.cmd build/*.elf build/*.o
 
 distclean: clean
+       $(Q)rm -rf build
        $(Q)rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig*
 
 include util/kconfig/Makefile
index cb215a6c70666298f4f0bc2cd409fe5db0cd3f44..3d425724200f4e35cf054dc6da84c3560067f592 100644 (file)
@@ -624,6 +624,10 @@ int main(int ac, char **av)
                fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
                return 1;
        }
+       if (conf_write_autoconf()) {
+               fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
+               return 1;
+       }
 skip_check:
        if (input_mode == ask_silent && conf_write_autoconf()) {
                fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
index da24d2759fd463221e968cb5d0d567cca89e9116..087b366f2114b3cf95dce3a973f4d9336f57f066 100644 (file)
@@ -679,8 +679,10 @@ int conf_write_autoconf(void)
 
        file_write_dep("build/auto.conf.cmd");
 
+#if 0
        if (conf_split_config())
                return 1;
+#endif
 
        out = fopen(".tmpconfig", "w");
        if (!out)