[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH] qapi: Reduce Makefile boilerplat
From: |
Eric Blake |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PATCH] qapi: Reduce Makefile boilerplate |
Date: |
Thu, 15 Nov 2018 16:43:02 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 |
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