Commit 5b8ad96d authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Masahiro Yamada

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: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 14a596a7
...@@ -225,8 +225,13 @@ static int str_ends_with(const char *s, int slen, const char *sub) ...@@ -225,8 +225,13 @@ static int str_ends_with(const char *s, int slen, const char *sub)
static void parse_config_file(const char *p) static void parse_config_file(const char *p)
{ {
const char *q, *r; const char *q, *r;
const char *start = p;
while ((p = strstr(p, "CONFIG_"))) { while ((p = strstr(p, "CONFIG_"))) {
if (p > start && (isalnum(p[-1]) || p[-1] == '_')) {
p += 7;
continue;
}
p += 7; p += 7;
q = p; q = p;
while (*q && (isalnum(*q) || *q == '_')) while (*q && (isalnum(*q) || *q == '_'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment