kconfig: fix time ordering of writes to .kconfig.d and include/linux/autoconf.h
authorJan Beulich <JBeulich@novell.com>
Thu, 9 Mar 2006 13:47:46 +0000 (14:47 +0100)
committerSam Ravnborg <sam@mars.ravnborg.org>
Sun, 12 Mar 2006 22:38:20 +0000 (23:38 +0100)
Since .kconfig.d is used as a make dependency of include/linux/autoconf.h, it
should be written earlier than the header file, to avoid a subsequent rebuild
to consider the header outdated.

Signed-Off-By: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/kconfig/confdata.c

index b0cbbe2e41bb372c36a9aa152b44ab78607b0a62..1b8882ddbc74fed0fbed2c22f8dd317b6de0106b 100644 (file)
@@ -374,6 +374,7 @@ int conf_write(const char *name)
                out_h = fopen(".tmpconfig.h", "w");
                if (!out_h)
                        return 1;
+               file_write_dep(NULL);
        }
        sym = sym_lookup("KERNELVERSION", 0);
        sym_calc_value(sym);
@@ -512,7 +513,6 @@ int conf_write(const char *name)
        if (out_h) {
                fclose(out_h);
                rename(".tmpconfig.h", "include/linux/autoconf.h");
-               file_write_dep(NULL);
        }
        if (!name || basename != conf_def_filename) {
                if (!name)