Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Nicolas Pitre and committed by
Masahiro Yamada
b3aa58d2 75bc37fe

+4 -2
+4 -2
scripts/basic/fixdep.c
··· 115 115 */ 116 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 120 printf(" $(wildcard %s/", dir); 121 121 for (i = 0; i < slen; i++) { ··· 124 124 c = '/'; 125 125 else 126 126 c = tolower(c); 127 - putchar(c); 127 + if (c != '/' || prev_c != '/') 128 + putchar(c); 129 + prev_c = c; 128 130 } 129 131 printf(".h) \\\n"); 130 132 }