History

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.

Nicolas Pitre committed 8 years ago

Commit b3aa58d1 parent 75bc37f1 file · +4 −2Browse files

Showing the changes to scripts/basic (1 of 1 file). Show all

Unified · Split

scripts/basic/fixdep.c+4−2
@@ -115,7 +115,7 @@ static void usage(void) · 114 unmodified lines
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) · 2 unmodified lines
124 c = '/';124 c = '/';
125 else125 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}