[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] qemu-xen: build adjustments to support out-of-tree builds



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1290530618 0
# Node ID 61c0c52a8c6c7c99a7b1ae15d6b223b05cb9f4e8
# Parent  c0c1f5f0745e25af6f8b4a1006637d98a8d63581
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@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Config.mk        |    6 +++---
 stubdom/Makefile |   14 ++++++++++++--
 tools/Makefile   |   17 ++++++-----------
 3 files changed, 21 insertions(+), 16 deletions(-)

diff -r c0c1f5f0745e -r 61c0c52a8c6c Config.mk
--- a/Config.mk Mon Nov 22 19:16:34 2010 +0000
+++ b/Config.mk Tue Nov 23 16:43:38 2010 +0000
@@ -185,9 +185,9 @@ endif
 # CONFIG_QEMU ?= ../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= 60766b459c41e429a4b2405124b42512ea362984
-# Fri Nov 19 18:50:43 2010 +0000
-# passthrough: let xen choose the pirq number
+QEMU_TAG ?= ad78ccc35617610bc43112788d28a05878fac91f
+# Tue Nov 23 16:40:08 2010 +0000
+# qemu-xen: build adjustments to support out-of-tree builds
 
 # Optional components
 XENSTAT_XENTOP     ?= y
diff -r c0c1f5f0745e -r 61c0c52a8c6c stubdom/Makefile
--- a/stubdom/Makefile  Mon Nov 22 19:16:34 2010 +0000
+++ b/stubdom/Makefile  Tue Nov 23 16:43:38 2010 +0000
@@ -215,6 +215,9 @@ cross-ocaml: $(OCAML_STAMPFILE)
 .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/
                        )) |                                                    
\
            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
diff -r c0c1f5f0745e -r 61c0c52a8c6c tools/Makefile
--- a/tools/Makefile    Mon Nov 22 19:16:34 2010 +0000
+++ b/tools/Makefile    Tue Nov 23 16:43:38 2010 +0000
@@ -81,20 +81,15 @@ IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TAR
                         --interp-prefix=$(CROSS_SYS_ROOT)
 endif
 
-ioemu/config-host.mak:
-       cd ioemu && XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) sh configure \
-               --prefix=$(PREFIX) $(IOEMU_CONFIGURE_CROSS)
-
-subdir-all-ioemu subdir-install-ioemu: ioemu/config-host.mak
-
-subdir-clean-ioemu:
-       $(MAKE) -C ioemu distclean
+QEMU_ROOT := $(shell if [ -d "$(CONFIG_QEMU)" ]; then echo "$(CONFIG_QEMU)"; 
else echo .; fi)
+ifneq ($(QEMU_ROOT),.)
+export QEMU_ROOT
+endif
 
 ioemu-dir-find:
        set -ex; \
        if test -d $(CONFIG_QEMU); then \
-               rm -f ioemu-dir; \
-               ln -sf $(CONFIG_QEMU) ioemu-dir; \
+               mkdir -p ioemu-dir; \
        else \
                if [ ! -d ioemu-remote ]; then \
                        rm -rf ioemu-remote ioemu-remote.tmp; \
@@ -115,7 +110,7 @@ ioemu-dir-find:
                $(absolutify_xen_root); \
                $(buildmakevars2shellvars); \
                cd ioemu-dir; \
-               ./xen-setup $(IOEMU_CONFIGURE_CROSS)
+               $(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS)
 
 .PHONY: ioemu-dir-force-update
 ioemu-dir-force-update:

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.