diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2018-02-28 14:17:36 -0500 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-05 09:48:25 -0500 |
commit | 5b8ad96d1a4421ffe417e647a65064aad1e84fb4 (patch) | |
tree | 23aff2c1cc0a91d53ca8f15ee7b1dffba3217b9a /scripts/basic/fixdep.c | |
parent | 14a596a7e6fd9c5baa6b2cfc57962e2c3bda6c69 (diff) |
fixdep: remove some false CONFIG_ matches
The string CONFIG_ quite often appears after other alphanumerics,
meaning that that instance cannot be referencing a Kconfig
symbol. Omitting these means make has fewer files to stat() when
deciding what needs to be rebuilt - for a defconfig build, this seems to
remove about 2% of the (wildcard ...) lines from the .o.cmd files.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/basic/fixdep.c')
-rw-r--r-- | scripts/basic/fixdep.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index d7fbe545dd5d..1b21870d6e7f 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c | |||
@@ -225,8 +225,13 @@ static int str_ends_with(const char *s, int slen, const char *sub) | |||
225 | static void parse_config_file(const char *p) | 225 | static void parse_config_file(const char *p) |
226 | { | 226 | { |
227 | const char *q, *r; | 227 | const char *q, *r; |
228 | const char *start = p; | ||
228 | 229 | ||
229 | while ((p = strstr(p, "CONFIG_"))) { | 230 | while ((p = strstr(p, "CONFIG_"))) { |
231 | if (p > start && (isalnum(p[-1]) || p[-1] == '_')) { | ||
232 | p += 7; | ||
233 | continue; | ||
234 | } | ||
230 | p += 7; | 235 | p += 7; |
231 | q = p; | 236 | q = p; |
232 | while (*q && (isalnum(*q) || *q == '_')) | 237 | while (*q && (isalnum(*q) || *q == '_')) |