All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 02/10] core: add waf-package infra
Date: Fri, 18 Nov 2016 00:52:58 +0100	[thread overview]
Message-ID: <671071c5-0fba-8834-3837-7f7ff5cf82fa@mind.be> (raw)
In-Reply-To: <20161117000239.36cd4e77@free-electrons.com>



On 17-11-16 00:02, Thomas Petazzoni wrote:
> Hello,
> 
> On Sun, 30 Oct 2016 17:02:13 +0100, Yann E. MORIN wrote:
[snip]
>> +# If the package does not have its own waf, use our own.
>> +ifeq ($$($(2)_BUNDLED_WAF),NO)
> 
> Where is the default value of this variable defined? It seems it's not
> defined anywhere, while it should be set to "YES".
> 
> However, what I dislike a bit is the slightly "negative" logic of this
> variable. By default, we assume packages have their bundled version of
> waf, so this variable is by default assumed to be set to "YES" (even
> though in fact it's empty).
> 
> Only packages that do *NOT* have a bundled version of waf can set
> <pkg>_BUNDLED_WAF = NO, to tell the infrastructure to add a dependency
> on host-waf.
> 
> To me it feels a bit weird to:
> 
>  1. Have a boolean that defaults to YES and that can be overridden to
>     NO. I generally expects the opposite.
> 
>  2. Have a boolean that when set to "NO" actually asks the
>     infrastructure to do more things. I generally expects the opposite.

 We have a bunch of these already: _INSTALL_TARGET, _LIBTOOL_PATCH,
_REDISTRIBUTE, .... Actually, most of them default to YES and are overridden as
NO. It's just that the most popular one (_INSTALL_STAGING) defaults to NO so
you'd think that that one is the norm.

 The only unusual thing here is that the condition checks for NO, while usually
the condition checks for YES. But turning it around we make it an ifneq which is
also a negative.

 So I'd keep it like this.


> So, ideally, I'd like to invert this variable, but I can't really find
> a good name for it.
> 
> I propose <pkg>_NEEDS_WAF on IRC, but I'm not convinced because all
> packages need waf, either bundled or external.
> <pkg>_NEEDS_EXTERNAL_WAF ?
> 
> Anyone has some other proposal ?
> 
>> +# Dependency on host-python is done by host-waf
>> +$(2)_DEPENDENCIES += host-waf
>> +$(2)_WAF = $(HOST_DIR)/usr/bin/waf
>> +else
>> +# We need host-python to run the package's waf
>> +$(2)_DEPENDENCIES += host-python
>> +$(2)_WAF = ./waf
>> +endif
> 
> Here another point where I'm hesitating. host-waf doesn't really need
> to build-depend on host-python. It's *running* host-waf that requires
> host-python. So I'm wondering if we shouldn't:
> 
>  1. Remove the host-python dependency from host-waf
> 
>  2. In the first case above (no bundled waf), add to the package a
>     dependency on host-waf *and* host-python.
> 
> On IRC, you suggested that packages that depend on host-waf should not
> have to know host-python is needed to run it, which is fair point.

 Well, it makes sense to me that a package infra does something like that, but
less so that the waf package itself would do it. And it's just simpler if the
dependency is only in the infra.

 However, I wonder if we need this dependency at all. We already require a
python (although admittedly we don't check the version). The few packages that
don't support python3 can add the dependency themselves. Building host-python
really eats into the build time...


 Regards,
 Arnout

> 
> So I'm opening the question to others.
> 
>> +ifndef $(2)_MAKE
>> + ifdef $(3)_MAKE
>> +  $(2)_MAKE = $$($(3)_MAKE)
>> + else
>> +  $(2)_MAKE ?= $$(MAKE)
>> + endif
>> +endif
> 
> Is $(2)_MAKE used anywhere in this infrastructure?
> 
> Thomas
> 

-- 
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

  parent reply	other threads:[~2016-11-17 23:52 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
2016-10-30 16:02 ` [Buildroot] [PATCH 01/10] package/waf: new host package Yann E. MORIN
2016-10-30 16:21   ` Romain Naour
2016-12-02 22:55   ` Thomas Petazzoni
2016-10-30 16:02 ` [Buildroot] [PATCH 02/10] core: add waf-package infra Yann E. MORIN
2016-10-30 16:30   ` Romain Naour
2016-11-16 23:02   ` Thomas Petazzoni
2016-11-17 20:44     ` Yann E. MORIN
2016-11-17 23:54       ` Arnout Vandecappelle
2016-11-17 23:52     ` Arnout Vandecappelle [this message]
2016-11-18  8:45       ` Thomas Petazzoni
2016-11-25  7:16         ` Lionel Orry
2016-12-02 22:56   ` Thomas Petazzoni
2016-10-30 16:02 ` [Buildroot] [PATCH 03/10] docs/manual: document the " Yann E. MORIN
2016-10-30 16:31   ` Romain Naour
2016-11-16 23:04   ` Thomas Petazzoni
2016-11-17 20:47     ` Yann E. MORIN
2016-11-18  8:46       ` Thomas Petazzoni
2016-12-02 22:57   ` Thomas Petazzoni
2016-10-30 16:02 ` [Buildroot] [PATCH 04/10] developpers: add myself as pkg-waf devel Yann E. MORIN
2016-10-30 16:31   ` Romain Naour
2016-10-30 16:02 ` [Buildroot] [PATCH 05/10] package/glmark2: make it a waf-package Yann E. MORIN
2016-10-30 16:33   ` Romain Naour
2016-10-30 16:02 ` [Buildroot] [PATCH 06/10] package/gst1-imx: " Yann E. MORIN
2016-10-30 16:35   ` Romain Naour
2016-11-01 10:52     ` Gary Bisson
2016-10-30 16:02 ` [Buildroot] [PATCH 07/10] package/jack2: " Yann E. MORIN
2016-10-30 16:38   ` Romain Naour
2016-10-30 16:02 ` [Buildroot] [PATCH 08/10] package/libimxvpuapi: " Yann E. MORIN
2016-10-30 16:39   ` Romain Naour
2016-11-01 10:52     ` Gary Bisson
2016-10-30 16:02 ` [Buildroot] [PATCH 09/10] package/mpv: " Yann E. MORIN
2016-11-02 22:42   ` Romain Naour
2016-12-02 22:58   ` Thomas Petazzoni
2016-10-30 16:02 ` [Buildroot] [PATCH 10/10] package/norm: " Yann E. MORIN
2016-10-30 16:40   ` Romain Naour
2016-10-30 16:12 ` [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Romain Naour
2016-12-02 22:55 ` 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=671071c5-0fba-8834-3837-7f7ff5cf82fa@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.