]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
kbuild: make: fix if_changed when command contains backslashes
authorSascha Hauer <s.hauer@pengutronix.de>
Fri, 28 Sep 2012 00:18:55 +0000 (10:18 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Oct 2012 05:03:05 +0000 (15:03 +1000)
The call if_changed mechanism does not work when the command
contains backslashes. This basically is an issue with lzo
and bzip2 compressed kernels. The compressed binaries do not
contain the uncompressed image size, so these use size_append
to append the size. This results in backslashes in the executed
command. With this if_changed always detects a change in the
command and rebuilds the compressed image even if nothing
has changed.

Fix this by escaping backslashes in make-cmd

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Bernhard Walle <bernhard@bwalle.de>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/Kbuild.include

index 8bb8d3a9f01c3563ae2be2966bc834192434499f..978416dd31ca0efeacfd938e961b241aca7633af 100644 (file)
@@ -209,7 +209,7 @@ endif
 # >$< substitution to preserve $ when reloading .cmd file
 # note: when using inline perl scripts [perl -e '...$$t=1;...']
 # in $(cmd_xxx) double $$ your perl vars
-make-cmd = $(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1)))))
+make-cmd = $(subst \\,\\\\,$(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1))))))
 
 # Find any prerequisites that is newer than target or that does not exist.
 # PHONY targets skipped in both cases.