From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv2 2/4] core: allow external Config.in/makefile code to be integrated
Date: Mon, 16 Sep 2013 23:39:34 +0200 [thread overview]
Message-ID: <52377A96.8080402@mind.be> (raw)
In-Reply-To: <1379185433-8770-3-git-send-email-thomas.petazzoni@free-electrons.com>
On 14/09/13 21:03, Thomas Petazzoni wrote:
> This commit allows the BR2_EXTERNAL directory to contain Config.in and
> Makefile code, which gets integrated into the Buildroot build logic:
>
> - Buildroot automatically includes the $BR2_EXTERNAL/Config.in in the
> top-level configuration menu.
>
> - Buildroot automatically includes the BR2_EXTERNAL/external.mk in
> the build logic, so it can for example be used to include other .mk
> files that define package recipes.
>
> We also add a dummy Config.in file in support/dummy-external/ to
> ensure that the source "$BR2_EXTERNAL/Config.in" line will point to an
> existing file even when BR2_EXTERNAL is not used by the user.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> Config.in | 2 ++
> Makefile | 4 ++++
> support/dummy-external/Config.in | 0
> 3 files changed, 6 insertions(+)
> create mode 100644 support/dummy-external/Config.in
>
> diff --git a/Config.in b/Config.in
> index 522eaf8..9ef5466 100644
> --- a/Config.in
> +++ b/Config.in
> @@ -465,3 +465,5 @@ source "boot/Config.in"
> source "package/Config.in.host"
>
> source "Config.in.legacy"
> +
> +source "$BR2_EXTERNAL/Config.in"
I would prefer this to be in package/Config.in, and source
$BR2_EXTERNAL/package/Config.in. I think 95% of the use cases will be for
packages, and the other 5% are bootloaders which are the same as packages
anyway. And even if it is not a proper generic package (e.g. it's a
filesystem), putting it in the packages menu doesn't hurt that much. If
you don't put it in the package subdirectory, then you either force users
to create a oneline Config.in, or you end up with a messy looking
directory mixing packages with the configs/ and board/ directories.
Also it is perhaps better to add to the Makefile:
ifeq ($(wildcard $(BR2_EXTERNAL)/package/Config.in,)
EXTERNAL_PACKAGE_CONFIG_IN = support/dummy-external/Config.in
else
EXTERNAL_PACKAGE_CONFIG_IN = $(BR2_EXTERNAL)/package/Config.in
endif
(and pass that to the config env as well).
That way, you're not obliged to have a Config.in in your external tree,
and it is still possible to use it for nothing more than the defconfigs etc.
> diff --git a/Makefile b/Makefile
> index 13ad342..bea5ad5 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -348,6 +348,10 @@ include boot/common.mk
> include linux/linux.mk
> include system/system.mk
>
> +ifeq ($(BR2_EXTERNAL_USED),y)
> +include $(BR2_EXTERNAL)/external.mk
Here I'd
-include $(sort $(wildcard $(BR2_EXTERNAL)/package/*/*.mk))
Regards,
Arnout
> +endif
> +
> TARGETS+=target-finalize
>
> ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
> diff --git a/support/dummy-external/Config.in b/support/dummy-external/Config.in
> new file mode 100644
> index 0000000..e69de29
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
next prev parent reply other threads:[~2013-09-16 21:39 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-14 19:03 [Buildroot] [PATCHv2 0/4] Add a BR2_EXTERNAL mechanism Thomas Petazzoni
2013-09-14 19:03 ` [Buildroot] [PATCHv2 1/4] core: introduce the BR2_EXTERNAL variable Thomas Petazzoni
2013-09-16 16:34 ` Ryan Barnett
2013-09-16 18:34 ` Thomas Petazzoni
2013-09-16 21:30 ` Arnout Vandecappelle
2013-09-17 4:26 ` Thomas Petazzoni
2013-09-17 6:10 ` Arnout Vandecappelle
2013-09-17 18:47 ` Thomas Petazzoni
2013-09-23 20:39 ` Ryan Barnett
2013-09-23 22:17 ` Samuel Martin
2013-09-23 22:30 ` Ryan Barnett
2013-09-23 22:41 ` [Buildroot] [PATCH] core: introduce the BR2_EXTERNAL variable (additional patch to fix manual build) Samuel Martin
2013-09-24 5:47 ` [Buildroot] [PATCHv2 1/4] core: introduce the BR2_EXTERNAL variable Thomas Petazzoni
2013-09-24 8:46 ` Samuel Martin
2013-09-14 19:03 ` [Buildroot] [PATCHv2 2/4] core: allow external Config.in/makefile code to be integrated Thomas Petazzoni
2013-09-16 21:39 ` Arnout Vandecappelle [this message]
2013-09-17 4:29 ` Thomas Petazzoni
2013-09-14 19:03 ` [Buildroot] [PATCHv2 3/4] core: allow external defconfigs to be used Thomas Petazzoni
2013-09-16 21:40 ` Arnout Vandecappelle
2013-09-14 19:03 ` [Buildroot] [PATCHv2 4/4] docs/manual: add explanations about BR2_EXTERNAL Thomas Petazzoni
2013-09-14 19:32 ` Simon Dawson
2013-09-14 19:39 ` [Buildroot] [PATCHv2 0/4] Add a BR2_EXTERNAL mechanism Simon Dawson
2013-09-14 19:55 ` Thomas Petazzoni
2013-09-14 20:04 ` Simon Dawson
2013-09-14 22:30 ` Yann E. MORIN
2013-09-15 5:17 ` Thomas Petazzoni
2013-09-16 20:38 ` Arnout Vandecappelle
2013-09-17 4:37 ` Thomas Petazzoni
2013-09-17 6:07 ` Arnout Vandecappelle
2013-09-17 14:56 ` rjbarnet at rockwellcollins.com
2013-10-01 0:06 ` Ryan Barnett
2013-11-24 20:20 ` Yann E. MORIN
2013-11-26 13:20 ` Thomas Petazzoni
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=52377A96.8080402@mind.be \
--to=arnout@mind.be \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.