diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 0b61bea869f7580d0d5af1d5c56345be61a8597c..679124b11e12645b088877fbee8d3d6e901cb24e 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -130,9 +130,22 @@ void usage(void) exit(1); } +/* + * Print out the commandline prefixed with cmd_ := + * If commandline contains '#' escape with '\' so make to not see + * the '#' as a start-of-comment symbol + **/ void print_cmdline(void) { - printf("cmd_%s := %s\n\n", target, cmdline); + char *p = cmdline; + + printf("cmd_%s := ", target); + for (; *p; p++) { + if (*p == '#') + printf("\\"); + printf("%c", *p); + } + printf("\n\n"); } char * str_config = NULL;