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

Reply via email to