[PATCH] kconfig/kbuild: fix dependency problem

From: Sam Ravnborg
Date: Sat Mar 31 2007 - 03:34:46 EST


Commit 2e3646e51b2d6415549b310655df63e7e0d7a080 changed the way
the split config tree is built, but failed to also adjust fixdep
accordingly - if changing a config option from or to m, files
referencing the respective CONFIG_..._MODULE (but not the
corresponding CONFIG_...) didn't get rebuilt.

This happens because tristate symbol has three values represented
by different CONFIG_ symbols:

=n => CONFIG_SYMBOL undefined
=y => CONFIG_SYMBOL equals 1
=m => CONFIG_SYMBOL_MODULE equals 1

But conf_split_config did not support the _MODULE syntax
and therefore no include/config/symbol/module.h file was
generated/touched when changing a symbol to/from m.
Thus make did nt pick up the change and rebuild failed.

This patch teaches conf_split_config to support the
_MODULE variant.

This fixes a problem reported by Randy Dunlap <randy.dunlap@xxxxxxxxxx>.
arch/i386/kernel/apm.o revealed this bug.
Original fix was posted by: "Jan Beulich" <jbeulich@xxxxxxxxxx>
which inspired this better fix.

Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
---
scripts/kconfig/confdata.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index ff6b39b..4137961 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -646,6 +646,12 @@ int conf_split_config(void)
*d = '\0';
if (touch_file(path))
return 1;
+ /* For tristate symbols we need to touch symbol/module.h too */
+ if (sym->type == S_TRISTATE) {
+ strcat(path, "/module");
+ if (touch_file(path))
+ return 1;
+ }
}
if (chdir("../.."))
return 1;
--
1.5.1.rc3.gaa453

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/