aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/basic/fixdep.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2007-03-29 05:27:14 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-01 17:23:57 -0400
commitc21b1e4d9b0c263a35f67eed2b025d053566c557 (patch)
treeaa5c6fe22815a79217af0679a7cdfcd1f76c3c3a /scripts/basic/fixdep.c
parentf5ef2abcbeb5b0be23f7cc610a024b2406e3d8e6 (diff)
[PATCH] kbuild: fix dependency generation
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. The problem is that trisate symbol are represent with three different symbols: SYMBOL=n => no symbol defined SYMBOL=y => CONFIG_SYMBOL defined to '1' SYMBOL=m => CONFIG_SYMBOL_MODULE defined to '1' But conf_split_config do not distingush between the =y and =m case, so only the =y case is honoured. This is fixed in fixdep so when a CONFIG symbol with _MODULE is found we skip that part and only look for the CONFIG_SYMBOL version. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/basic/fixdep.c')
-rw-r--r--scripts/basic/fixdep.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 668a11a8b383..6bc7e7cfccf6 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -28,9 +28,11 @@
28 * the dependency on linux/autoconf.h by a dependency on every config 28 * the dependency on linux/autoconf.h by a dependency on every config
29 * option which is mentioned in any of the listed prequisites. 29 * option which is mentioned in any of the listed prequisites.
30 * 30 *
31 * To be exact, split-include populates a tree in include/config/, 31 * kconfig populates a tree in include/config/ with an empty file
32 * e.g. include/config/his/driver.h, which contains the #define/#undef 32 * for each config symbol and when the configuration is updated
33 * for the CONFIG_HIS_DRIVER option. 33 * the files representing changed config options are touched
34 * which then let make pick up the changes and the files that use
35 * the config symbols are rebuilt.
34 * 36 *
35 * So if the user changes his CONFIG_HIS_DRIVER option, only the objects 37 * So if the user changes his CONFIG_HIS_DRIVER option, only the objects
36 * which depend on "include/linux/config/his/driver.h" will be rebuilt, 38 * which depend on "include/linux/config/his/driver.h" will be rebuilt,
@@ -245,6 +247,8 @@ void parse_config_file(char *map, size_t len)
245 continue; 247 continue;
246 248
247 found: 249 found:
250 if (!memcmp(q - 7, "_MODULE", 7))
251 q -= 7;
248 use_config(p+7, q-p-7); 252 use_config(p+7, q-p-7);
249 } 253 }
250} 254}