From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 04/21 v2] core: commonalise the bundled and br2-external %_defconfig rules
Date: Mon, 26 Oct 2015 21:27:56 +0100 [thread overview]
Message-ID: <562E8CCC.20505@mind.be> (raw)
In-Reply-To: <3b01a81ac78b8ca787b1e0308e819d8eb2ece1df.1445545973.git.yann.morin.1998@free.fr>
On 22-10-15 22:33, Yann E. MORIN wrote:
> The code for both cases is exactly the same, and only differs in the
> location where defconfig files are looked for.
>
> We use an intermediate macro to generate the corresponding rules,
> because directly generating the rules is ugly and needs lots of escaping
> and double-dollar-ing for the $(eval ...) and $(foreach ...) calls to
> play nicely together.
>
> Furthermore, that will be tremendously useful when we support multiple
> br2-external trees.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Peter Korsgaard <jacmet@uclibc.org>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> Cc: Arnout Vandecappelle <arnout@mind.be>
Bunch of small nits. I'm not giving it my reviewed-by yet because I'm not
convinced that this change really makes things clearer, so it only really
applies in function of the multi-external and for that I first have to see the
whole series.
> ---
> Makefile | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 60cea32..052f58a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -789,13 +789,12 @@ defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
> @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
>
> # Override the BR2_DEFCONFIG from COMMON_CONFIG_ENV with the new defconfig
This comment should go inside the define
> -%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
> - @$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(TOPDIR)/configs/$@ \
> - $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
> -
> -%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(BR2_EXTERNAL)/configs/%_defconfig outputmakefile
> - @$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(BR2_EXTERNAL)/configs/$@ \
> - $< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN)
> +define PERCENT_DEFCONFIG
The macros we've added recently were all lowercase, and I like it that way.
Regards,
Arnout
> +%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(1)/configs/%_defconfig outputmakefile
> + @$$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(1)/configs/$$@ \
> + $$< --defconfig=$(1)/configs/$$@ $$(CONFIG_CONFIG_IN)
> +endef
> +$(eval $(foreach d,$(TOPDIR) $(BR2_EXTERNAL),$(call PERCENT_DEFCONFIG,$(d))$(sep)))
>
> savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
> @$(COMMON_CONFIG_ENV) $< \
>
--
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: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
next prev parent reply other threads:[~2015-10-26 20:27 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 20:34 [Buildroot] [PATCH 0/21 v2] br2-external: support multiple trees at once (branch yem/multi-br2-external-5) Yann E. MORIN
2015-10-22 20:33 ` [Buildroot] [PATCH 01/21 v2] core: do not accept multiple definitions of a package Yann E. MORIN
2015-10-22 21:01 ` Arnout Vandecappelle
2015-10-22 21:09 ` Yann E. MORIN
2015-10-22 21:14 ` Arnout Vandecappelle
2015-10-23 19:39 ` Samuel Martin
2015-10-23 20:22 ` Yann E. MORIN
2015-11-03 22:41 ` Thomas Petazzoni
2015-10-22 20:33 ` [Buildroot] [PATCH 02/21 v2] docs/manual: document $(FOO_PKGDIR) Yann E. MORIN
2015-10-23 19:39 ` Samuel Martin
2015-10-23 20:25 ` Yann E. MORIN
2015-10-22 20:33 ` [Buildroot] [PATCH 03/21 v2] core: move pkg-utils.mk to support/ Yann E. MORIN
2015-10-22 21:10 ` Arnout Vandecappelle
2015-10-22 21:20 ` Yann E. MORIN
2015-10-26 20:12 ` Arnout Vandecappelle
2015-10-22 20:33 ` [Buildroot] [PATCH 04/21 v2] core: commonalise the bundled and br2-external %_defconfig rules Yann E. MORIN
2015-10-26 20:27 ` Arnout Vandecappelle [this message]
2015-10-26 20:56 ` Yann E. MORIN
2015-10-26 21:20 ` Arnout Vandecappelle
2015-10-22 20:34 ` [Buildroot] [PATCH 05/21 v2] core: remove .br-external on distclean Yann E. MORIN
2015-10-26 20:44 ` Arnout Vandecappelle
2015-11-03 22:42 ` Thomas Petazzoni
2015-10-22 20:34 ` [Buildroot] [PATCH 06/21 v2] docs/manual: do not override BR2_EXTERNAL Yann E. MORIN
2015-10-26 21:12 ` Arnout Vandecappelle
2015-11-03 22:42 ` Thomas Petazzoni
2015-10-22 20:34 ` [Buildroot] [PATCH 07/21 v2] doc/asciidoc: add possibility to define document dependencies Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 08/21 v2] core: introduce an intermediate rule before the configurators Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 09/21 v2] core: move rule to create basic directories Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 10/21 v2] core: introduce a generated kconfig snippet Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 11/21 v2] docs/manual: prepare-config can be used as a dependency of documents Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 12/21 v2] core: do not hard-code inclusion of br2-external in Kconfig Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 13/21 v2] core: get rid of our dummy br2-external tree Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 14/21 v2] core: introduce per br2-external ID Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 15/21 v2] core: handle .br-external in a make rule Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 16/21 v2] core: add support for multiple br2-external trees Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 17/21 v2] core: br2-external trees without ID can't be used with other trees Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 18/21 v2] support/scripts: teach gen-manual-lists about BR2_EXTERNAL Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 19/21 v2] docs/manual: include packages from BR2_EXTERNAL if set Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 20/21 v2] docs/manual: document the br2-external ID Yann E. MORIN
2015-10-23 7:40 ` Jeremy Rosen
2015-10-23 15:23 ` Yann E. MORIN
2015-10-22 20:34 ` [Buildroot] [PATCH 21/21 v2] docs/manual: document multi br2-external Yann E. MORIN
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=562E8CCC.20505@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox