lkml.org 
[lkml]   [2006]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 15/26] kbuild: escape '#' in .target.cmd files
Date
From
From: Sam Ravnborg <sam@mars.ravnborg.org>
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@ravnborg.org>

---

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-03 14:32    [W:0.136 / U:5.392 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site