summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-09-07 11:28:26 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-09-16 22:10:22 +0200
commitb1ae1bd2433b2fb9f3db5ded536d7ba73a052712 (patch)
tree99471443edc648a90373dcf2bbe32e3d50dece9a
parent992c291e9561381cf86d4a7fc9271c2b60fea0c1 (diff)
downloadbarebox-b1ae1bd2433b2fb9f3db5ded536d7ba73a052712.tar.gz
barebox-b1ae1bd2433b2fb9f3db5ded536d7ba73a052712.tar.xz
Make: Fix if_changed when command contains backslashes
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 This was worked out together with Jan Lübbe. The same patch has recently been accepted to the kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
-rw-r--r--scripts/Kbuild.include2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 912cfd83db..c7faf67a2b 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -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.