From: Sascha Hauer Date: Fri, 5 Oct 2012 00:11:17 +0000 (-0700) Subject: kbuild: make: fix if_changed when command contains backslashes X-Git-Tag: v3.7~382^2~176 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c353acba28fb3fa1fd05fd6b85a9fc7938330f9c;p=platform%2Fkernel%2Flinux-amlogic.git kbuild: 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 Signed-off-by: Sascha Hauer Signed-off-by: Jan Luebbe Cc: Sam Ravnborg Cc: Bernhard Walle Cc: Michal Marek Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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.