Re: [PATCH 4/4] build: fix that LZO file is always rebuilt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sam,

On Tue, Dec 26, 2017 at 07:36:53PM +0100, Sam Ravnborg wrote:
> From e398a00f84db33ea5ae7f6ee12c54511ef7a94fc Mon Sep 17 00:00:00 2001
> From: Sam Ravnborg <sam@xxxxxxxxxxxx>
> Date: Tue, 26 Dec 2017 18:09:35 +0100
> Subject: [PATCH 4/4] build: fix that LZO file is always rebuilt
> 
> Port the make-cmd from linux kernel.
> with the updated version $$ is porperly escaped, thus
> the LZO rule works as intended.
> And we avoid rebuilds when not required
> 
> Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
> ---
>  scripts/Kbuild.include | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
> index 310dcdc94..fb3fa88fb 100644
> --- a/scripts/Kbuild.include
> +++ b/scripts/Kbuild.include
> @@ -205,11 +205,13 @@ else
>  arg-check = $(if $(strip $(cmd_$@)),,1)
>  endif
>  
> -# >'< substitution is for echo to work,
> -# >$< 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 \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1))))))
> +# Replace >$< with >$$< to preserve $ when reloading the .cmd file
> +# (needed for make)
> +# Replace >#< with >\#< to avoid starting a comment in the .cmd file
> +# (needed for make)
> +# Replace >'< with >'\''< to be able to enclose the whole string in '...'
> +# (needed for the shell)
> +make-cmd = $(call escsq,$(subst \#,\\\#,$(subst $$,$$$$,$(cmd_$(1)))))
>  

This doesn't work for me. Without this patch I do not see any rebuilds
of lzo files, but with this patch I do.

Seems you are using another shell, dash vs. bash? Porting the second
hunk of the kernel commit 164f0d2efaaef83 fixes it for me.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux