From patchwork Fri Dec 18 10:40:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: fix tool/libuser makefile race Date: Fri, 18 Dec 2009 00:40:32 -0000 From: Paolo Bonzini X-Patchwork-Id: 41380 Message-Id: <1261132832-7688-1-git-send-email-pbonzini@redhat.com> 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