On 02/23/2018 11:41 AM, Markus Armbruster wrote:

+++ b/Makefile
@@ -92,10 +92,70 @@ include $(SRC_PATH)/rules.mak
   GENERATED_FILES = qemu-version.h config-host.h qemu-options.def
   GENERATED_FILES += qapi-builtin-types.h qapi-builtin-types.c
   GENERATED_FILES += qapi-types.h qapi-types.c
+GENERATED_FILES += qapi/qapi-types-block-core.h qapi/qapi-types-block-core.c

For the makefile, I'd suggest using an intermediate list of module
names, and then using make string operations to expand it into larger
lists, to cut down on the repetition.  Something like (untested):

QAPI_MODULES = block-core block char common ...
GENERATED_FILES += $(addprefix qapi/qapi-types-,$(addsuffix
.c,$(QAPI_MODULES))
GENERATED_FILES += $(addprefix qapi/qapi-types-,$(addsuffix
.h,$(QAPI_MODULES))

I did it the stupid way to save time.  Improvements welcome :)


+++ b/Makefile.objs
@@ -3,8 +3,56 @@
   stub-obj-y = stubs/ crypto/
   util-obj-y = util/ qobject/ qapi/
   util-obj-y += qapi-builtin-types.o
+util-obj-y += qapi-types.o
+util-obj-y += qapi/qapi-types-block-core.o

Perhaps this can also exploit make text manipulation?

Otherwise looks good.

Thanks!

At this point, I'll take your patch as-is, and worry about improvements as followups.

Reviewed-by: Eric Blake <[email protected]>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to