Skip to content

Commit

Permalink
fixdep: suppress consecutive / from file paths in dependency list files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Masahiro Yamada committed May 7, 2018
1 parent 75bc37f commit b3aa58d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/basic/fixdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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");
}
Expand Down

0 comments on commit b3aa58d

Please sign in to comment.