Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/7 v4] support/dependencies: check for system-provided bison and flex
Date: Sat, 18 Aug 2018 23:17:58 +0200	[thread overview]
Message-ID: <20180818231758.69bc7209@windsurf> (raw)
In-Reply-To: <d9d77c26d35f7ccfe57e53ce930189ec29980e92.1534522005.git.yann.morin.1998@free.fr>

Hello,

On Fri, 17 Aug 2018 18:06:48 +0200, Yann E. MORIN wrote:
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> ---
>  support/dependencies/check-host-bison-flex.mk | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>  create mode 100644 support/dependencies/check-host-bison-flex.mk
> 
> diff --git a/support/dependencies/check-host-bison-flex.mk b/support/dependencies/check-host-bison-flex.mk
> new file mode 100644
> index 0000000000..233b6c51cc
> --- /dev/null
> +++ b/support/dependencies/check-host-bison-flex.mk
> @@ -0,0 +1,10 @@
> +# If the system lacks bison or flex, add
> +# dependencies to suitable host packages
> +
> +ifeq ($(shell which bison 2>/dev/null),)
> +BR2_BISON_HOST_DEPENDENCY = host-bison
> +endif
> +
> +ifeq ($(shell which flex 2>/dev/null),)
> +BR2_FLEX_HOST_DEPENDENCY = host-flex
> +endif

This solution (which differs from what we do for other dependencies,
that are using suitable-host-package) has a drawback: it shows stderr
on the terminal, despite the 2>/dev/null:

$ make
which: no bison in (/usr/local/bin:/usr/bin:/bin:/home/thomas/.rvm/bin:/usr/local/sbin:/usr/sbin:/home/thomas/.rvm/bin:/home/thomas/sys/bin:/home/thomas/.gem/ruby/2.1.0/bin:/home/thomas/.rvm/bin)

I'm not sure why this happens.

Even though it's a bit verbose in code, perhaps we should stick to the
existing model, and introduce check-host-bison.sh check-host-bison.mk
check-host-flex.sh and check-host-flex.mk ?

Long term, maybe all those .mk files are a bit stupid, and we could
simply do the all make logic from dependencies.mk (but that's not for
master).

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-08-18 21:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-17 16:06 [Buildroot] [PATCH 0/7 v4] core/pkg-kconfig: ensure we have necessary tools to run configurators Yann E. MORIN
2018-08-17 16:06 ` [Buildroot] [PATCH 1/7 v4] linux: explain why we need host-{flex, bison} Yann E. MORIN
2018-08-18 21:13   ` Thomas Petazzoni
2018-08-17 16:06 ` [Buildroot] [PATCH 2/7 v4] support/dependencies: check for system-provided bison and flex Yann E. MORIN
2018-08-18 21:17   ` Thomas Petazzoni [this message]
2018-08-18 21:29     ` Thomas Petazzoni
2018-08-17 16:06 ` [Buildroot] [PATCH 3/7 v4] core/pkg-kconfig: allow dependencies before configurators Yann E. MORIN
2018-08-18 21:22   ` Thomas Petazzoni
2018-08-17 16:06 ` [Buildroot] [PATCH 4/7 v4] linux: kconfig may need host-{flex, bison} to build the configurators Yann E. MORIN
2018-08-17 16:06 ` [Buildroot] [PATCH 5/7 v4] linux: host-{flex, bison} only needed for DTS Yann E. MORIN
2018-08-17 16:06 ` [Buildroot] [PATCH 6/7 v4] linux: kconfig needs the toolchain Yann E. MORIN
2018-08-17 16:06 ` [Buildroot] [PATCH 7/7 v4] boot/uboot: needs host-{flex,bison} Yann E. MORIN
2018-09-13 19:04   ` Thomas Petazzoni
2018-08-20 14:10 ` [Buildroot] [PATCH 0/7 v4] core/pkg-kconfig: ensure we have necessary tools to run configurators 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=20180818231758.69bc7209@windsurf \
    --to=thomas.petazzoni@bootlin.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