mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Make: Fix if_changed when command contains backslashes
@ 2012-09-07  9:35 Sascha Hauer
  2012-09-07  9:38 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2012-09-07  9:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: Sam Ravnborg, Bernhard Walle, Michal Marek, kernel, Sascha Hauer

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>
---
 scripts/Kbuild.include |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 6a3ee98..afa4459 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.
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-07  9:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-07  9:35 [PATCH] Make: Fix if_changed when command contains backslashes Sascha Hauer
2012-09-07  9:38 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®