[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: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH 09/11] qapi: add qapi-errors.py |
Date: |
Thu, 26 Jul 2012 11:45:44 -0300 |
On Thu, 26 Jul 2012 13:55:29 +0200
Paolo Bonzini <address@hidden> wrote:
> Il 26/07/2012 13:50, Markus Armbruster ha scritto:
> >> > +qapi-errors.h 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'm afraid this isn't quite what you want. It's shorthand for two
> > separate rules with the same recipe[*]. Therefore, it's prone to run
> > the recipe twice, with make blissfully unaware that each of the two runs
> > clobbers the other file, too. Could conceivably lead to trouble with
> > parallel execution.
> >
> > 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've done this for v3, thanks for the suggestion.
>
> I think that's what I usually saw for bison (which creates both .h and .c).
>
> A perhaps cleaner alternative is to add a stamp file, and make both files
> depend on it.
>
> Paolo
>
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
[Qemu-devel] [PATCH 02/11] qerror: rename QERR_SOCK_CONNECT_IN_PROGRESS, Luiz Capitulino, 2012/07/25