Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d99f93b authored by Sam Ravnborg's avatar Sam Ravnborg
Browse files

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: default avatarSam Ravnborg <sam@ravnborg.org>
parent f6333eb4
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -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;