diff options
author | Nicolas Pitre | 2018-04-16 15:07:57 -0400 |
---|---|---|
committer | Masahiro Yamada | 2018-05-07 21:40:39 +0900 |
commit | b3aa58d2e85d5253a35a81320ae4d63ba6a482f0 (patch) | |
tree | 95f0f9d28511b60b1f5a2bc7145a472e87addd4f /scripts/basic | |
parent | 75bc37fefc4471e718ba8e651aa74673d4e0a9eb (diff) |
fixdep: suppress consecutive / from file paths in dependency list files
Underscores in symbol names are translated into slashes for path names.
Filesystems treat consecutive slashes as if there was only one, so
let's do the same in the dependency list for easier grepping, etc.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/basic')
-rw-r--r-- | scripts/basic/fixdep.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index f387538c58bc..850966f3d602 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -115,7 +115,7 @@ static void usage(void) */ static void print_dep(const char *m, int slen, const char *dir) { - int c, i; + int c, prev_c = '/', i; printf(" $(wildcard %s/", dir); for (i = 0; i < slen; i++) { @@ -124,7 +124,9 @@ static void print_dep(const char *m, int slen, const char *dir) c = '/'; else c = tolower(c); - putchar(c); + if (c != '/' || prev_c != '/') + putchar(c); + prev_c = c; } printf(".h) \\\n"); } |