From 7e98365b60e1ce5f4ed19e0df4722a2591a89d6f Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sun, 25 Dec 2005 23:21:14 +0100 Subject: [PATCH] --- yaml --- r: 15897 b: refs/heads/master c: 4d99f93bdaa1ab49188cac67b4aae9180f8e3960 h: refs/heads/master i: 15895: a04e55759a2ab016de4a55c46167692a5b830e4c v: v3 --- [refs] | 2 +- trunk/scripts/basic/fixdep.c | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index c78f365dbea8..1f8fa68dbded 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f6333eb4e788bf70d6455c9004b6b676df62c500 +refs/heads/master: 4d99f93bdaa1ab49188cac67b4aae9180f8e3960 diff --git a/trunk/scripts/basic/fixdep.c b/trunk/scripts/basic/fixdep.c index 0b61bea869f7..679124b11e12 100644 --- a/trunk/scripts/basic/fixdep.c +++ b/trunk/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;