qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix a parallel build failure.
@ 2009-11-04 20:20 Daniel Jacobowitz
  2009-11-04 20:48 ` Stefan Weil
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2009-11-04 20:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Daniel Jacobowitz

From: Daniel Jacobowitz <dan@codesourcery.com>

With enough parallelism, make will run all the dependencies of
build-all at the same time:

build-all: config-host.h config-all-devices.h $(DOCS) $(TOOLS)

So some of the $(TOOLS) will build before config-host.h is finished.
The object files need to depend on it explicitly.  Subdirectories are
OK since they are started from the body of build-all, not its
dependencies.

Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
---
 Makefile  |    2 ++
 rules.mak |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index c783aa4..ed9a420 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
 # Makefile for QEMU.
 
+GENERATED_HEADERS = config-host.h config-all-devices.h
+
 ifneq ($(wildcard config-host.mak),)
 # Put the all: rule here so that config-host.mak can contain dependencies.
 all: build-all
diff --git a/rules.mak b/rules.mak
index 5d7e8bb..4eb1f90 100644
--- a/rules.mak
+++ b/rules.mak
@@ -13,7 +13,7 @@ MAKEFLAGS += -rR
 
 QEMU_CFLAGS += -MMD -MP -MT $@
 
-%.o: %.c
+%.o: %.c $(GENERATED_HEADERS)
 	$(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) -c -o $@ $<,"  CC    $(TARGET_DIR)$@")
 
 %.o: %.S
-- 
1.6.5.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-04 20:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-04 20:20 [Qemu-devel] [PATCH] Fix a parallel build failure Daniel Jacobowitz
2009-11-04 20:48 ` Stefan Weil
2009-11-04 20:58   ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).