Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Ceresoli <luca@lucaceresoli.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1 of 6 v2] legal info: fix saving of host package licenses
Date: Mon, 11 Nov 2013 23:49:11 +0100	[thread overview]
Message-ID: <52815EE7.6020305@lucaceresoli.net> (raw)
In-Reply-To: <e07dc5f55104adb4a171.1381151708@argentina>

Thomas, All,

Thomas De Schampheleire wrote:
> Due to some tricky make behavior, the license texts of host packages that
> did not provide an explicit HOST_FOO_LICENSE_FILES definition was not saved.
> The problem is that you cannot correctly use a variable defined/updated
> inside a call'ed block as input to a foreach statement. If you try to use
> $(FOO) then only the original value of FOO is used for foreach, any update
> inside the call'ed block is ignored. However, if you use $$(FOO), the entire
> contents of FOO (typically a list of items) is passed as one item to
> foreach, thus causing just one iteration instead of several.
>
> To fix the problem, one should only use values in foreach that have not
> changed inside the call'ed block. In the case of (HOST_)FOO_LICENSE_FILES,
> this means repeating the checks for a valid HOST_FOO_X and using FOO_X as
> fallback.
>
> Additionally, a few empty lines have been added to the legal-info-foo block
> for clarity, as the amount of nested ifdef/ifeq statements have become very
> high.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

It is not clear to me whether this is a bug in make or something 
"intended". Do you have any more insight?

In either case, it's great you noticed and fixed it, thanks!

Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>

-- 
Luca

  parent reply	other threads:[~2013-11-11 22:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-07 13:15 [Buildroot] [PATCH 0 of 6 v2] legal info: split host and package output Thomas De Schampheleire
2013-10-07 13:15 ` [Buildroot] [PATCH 1 of 6 v2] legal info: fix saving of host package licenses Thomas De Schampheleire
2013-11-11 11:56   ` Thomas De Schampheleire
2013-11-11 22:49   ` Luca Ceresoli [this message]
2013-11-12  7:12   ` Arnout Vandecappelle
2013-11-12  8:25     ` Thomas De Schampheleire
2013-10-07 13:15 ` [Buildroot] [PATCH 2 of 6 v2] legal info: split manifest for host and target Thomas De Schampheleire
2013-10-07 13:15 ` [Buildroot] [PATCH 3 of 6 v2] legal info: split license texts " Thomas De Schampheleire
2013-10-07 13:15 ` [Buildroot] [PATCH 4 of 6 v2] legal info: split sources " Thomas De Schampheleire
2013-10-07 13:15 ` [Buildroot] [PATCH 5 of 6 v2] legal info: cleanup utility functions Thomas De Schampheleire
2013-10-07 13:15 ` [Buildroot] [PATCH 6 of 6 v2] legal info: update documentation with split target/host output Thomas De Schampheleire
2013-11-11 11:57   ` Thomas De Schampheleire
2013-11-11 21:35     ` Samuel Martin

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=52815EE7.6020305@lucaceresoli.net \
    --to=luca@lucaceresoli.net \
    --cc=buildroot@busybox.net \
    /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