mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 4/4] build: fix that LZO file is always rebuilt
Date: Fri, 5 Jan 2018 11:49:46 +0100	[thread overview]
Message-ID: <20180105104946.m24p2h6ho774s5i4@pengutronix.de> (raw)
In-Reply-To: <20171226183653.GD28706@ravnborg.org>

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@ravnborg.org>
> 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@ravnborg.org>
> ---
>  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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-01-05 10:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-26 18:32 [PATCH 0/4] build: minimize rebuilds Sam Ravnborg
2017-12-26 18:35 ` [PATCH 1/4] build: fix that defaultenv is always rebuilt Sam Ravnborg
2017-12-26 18:36 ` [PATCH 2/4] build: fix that passwd.h is always built Sam Ravnborg
2017-12-26 18:36 ` [PATCH 3/4] build: fix that the bbenv file is always rebuilt Sam Ravnborg
2017-12-26 18:36 ` [PATCH 4/4] build: fix that LZO " Sam Ravnborg
2018-01-05 10:49   ` Sascha Hauer [this message]
2018-01-05 14:57     ` Sascha Hauer
2018-01-06  7:34       ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180105104946.m24p2h6ho774s5i4@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox