]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: Fix handling of backslashes in *.cmd files
authorMichal Marek <mmarek@suse.cz>
Thu, 7 Aug 2014 19:39:57 +0000 (21:39 +0200)
committerMichal Marek <mmarek@suse.cz>
Thu, 7 Aug 2014 19:53:20 +0000 (21:53 +0200)
commit92f7007e1a23bf6373ce64465a6b7a200fa2d621
tree0b52bfad6c24aa14603694471e2b7d54a8ce5366
parent2b470b2266a97e95b04542ab53d48b35d6c160af
kbuild: Fix handling of backslashes in *.cmd files

Commit ef3fe6a6 ("kbuild: make: fix if_changed when command contains
backslashes") attempted to handle backslashes in *.cmd files, but it
only handled double backslashes for some reason. Changing make-cmd to also
handle single backslashes fixes rebuilds with dash, but it breaks bash
again. The reason is that the two shells disagree about the
interpretation of backslash sequences in the echo builtin. The way out
of this is to print the command with printf '%s\n'. While at it,
document what the individual parts of make-cmd do and why.

Reported-and-tested-by: Konstantin Khlebnikov <koct9i@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/Kbuild.include