Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/3] Add CONF_ENABLE and CONF_PKG_ENABLE helper functions
@ 2012-04-28 21:16 Arnout Vandecappelle
  2012-04-28 21:16 ` [Buildroot] [PATCH 1/3] pkg-infra: add " Arnout Vandecappelle
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Arnout Vandecappelle @ 2012-04-28 21:16 UTC (permalink / raw)
  To: buildroot

 Many packages have the following type of construct:

ifeq ($(BR2_PACKAGE_ACL),y)
       SYSTEMD_CONF_OPT += --enable-acl
       SYSTEMD_DEPENDENCIES += acl
else
       SYSTEMD_CONF_OPT += --disable-acl
endif

 The first patch in this series abbreviates that to

$(eval $(call CONF_PKG_ENABLE,SYSTEMD,acl))

 It makes it possible to abbreviate similar constructs as well.

 The main advantage I see is not so much that the .mk files get
shorter, but more importantly that it's easier to keep things consistent,
e.g. making sure that --enable and --disable are always given explicitly.

 The second and the third patch are examples of how this can be used in
practice.  I've chosen two random packages that have a lot of these
--enable/--disable options.  Once the main implementation is accepted
I'll probably start to convert some more packages.


 Note: I don't particularly like the way the call statement looks, but
I couldn't find a better way to do it.  Suggestions are definitely
welcome!


 Regards,
 Arnout

----------------------------------------------------------------
Arnout Vandecappelle (Essensium/Mind) (3):
      pkg-infra: add CONF_ENABLE and CONF_PKG_ENABLE helper functions
      avahi: use CONF_ENABLE and CONF_PKG_ENABLE
      cairo: use CONF_ENABLE and CONF_PKG_ENABLE

 package/avahi/avahi.mk     |   34 +++++-----------------------------
 package/cairo/cairo.mk     |   44 ++++++--------------------------------------
 package/pkg-autotargets.mk |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+), 67 deletions(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-05-12 14:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-28 21:16 [Buildroot] [PATCH 0/3] Add CONF_ENABLE and CONF_PKG_ENABLE helper functions Arnout Vandecappelle
2012-04-28 21:16 ` [Buildroot] [PATCH 1/3] pkg-infra: add " Arnout Vandecappelle
2012-04-28 21:16 ` [Buildroot] [PATCH 2/3] avahi: use CONF_ENABLE and CONF_PKG_ENABLE Arnout Vandecappelle
2012-04-28 21:16 ` [Buildroot] [PATCH 3/3] cairo: " Arnout Vandecappelle
2012-05-07 14:21 ` [Buildroot] [PATCH 0/3] Add CONF_ENABLE and CONF_PKG_ENABLE helper functions Thomas Petazzoni
2012-05-09  8:06   ` Thomas De Schampheleire
2012-05-09  9:35     ` Peter Korsgaard
2012-05-11 22:29   ` Arnout Vandecappelle
2012-05-12  9:03     ` Samuel Martin
2012-05-12 11:42       ` Thomas Petazzoni
2012-05-12 11:05     ` Thomas Petazzoni
2012-05-12 14:47       ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox