From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] autotools: add with/without and enable/disable helpers
Date: Fri, 19 Nov 2010 10:56:10 +0100 [thread overview]
Message-ID: <20101119105610.2c393dc1@surf> (raw)
In-Reply-To: <201011190320.21230.vapier@gentoo.org>
Hello Mike,
All your patches are well appreciated. However, I feel some
aggressiveness in your replies, which I don't really understand. Again,
I really do appreciate all those improvements, so can we keep the
discussion nice and friendly ?
On Fri, 19 Nov 2010 03:20:18 -0500
Mike Frysinger <vapier@gentoo.org> wrote:
> not really. this is the whole point of make's lazy evaluation. so
> unless somewhere the code is wrongly using ":=", these shouldnt be
> executed unless the configure script in question is actually run. a
> simple test on my side says that it is working as i expect -- lazily.
Right. The case I was mentionning was the UPPERCASE macro which was use
directly in the $(eval $(call AUTOTARGETS,...)) of each package. So,
this macro was actually evaluated when make was parsing all
packages .mk files. But that's different from the current case, you're
right.
> > It'd be nicer if we could use a pure Makefile implementation. What
> > about a simpler :
> >
> > USE_WITH = $(if $(BR2_$(1)),--with-$(2),--without-$(2))
> > USE_ENABLE = $(if $(BR2_$(1),--enable-$(2),--disable-$(2)))
>
> this isnt functionally equivalent ... there is no support for the
> optional [=val] with the flag
Ah, correct, I missed that. So, what about:
USE_WITH = $(if $(BR2_$(1)), \
$(if $(3), \
--with-$(2)=$(3), \
--with-$(2) \
), \
--without-$(2))
USE_ENABLE = $(if $(BR2_$(1)), \
$(if $(3), \
--enable-$(2)=$(3), \
--enable-$(2) \
), \
--disable-$(2))
It's not that I'm against using the shell, but for this particular
macro, the make language seems to be quite appropriate.
And it'd be nice to add some words in the documentation about this as
well (but I can do that later on if you wish).
> this is due to poor design on the behalf of buildroot. it really
> needs to adopt more Kconfig style and do stuff like:
> foo-y =
> foo-$(BR2_xxx) += libpng
I'm for sure open to improvements/changes in the package
infrastructure. For which variables should we use this ? I'm thinking
of all "cumulative" variables. So in the generic infrastructure:
<pkg>_DEPENDENCIES
<pkg>_POST_PATCH_HOOKS
<pkg>_PRE_CONFIGURE_HOOKS
<pkg>_POST_CONFIGURE_HOOKS
<pkg>_POST_BUILD_HOOKS
<pkg>_POST_INSTALL_HOOKS
<pkg>_POST_INSTALL_STAGING_HOOKS
<pkg>_POST_INSTALL_TARGET_HOOKS
and for the autotools packages, also:
<pkg>_CONF_ENV
<pkg>_CONF_OPT
<pkg>_MAKE_ENV
<pkg>_MAKE_OPT
<pkg>_AUTORECONF_OPT
<pkg>_INSTALL_STAGING_OPT
<pkg>_INSTALL_TARGET_OPT
<pkg>_CLEAN_OPT
<pkg>_UNINSTALL_STAGING_OPT
<pkg>_UNINSTALL_TARGET_OPT
For all those variable, we would take into account:
<pkg>_<varname> (for compatibility reasons)
and
<pkg>_<varname>-y
Does that sounds like what you're suggesting ?
> and again, please retain cc in replies
Sorry, done this time. But I may well forget again in the future, I'm
not used to retain cc in replies. Will try my best to not forget it.
Thanks again!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101119/17a8b208/attachment.pgp>
next prev parent reply other threads:[~2010-11-19 9:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-19 4:33 [Buildroot] [PATCH] autotools: add with/without and enable/disable helpers Mike Frysinger
2010-11-19 7:55 ` Thomas Petazzoni
2010-11-19 8:20 ` Mike Frysinger
2010-11-19 9:56 ` Thomas Petazzoni [this message]
2010-11-19 10:07 ` Mike Frysinger
2010-11-19 10:23 ` [Buildroot] [PATCH v2] " Mike Frysinger
2010-11-19 11:13 ` Thomas Petazzoni
2010-11-19 11:24 ` Mike Frysinger
2010-11-19 12:49 ` Paulius Zaleckas
2010-11-19 23:25 ` Mike Frysinger
2010-11-20 2:37 ` [Buildroot] [PATCH v3] " Mike Frysinger
2010-11-20 3:47 ` Mike Frysinger
-- strict thread matches above, loose matches on Subject: below --
2011-03-28 8:35 [Buildroot] [PATCH] " Mike Frysinger
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=20101119105610.2c393dc1@surf \
--to=thomas.petazzoni@free-electrons.com \
--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