From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] Makefile: pass host PKG_CONFIG_PATH at "make menuconfig" time
Date: Fri, 2 Jan 2015 22:43:25 +0100 [thread overview]
Message-ID: <20150102214325.GC24182@free.fr> (raw)
In-Reply-To: <CAEYzJUEcE-ihJCMCWSdhC7W=8fTT2Mnb-ACSE7ha7SwAAHAECg@mail.gmail.com>
Bj?rn, All,
On 2015-01-02 22:34 +0100, Bj?rn Forsman spake thusly:
> On 2 January 2015 at 22:28, Bj?rn Forsman <bjorn.forsman@gmail.com> wrote:
> > On 2 January 2015 at 17:16, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> >> Bj?rn, All,
> >>
> >> On 2015-01-01 21:54 +0100, Bj?rn Forsman spake thusly:
> >>> Buildroot unexports PKG_CONFIG_PATH in the top-level Makefile for purity
> >>> reasons. But it has an unfortunate side-effect in that "make menuconfig"
> >>> will not (necessarily) be able to pick up ncurses via host pkg-config,
> >>> breaking "make menuconfig" on systems where ncurses is installed in a
> >>> non-standard location.
> >>>
> >>> This patch saves the original PKG_CONFIG_PATH variable in
> >>> HOST_PKG_CONFIG_PATH and restores the original PKG_CONFIG_PATH variable
> >>> only in the sub-processes that builds the various menuconfig/nconfig/...
> >>> targets.
> >>>
> >>> With this change, I am able to run "make menuconfig" on NixOS[1].
> >>>
> >>> [1]: http://nixos.org/
> >>>
> >>> Signed-off-by: Bj?rn Forsman <bjorn.forsman@gmail.com>
> >>> ---
> >>> Makefile | 6 +++++-
> >>> 1 file changed, 5 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/Makefile b/Makefile
> >>> index 5e0b4f2..2f1108f 100644
> >>> --- a/Makefile
> >>> +++ b/Makefile
> >>> @@ -264,6 +264,7 @@ export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD
> >>> export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
> >>>
> >>> # Make sure pkg-config doesn't look outside the buildroot tree
> >>> +export HOST_PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)
> >>
> >> I think you'd want to do an immediate assignment here, and not do an
> >> export (see below):
> >>
> >> HOST_PKG_CONFIG_PATH:=$(PKG_CONFIG_PATH)
> >
> > Will fix.
>
> Some comments. There are other HOST_* variables that are exported from
> the top-level Makefile. I guess that's why I used 'export' in the
> first place.
You're right. I believe export is not needed, but for consistency sake,
I understand you would want to use export on it.
Do with an export if you want, I won't complain much. ;-) But state in
the commit log that it is not strictly required for the current use-case,
and is here just for consistency with other similarly-named variables.
> For now, nobody but Buildroot itself uses
> HOST_PKG_CONFIG_PATH (well, when this patch gets in), but I can see a
> future where pkg-config is used within Buildroot for other host
> packages too. But it is of course trivial to add the "export" at any
> time :-)
Hey! :-)
Thanks!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2015-01-02 21:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-01 20:54 [Buildroot] [PATCH v2 0/2] Portability fixes for "make menuconfig" Bjørn Forsman
2015-01-01 20:54 ` [Buildroot] [PATCH v2 1/2] kconfig/lxdialog: get ncurses CFLAGS with pkg-config Bjørn Forsman
2015-01-02 16:12 ` Yann E. MORIN
2015-01-01 20:54 ` [Buildroot] [PATCH v2 2/2] Makefile: pass host PKG_CONFIG_PATH at "make menuconfig" time Bjørn Forsman
2015-01-02 16:16 ` Yann E. MORIN
2015-01-02 21:28 ` Bjørn Forsman
2015-01-02 21:34 ` Bjørn Forsman
2015-01-02 21:43 ` Yann E. MORIN [this message]
2015-01-02 21:39 ` Yann E. MORIN
2015-01-02 23:32 ` Bjørn Forsman
2015-01-02 16:17 ` [Buildroot] [PATCH v2 0/2] Portability fixes for "make menuconfig" Yann E. MORIN
2015-01-02 21:38 ` Bjørn Forsman
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=20150102214325.GC24182@free.fr \
--to=yann.morin.1998@free.fr \
--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.