From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLaGK-0001z5-T8 for qemu-devel@nongnu.org; Fri, 18 Dec 2009 05:40:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLaGG-0001xe-W6 for qemu-devel@nongnu.org; Fri, 18 Dec 2009 05:40:44 -0500 Received: from [199.232.76.173] (port=39294 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLaGG-0001xU-Ad for qemu-devel@nongnu.org; Fri, 18 Dec 2009 05:40:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11022) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLaGF-000280-TY for qemu-devel@nongnu.org; Fri, 18 Dec 2009 05:40:40 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBIAebDd014374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 18 Dec 2009 05:40:38 -0500 From: Paolo Bonzini Date: Fri, 18 Dec 2009 11:40:32 +0100 Message-Id: <1261132832-7688-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] fix tool/libuser makefile race List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Juan Quintela I just had this race happen on me while building qemu. The problematic file in my case was cutils.o. I'm using GNU make's order-only dependencies to avoid that "make recurse-all" builds the tools as well. Signed-off-by: Paolo Bonzini Signed-off-by: Paolo Bonzini --- Makefile | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index d555bb2..373a861 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,10 @@ romsubdir-%: ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) -recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) +# Some files are shared between the tools and the emulators. So there +# can be a race when the main makefile starts building xyz.o, while +# the recursive make sees a partially built xyz.o and ar(1) fails. +recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) | $(TOOLS) ####################################################################### # QObject -- 1.6.5.2