|
From: | Eric Blake |
Subject: | Re: [Qemu-devel] [PATCH v2 22/29] qapi: Generate separate .h, .c for each module |
Date: | Mon, 26 Feb 2018 16:39:44 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
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.cFor 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.oPerhaps 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 <address@hidden> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |