From patchwork Thu Nov 5 13:42:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 37757 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 594281007D5 for ; Fri, 6 Nov 2009 00:57:45 +1100 (EST) Received: from localhost ([127.0.0.1]:47125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N62qM-0007Je-3v for incoming@patchwork.ozlabs.org; Thu, 05 Nov 2009 08:57:42 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N62ca-00030r-DS for qemu-devel@nongnu.org; Thu, 05 Nov 2009 08:43:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N62cT-0002yu-J8 for qemu-devel@nongnu.org; Thu, 05 Nov 2009 08:43:26 -0500 Received: from [199.232.76.173] (port=55384 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N62cS-0002ye-Nm for qemu-devel@nongnu.org; Thu, 05 Nov 2009 08:43:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9818) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N62cS-00066A-6u for qemu-devel@nongnu.org; Thu, 05 Nov 2009 08:43:20 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nA5Dh7PC005178; Thu, 5 Nov 2009 08:43:07 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nA5Dh3uF024648; Thu, 5 Nov 2009 08:43:06 -0500 From: Juan Quintela To: qemu-devel@nongnu.org Date: Thu, 5 Nov 2009 14:42:52 +0100 Message-Id: <7e084e942b3d74c4f5ec6f2628be8dc141119e5a.1257428255.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: dan@codesourcery.com Subject: [Qemu-devel] [PATCH 1/2] fix parallel build X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Based on a ideas of Daniel Jacobowitz + Stefan Weil Signed-off-by: Juan Quintela --- Makefile | 9 ++++++--- Makefile.target | 6 +++--- rules.mak | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index c783aa4..ce165b2 100644 --- a/Makefile +++ b/Makefile @@ -40,8 +40,9 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK) -include config-all-devices.mak -build-all: config-host.h config-all-devices.h $(DOCS) $(TOOLS) - $(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) recurse-all,) +GENERATED_HEADERS = config-host.h config-all-devices.h + +build-all: $(DOCS) $(TOOLS) recurse-all config-host.h: config-host.h-timestamp config-host.h-timestamp: config-host.mak @@ -67,7 +68,7 @@ romsubdir-%: ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) -recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) +recurse-all: $(GENERATED_HEADERS) $(SUBDIR_RULES) $(ROMSUBDIR_RULES) ####################################################################### # block-obj-y is code used by both qemu system emulation and qemu-img @@ -211,6 +212,8 @@ libqemu_common.a: $(obj-y) qemu-img.o: qemu-img-cmds.h +qemu-img.o qemu-nbd.o qemu-io.o: $(GENERATED_HEADERS) + qemu-img$(EXESUF): qemu-img.o qemu-tool.o $(block-obj-y) qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o $(block-obj-y) diff --git a/Makefile.target b/Makefile.target index fefd7ac..0673c55 100644 --- a/Makefile.target +++ b/Makefile.target @@ -22,6 +22,7 @@ endif endif PROGS=$(QEMU_PROG) +GENERATED_HEADERS = config-target.h config-devices.h LIBS+=-lm @@ -33,8 +34,7 @@ config-target.h-timestamp: config-target.mak config-devices.h: config-devices.h-timestamp config-devices.h-timestamp: config-devices.mak -all: config-target.h config-devices.h - $(call quiet-command, $(MAKE) $(PROGS),) +all: $(PROGS) # Dummy command so that make thinks it has done something @true @@ -308,7 +308,7 @@ endif # CONFIG_SOFTMMU obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o -$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) $(ARLIBS) +$(QEMU_PROG): $(GENERATED_HEADERS) $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) $(ARLIBS) $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)) 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