]> git.proxmox.com Git - qemu.git/commit - Makefile
Fix qapi code generation wrt parallel build
authorAvi Kivity <avi@redhat.com>
Tue, 27 Dec 2011 14:02:16 +0000 (16:02 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 27 Dec 2011 15:28:58 +0000 (09:28 -0600)
commit8d3bc5178fbc06cdd89c064ae8f44e77c503e91e
tree5a636844be70c13422856569e90f9e487141a5c5
parent4e1ea514f9b9f07358b84554dc3d35f533ec3971
Fix qapi code generation wrt parallel build

Make's multiple output syntax

  x.c x.h: x.template
       gen < x.template

actually invokes the command once for x.c and once for x.h (with differing $@
in each invocation).  During a parallel build, the two commands may be invoked
in parallel; this opens up a race, where the second invocation trashes a file
supposedly produced during the first, and now in use by a dependent command.

The various qapi code generators are susceptible to this; fix by making them
generate just one file per invocation.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Makefile
scripts/qapi-commands.py
scripts/qapi-types.py
scripts/qapi-visit.py