[Buildroot] [PATCH 06/10] autotools: allow host package to use <pkg>_MAKE_ENV and <pkg>_MAKE

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Jan 25 07:55:33 UTC 2011


On Mon, 24 Jan 2011 22:04:35 +0100
Peter Korsgaard <jacmet at uclibc.org> wrote:

> Hmm, I don't really like this. Packages might be adding target specific
> stuff to their $PKG_MAKE_ENV - E.G.:
> 
> lvm2/lvm2.mk:LVM2_MAKE_ENV = CC="$(TARGET_CC)"
> 
> Wouldn't it make more sense to add a HOST_$PKG_MAKE_ENV and use it just
> like we do for $PKG_MAKE_ENV (E.G. at build and install time)?

$$(PKG) is already HOST_FOOBAR. So, when I do:

$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) -C $$($$(PKG)_SRCDIR) install

it gets expanded to

$(HOST_MAKE_ENV) $(HOST_<pkg>_MAKE_ENV) $(HOST_<pkg>_MAKE) -C $(HOST_<pkg>_SRCDIR) install

See how $(PKG) is defined:

$$($(2)_TARGET_INSTALL_HOST):           PKG=$(2)

And $(2) is :

#  argument 2 is the uppercase package name, including an HOST_ prefix
#             for host packages

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the buildroot mailing list