aboutsummaryrefslogtreecommitdiffstats
path: root/stubdom/Makefile
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2010-11-23 16:43:38 +0000
committerJan Beulich <jbeulich@novell.com>2010-11-23 16:43:38 +0000
commit762626dd33b8cded8c19f9d133f196def31684a9 (patch)
tree2ad87ce9ff167e94a189920c1f1c69b4bda60d27 /stubdom/Makefile
parent3ed6a063d2a5f6197306b030e8c27c36d5f31aa1 (diff)
downloadxen-762626dd33b8cded8c19f9d133f196def31684a9.tar.gz
xen-762626dd33b8cded8c19f9d133f196def31684a9.tar.bz2
xen-762626dd33b8cded8c19f9d133f196def31684a9.zip
qemu-xen: build adjustments to support out-of-tree builds
QEMU by itself can be built outside of its source directory. With the qemu repository being separate from the hypervisor/tools one it seems to make sense to make use of this feature, but doing so requires a couple of adjustments to the Xen changes to it. Basically, if CONFIG_QEMU is found to indicate an existing directory, this directory will be used rather than cloning the git repo into the build tree. [ This changeset is the xen-unstable part of the patch but also includes the QEMU_TAG update to pull in the qemu part. -iwj ] Signed-off-by: Jan Beulich <jbeulich@novell.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'stubdom/Makefile')
-rw-r--r--stubdom/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/stubdom/Makefile b/stubdom/Makefile
index d3af867a23..d1c6b0a5b5 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -215,6 +215,9 @@ $(OCAML_STAMPFILE): ocaml-$(XEN_TARGET_ARCH)/.dirstamp
.PHONY: $(CROSS_ROOT)
$(CROSS_ROOT): cross-newlib cross-zlib cross-libpci
+QEMU_ROOT := $(shell if [ -d "$(CONFIG_QEMU)" ]; then echo "$(CONFIG_QEMU)"; else echo .; fi)
+
+ifeq ($(QEMU_ROOT),.)
$(XEN_ROOT)/tools/ioemu-dir:
$(CROSS_MAKE) -C $(XEN_ROOT)/tools ioemu-dir-find
@@ -231,6 +234,13 @@ ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/ioemu-dir
)) | \
while read f; do rm -f "$$f"; ln -s "$$src/$$f" "$$f"; done
touch ioemu/linkfarm.stamp
+else
+export QEMU_ROOT
+
+ioemu/linkfarm.stamp:
+ mkdir -p ioemu
+ touch ioemu/linkfarm.stamp
+endif
mk-headers-$(XEN_TARGET_ARCH): ioemu/linkfarm.stamp
mkdir -p include/xen && \
@@ -287,8 +297,8 @@ ioemu: cross-zlib cross-libpci libxc
TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
- ./xen-setup-stubdom )
- $(CROSS_MAKE) -C ioemu
+ $(QEMU_ROOT)/xen-setup-stubdom )
+ $(CROSS_MAKE) -C ioemu -f $(QEMU_ROOT)/Makefile
######
# caml