WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] build: Don't fetch tools/ioemu-dir unless needed

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] build: Don't fetch tools/ioemu-dir unless needed
From: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Date: Mon, 16 May 2011 11:58:54 +0100
Cc: george.dunlap@xxxxxxxxxxxxx
Delivery-date: Mon, 16 May 2011 03:56:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
v3: more descriptive name for shared subdirs

c/s 18482 made both stubdom and tools dependent on tools/ioemu-dir
to fix a race condition where both build paths might try to fetch
qemu in parallel.  But this means that even if you build the tools
with CONFIG_IOEMU=n, qemu is still fetched first.

This patch causes tools/ioemu-dir to be a dependency for tools
only if CONFIG_IOEMU is enabled.

It's still unconditional for stubdoms, as it doesn't make much sense
to build stubdoms without it.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

diff -r f9bb0bbea7c2 -r 8bb82569e8a4 Makefile
--- a/Makefile  Thu May 12 16:42:54 2011 +0100
+++ b/Makefile  Mon May 16 11:58:39 2011 +0100
@@ -13,6 +13,11 @@ SUBARCH := $(subst x86_32,i386,$(XEN_TAR
 export XEN_TARGET_ARCH SUBARCH XEN_SYSTYPE
 include buildconfigs/Rules.mk
 
+# If building with CONFIG_IOEMU, get ioemu-dir before building
+# tools or stubdom (or they may race)
+IOEMU_SHARED_SUBDIRS-y :=
+IOEMU_SHARED_SUBDIRS-$(CONFIG_IOEMU) += tools/ioemu-dir
+
 # build and install everything into the standard system directories
 .PHONY: install
 install: install-xen install-kernels install-tools install-stubdom install-docs
@@ -66,7 +71,7 @@ install-xen:
        $(MAKE) -C xen install
 
 .PHONY: install-tools
-install-tools: tools/ioemu-dir
+install-tools: $(IOEMU_SHARED_SUBDIRS-y)
        $(MAKE) -C tools install
 
 .PHONY: install-kernels
@@ -74,6 +79,7 @@ install-kernels:
        for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
 
 .PHONY: install-stubdom
+# NB: depend on tools/ioemu-dir unconditionally for stubdoms
 install-stubdom: tools/ioemu-dir install-tools
        $(MAKE) -C stubdom install
 ifeq (x86_64,$(XEN_TARGET_ARCH))

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>