[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 09/11] qapi: add qapi-errors.py
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 09/11] qapi: add qapi-errors.py |
Date: |
Thu, 26 Jul 2012 06:42:34 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
On 07/26/2012 06:38 AM, Eric Blake wrote:
>>> Paolo, Eric, maybe you can provide advice on how to best tell make that
>>> a recipe generates multiple files.
>>
>> Hmm, I would just do
>>
>> qapi-errors.h: qapi-errors.c
>> qapi-errors.c: $(SRC_PATH)/qapi-schema-errors.json
>> $(SRC_PATH)/scripts/qapi-errors.py
>> $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-errors.py -o
>> "." < $<, " GEN $@")
>>
>> I think that's what I usually saw for bison (which creates both .h and .c).
>
> Indeed, per
> https://www.gnu.org/software/automake/manual/automake.html#Multiple-Outputs,
> that is an appropriate solution for a 2-file generation.
Or, since we depend on GNU make, we can use pattern rules instead
(untested):
%-errors.h %-errors.c: \
%(SRC_PATH)/%-schema-errors.json $(SRC_PATH)/srcipts/%-errors.py
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-errors.py -o
"." < $<, " GEN $@")
https://www.gnu.org/software/automake/manual/make.html#Pattern-Examples
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
Re: [Qemu-devel] [PATCH 09/11] qapi: add qapi-errors.py, Markus Armbruster, 2012/07/26
[Qemu-devel] [PATCH 03/11] qerror: rename QERR_QMP_EXTRA_MEMBER, Luiz Capitulino, 2012/07/25
[Qemu-devel] [PATCH 08/11] qapi: add qapi-schema-errors.json, Luiz Capitulino, 2012/07/25
[Qemu-devel] [PATCH 04/11] qerror: rename QERR_PROPERTY_VALUE_NOT_POWER_OF_2, Luiz Capitulino, 2012/07/25
[Qemu-devel] [PATCH 11/11] scripts: update check-qerror.sh, Luiz Capitulino, 2012/07/25