[Buildroot] [PATCH 06/28] package: fix patching procedure for host packages

Peter Korsgaard jacmet at uclibc.org
Thu Jul 7 21:50:06 UTC 2011


>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> writes:

 Thomas> The patching procedure was using $($(NOHOSTPKG)_NAME) to find the name
 Thomas> of the package without the host- prefix for host packages, which is
 Thomas> needed to find the package directory and the prefix of the patches.

 Thomas> However, this $($(NOHOSTPKG)_NAME) variable is empty when there is
 Thomas> only an host variant for the package and no target variant for it.

 Thomas> Therefore, instead of using this $($(NOHOSTPKG)_NAME) variable, we now
 Thomas> use a new $(RAWNAME) variable, which is always the name of the package
 Thomas> without the host- prefix, even for host packages.

 Thomas> Thanks to Yann E. Morin for providing the tip on using patsubst
 Thomas> instead of subst.

RAWNAME does fall a bit outside the "namespace" used by the other
variables here, but ok - Committed, thanks.


 Thomas> -$$($(2)_TARGET_PATCH):			NOHOSTPKG=$(3)
 Thomas> +$$($(2)_TARGET_PATCH):			RAWNAME=$(patsubst host-%,%,$(1))

Here's to hoping we'll never have a package called 'host' ;)

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list