[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 22/29] qapi: Generate separate .h, .c for eac

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.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
GENERATED_FILES += $(addprefix qapi/qapi-types-,$(addsuffix

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.


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]