aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/basic/fixdep.c
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2018-04-16 15:07:57 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-05-07 08:40:39 -0400
commitb3aa58d2e85d5253a35a81320ae4d63ba6a482f0 (patch)
tree95f0f9d28511b60b1f5a2bc7145a472e87addd4f /scripts/basic/fixdep.c
parent75bc37fefc4471e718ba8e651aa74673d4e0a9eb (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/fixdep.c')
-rw-r--r--scripts/basic/fixdep.c6
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)
115 */ 115 */
116static void print_dep(const char *m, int slen, const char *dir) 116static void print_dep(const char *m, int slen, const char *dir)
117{ 117{
118 int c, i; 118 int c, prev_c = '/', i;
119 119
120 printf(" $(wildcard %s/", dir); 120 printf(" $(wildcard %s/", dir);
121 for (i = 0; i < slen; i++) { 121 for (i = 0; i < slen; i++) {
@@ -124,7 +124,9 @@ static void print_dep(const char *m, int slen, const char *dir)
124 c = '/'; 124 c = '/';
125 else 125 else
126 c = tolower(c); 126 c = tolower(c);
127 putchar(c); 127 if (c != '/' || prev_c != '/')
128 putchar(c);
129 prev_c = c;
128 } 130 }
129 printf(".h) \\\n"); 131 printf(".h) \\\n");
130} 132}