mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
kbuild: consolidate command line escaping
While the recent change to also escape # symbols when storing C-file compilation command lines was helpful, it should be in effect for all command lines, as much as the dollar escaping should be in effect for C-source compilation commands. Additionally, for better readability and maintenance, consolidating all the escaping (single quotes, dollars, and now sharps) was also desirable. Signed-Off-By: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
20a468b513
commit
6176aa9ae4
3 changed files with 12 additions and 25 deletions
|
@ -132,20 +132,10 @@ void usage(void)
|
|||
|
||||
/*
|
||||
* 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)
|
||||
{
|
||||
char *p = cmdline;
|
||||
|
||||
printf("cmd_%s := ", target);
|
||||
for (; *p; p++) {
|
||||
if (*p == '#')
|
||||
printf("\\");
|
||||
printf("%c", *p);
|
||||
}
|
||||
printf("\n\n");
|
||||
printf("cmd_%s := %s\n\n", target, cmdline);
|
||||
}
|
||||
|
||||
char * str_config = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue