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.
Showing the changes to scripts/basic (1 of 1 file). Show all
Unified · Split
| @@ -115,7 +115,7 @@ static void usage(void) · 114 unmodified lines | |||
| 115 | */ | 115 | */ |
| 116 | static void print_dep(const char *m, int slen, const char *dir) | 116 | static 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 | 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 | } |