From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE}
Date: Tue, 18 Sep 2012 19:55:18 +0200 [thread overview]
Message-ID: <20120918195518.163c409d@skate> (raw)
In-Reply-To: <1347836276-24262-11-git-send-email-yann.morin.1998@free.fr>
Dear Yann E. MORIN,
On Mon, 17 Sep 2012 00:57:55 +0200, Yann E. MORIN wrote:
> Introduce two new blind config options:
> - BR2_NEEDS_GETTEXT
> selects the gettext package if the toolchain does not provide it
> - BR2_NEEDS_GETTEXT_IF_LOCALE
> ditto, but only if locales are enabled
>
> Packages can then select either if they require gettext (resp. if locales
> are enabled).
>
> This will simplify the packages Config.in by no longer requiring that the
> 'select' be conditional, thus hiding the gory details out of packages,
> which don't really need to know about those details.
Nice.
> Also, introduce four new Makefile variables:
> - $(gettext)
> contains the needed dependencies for pacakges that need gettext
> functioanlity: 'gettext' if the gettext pacakge is needed, empty
> otherwise
> - $(gettext-if-locale)
> ditto, but only if locales are enabled
> - $(gettext-LDFLAGS)
> contains the required LDFLAGS ("-lintl") if gettext is provided by
> the gettext package, empty otherwise
> - $(gettext-LDFLAGS-if-locale)
> ditto, but only if locales are enabled
>
> Packages can then add either variable to their own LDFLAGS.
I am happy about the entire patch set, except those $(gettext),
$(gettext-if-locale), $(gettext-LDFLAGS) and
$(gettext-LDFLAGS-if-locale) variables. Even though they admittedly
make the code a bit shorter, I think they needlessly hide what is
really happening. I very much prefer an explicit:
FOO_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext)
(which doesn't use any special construct)
rather than the more strange:
FOO_DEPENDENCIES += $(gettext)
I know I'm annoying by rejecting many new additional constructs, but I
think such constructs are crossing the boundary of shortness vs.
readability.
Of course, this is only my opinion, and if others are strongly in
favor of this approach, then I'll learn to live with it, but I think
it's a dangerous direction for the readability of .mk files. If you
respin your patch set without those constructs, you'll have my Acked-by
on the whole thing.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2012-09-18 17:55 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-16 22:57 [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 01/11] gettext: remove option to build statically Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 02/11] gettext: remove the gettext-target make target, unused Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 03/11] gettext: remove libintl handling Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 04/11] Remove all references to libintl Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 05/11] gettext: convert to autotools-package Yann E. MORIN
2012-09-20 19:44 ` Arnout Vandecappelle
2012-09-20 19:46 ` Arnout Vandecappelle
2012-09-21 6:33 ` Peter Korsgaard
2012-09-16 22:57 ` [Buildroot] [PATCH 06/11] doc: update after gettext changes Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 07/11] package/lshw: add missing dependency on gettext Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 08/11] package/pulseaudio: fix build-dependency " Yann E. MORIN
2012-09-18 17:58 ` Thomas Petazzoni
2012-09-18 20:45 ` Yann E. MORIN
2012-09-16 22:57 ` [Buildroot] [PATCH 09/11] toolchain/common: rename BR2_NEEDS_GETTEXT Yann E. MORIN
2012-09-20 22:21 ` Arnout Vandecappelle
2012-09-21 5:10 ` Thomas Petazzoni
2012-09-16 22:57 ` [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE} Yann E. MORIN
2012-09-18 17:55 ` Thomas Petazzoni [this message]
2012-09-18 21:16 ` Samuel Martin
2012-09-18 21:28 ` Yann E. MORIN
2012-09-20 18:53 ` Thomas Petazzoni
2012-09-20 22:29 ` Arnout Vandecappelle
2012-09-20 22:24 ` Arnout Vandecappelle
2012-09-21 5:13 ` Thomas Petazzoni
2012-09-16 22:57 ` [Buildroot] [PATCH 11/11] packages: use the new gettext mechanism Yann E. MORIN
2012-09-18 21:17 ` [Buildroot] [PATCH 0/11 v3] Rework the gettext handling Samuel Martin
2012-09-19 21:11 ` Arnout Vandecappelle
2012-09-19 22:53 ` Arnout Vandecappelle
2012-09-20 16:50 ` Yann E. MORIN
2012-09-20 18:47 ` Thomas Petazzoni
2012-09-20 18:49 ` Thomas Petazzoni
2012-09-20 19:42 ` Peter Korsgaard
-- strict thread matches above, loose matches on Subject: below --
2012-09-03 22:02 [Buildroot] [PATCH 0/11 v2] " Yann E. MORIN
2012-09-03 22:03 ` [Buildroot] [PATCH 10/11] toolchain/common: introduce blind options BR2_NEEDS_GETTEXT{, _IF_LOCALE} Yann E. MORIN
2012-09-16 10:17 ` 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=20120918195518.163c409d@skate \
--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