mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
kbuild: escape '#' in .target.cmd files
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>
This commit is contained in:
parent
f6333eb4e7
commit
4d99f93bda
1 changed files with 14 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue