All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: qemu-devel@nongnu.org
Cc: Daniel Jacobowitz <dan@codesourcery.com>
Subject: [Qemu-devel] [PATCH] Fix a parallel build failure.
Date: Wed,  4 Nov 2009 15:20:09 -0500	[thread overview]
Message-ID: <1257366009-7057-1-git-send-email-drow@false.org> (raw)

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

             reply	other threads:[~2009-11-04 20:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04 20:20 Daniel Jacobowitz [this message]
2009-11-04 20:48 ` [Qemu-devel] [PATCH] Fix a parallel build failure Stefan Weil
2009-11-04 20:58   ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1257366009-7057-1-git-send-email-drow@false.org \
    --to=drow@false.org \
    --cc=dan@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.