From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, armbru@redhat.com, xiezhide@huawei.com,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qapi: Reduce Makefile boilerplate
Date: Thu, 15 Nov 2018 16:43:02 -0600 [thread overview]
Message-ID: <e772baf5-80eb-3690-1782-cb2d69302fe3@redhat.com> (raw)
In-Reply-To: <b600b483-0e46-5c2e-f52b-2f330ebaa5a7@redhat.com>
On 11/15/18 4:37 PM, Eric Blake wrote:
> I'm trying to do the same thing to Makefile.objs, but when I use:
>
> common-obj-y += $(QAPI_MODULES:%=qapi/qapi-commands-%.o)
>
> or the longer $(patsubst %,qapi,qapi-commands-%.o,$(QAPI_MODULES))
>
> both before and after the change, 'make print-common-obj-y | grep qapi'
> returns identical content, but after the change, the linker fails with:
>
>
> So something about variable expansions is NOT playing nicely with our
>
> dummy := $(call unnest-vars,, \
> stub-obj-y \
> chardev-obj-y \
> ...
> common-obj-y \
Aha - the problem is that $(QAPI_MODULES) is empty at the time
unnest-vars tries to slurp in Makefile.objs, while it was non-empty at
the time that Makefile directly includes it. Moving the definition of
QAPI_MODULES into Makefile.objs solves that. v2 coming up.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
prev parent reply other threads:[~2018-11-15 22:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 21:54 [Qemu-devel] [PATCH] qapi: Reduce Makefile boilerplate Eric Blake
2018-11-15 22:37 ` Eric Blake
2018-11-15 22:43 ` Eric Blake [this message]
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=e772baf5-80eb-3690-1782-cb2d69302fe3@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=xiezhide@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).