aboutsummaryrefslogtreecommitdiffstats
path: root/tools/Makefile
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-07-03 10:44:13 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-07-03 10:44:13 +0100
commit554a3a3375a568ba3fc44816ddf8e5568d7944a3 (patch)
treed748f16618a599abe64b04ba1487d1bc3992d7cb /tools/Makefile
parent8e65d32968c334f36093513b7c99ce4fa8e38106 (diff)
downloadxen-554a3a3375a568ba3fc44816ddf8e5568d7944a3.tar.gz
xen-554a3a3375a568ba3fc44816ddf8e5568d7944a3.tar.bz2
xen-554a3a3375a568ba3fc44816ddf8e5568d7944a3.zip
Support building of out-of-tree merged qemu from git
This provides support for building the new merged qemu from qemu-xen.git, or from a local checkout. The default is still to use the in-tree version, because the patchman infrastructure for testing, and propagation from staging to xen-unstable, needs a small amount of work to cope with git. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/Makefile')
-rw-r--r--tools/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/Makefile b/tools/Makefile
index ace8a1a46a..4914033997 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -22,7 +22,12 @@ SUBDIRS-y += libaio
SUBDIRS-y += blktap
SUBDIRS-y += libfsimage
SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
+
+ifeq (ioemu,$(CONFIG_QEMU))
SUBDIRS-$(CONFIG_IOEMU) += ioemu
+else
+SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir
+endif
# These don't cross-compile
ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
@@ -62,3 +67,27 @@ subdir-all-ioemu subdir-install-ioemu: ioemu/config-host.mak
subdir-clean-ioemu:
$(MAKE) -C ioemu distclean
+ioemu-dir-find:
+ set -ex; \
+ if test -d $(CONFIG_QEMU); then \
+ rm -f ioemu-dir; \
+ ln -sf $(CONFIG_QEMU) ioemu-dir; \
+ else \
+ if [ ! -d ioemu-remote ]; then \
+ rm -rf ioemu-remote ioemu-remote.tmp; \
+ mkdir ioemu-remote.tmp; rmdir ioemu-remote.tmp; \
+ $(GIT) clone $(CONFIG_QEMU) ioemu-remote.tmp; \
+ mv ioemu-remote.tmp ioemu-remote; \
+ fi; \
+ ln -sf ioemu-remote ioemu-dir; \
+ fi
+ set -e; \
+ case "$XEN_ROOT" in \
+ /*) XEN_ROOT=$(XEN_ROOT) ;; \
+ *) XEN_ROOT=`pwd`/$(XEN_ROOT) ;; \
+ esac; \
+ export XEN_ROOT; \
+ cd ioemu-dir; \
+ ./xen-setup
+
+subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find