Re: [PATCH] X.509: Fix certificate gathering again
From: Michal Marek
Date: Fri Feb 20 2015 - 17:10:20 EST
On Fri, Feb 20, 2015 at 02:52:14PM +0100, Michal Marek wrote:
> On 2015-02-19 13:26, David Howells wrote:
> > Michal Marek <mmarek@xxxxxxx> wrote:
> >> +X509_CERTIFICATES-y := $(wildcard *.x509)
> >> +ifneq ($(objtree),$(srctree))
> >> +X509_CERTIFICATES-y += $(wildcard $(srctree)/*.x509)
> >> +endif
> >> +X509_CERTIFICATES-$(CONFIG_MODULE_SIG) += signing_key.x509
> >> +X509_CERTIFICATES := $(sort $(X509_CERTIFICATES-y))
> > What will happen if there's a "signing_key.x509" in the source tree when O= is
> > used?
> It will fail. So the patch needs more work, thanks for the review.
OK, this works for me and I finally understand why :). The problem is
that whatever file make sees (as a target or dependency) first, it will
prefer it for the purpose of VPATH search, so the right signing_key.x509
must come first. Unfortunately, using 'vpath %.x509' does not do the
trick, because this merely says not to use any special VPATH for files
matching this pattern, but it does not avoid the global VPATH.