[Buildroot] [PATCH v2 2/2] Makefile: pass host PKG_CONFIG_PATH at "make menuconfig" time
Yann E. MORIN
yann.morin.1998 at free.fr
Fri Jan 2 21:39:13 UTC 2015
Bjørn, All,
On 2015-01-02 22:28 +0100, Bjørn Forsman spake thusly:
> On 2 January 2015 at 17:16, Yann E. MORIN <yann.morin.1998 at free.fr> wrote:
> > 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.
[--SNIP--]
> >> @@ -692,7 +693,10 @@ export HOSTCFLAGS
> >>
> >> $(BUILD_DIR)/buildroot-config/%onf:
> >> mkdir -p $(@D)/lxdialog
> >> - $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
> >> + (export PKG_CONFIG_PATH=$(HOST_PKG_CONFIG_PATH); \
> >> + $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" \
> >> + obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F) \
> >> + )
> >
> > Well, you do not need this convoluted sub-shell. Just pass the variable
> > as a make option:
> >
> > $(MAKE) PKG_CONFIG_PATH=$(HOST_PKG_CONFIG_PATH) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
>
> I tested that. It doesn't work. I guess when the variable is given on
> the command line to make (not 'exported') it is not available to
> sub-processes that make spawns.
In that case, just put it in front of it, like:
PKG_CONFIG_PATH=$(HOST_PKG_CONFIG_PATH) $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
This will put PKG_CONFIG_PATH in the environment just for the duration
of the sub-make.
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. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list