[PATCH 15/26] kbuild: escape '#' in .target.cmd files

From: Sam Ravnborg
Date: Tue Jan 03 2006 - 08:28:23 EST


From: Sam Ravnborg <sam@xxxxxxxxxxxxxxxxx>
Date: 1135549274 +0100

Commandlines are contained in the .<target>.cmd files and in case they
contain a '#' char make see this as start of comment.
Teach fixdep to escape the '#' char so make will assing the full commandline.

Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>

---

scripts/basic/fixdep.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)

4d99f93bdaa1ab49188cac67b4aae9180f8e3960
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 0b61bea..679124b 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_<target filename> :=
+ * 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;
--
1.0.6

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/