Skip to content
Snippets Groups Projects
Commit b3aa58d2 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Masahiro Yamada
Browse files

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: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 75bc37fe
Branches
No related tags found
No related merge requests found
...@@ -115,7 +115,7 @@ static void usage(void) ...@@ -115,7 +115,7 @@ static void usage(void)
*/ */
static void print_dep(const char *m, int slen, const char *dir) static void print_dep(const char *m, int slen, const char *dir)
{ {
int c, i; int c, prev_c = '/', i;
printf(" $(wildcard %s/", dir); printf(" $(wildcard %s/", dir);
for (i = 0; i < slen; i++) { for (i = 0; i < slen; i++) {
...@@ -124,7 +124,9 @@ static void print_dep(const char *m, int slen, const char *dir) ...@@ -124,7 +124,9 @@ static void print_dep(const char *m, int slen, const char *dir)
c = '/'; c = '/';
else else
c = tolower(c); c = tolower(c);
if (c != '/' || prev_c != '/')
putchar(c); putchar(c);
prev_c = c;
} }
printf(".h) \\\n"); printf(".h) \\\n");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment