]> xenbits.xensource.com Git - xen.git/commitdiff
tools: use a dedicated build directory for qemu
authorJuergen Gross <jgross@suse.com>
Thu, 2 Mar 2017 05:13:17 +0000 (06:13 +0100)
committerWei Liu <wei.liu2@citrix.com>
Thu, 2 Mar 2017 12:23:32 +0000 (12:23 +0000)
Instead of using the downloaded git tree as target directory for the
qemu build create a dedicated directory for that purpose.

This way it is possible to use the same source directory of qemu to
configure and build qemu upstream in a stubdom environment in future.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
.gitignore
tools/Makefile

index 015a1890475ffb4fae9154db87b850f86d3de6e1..443b12ad9717a7213f8e096aecab02377327724d 100644 (file)
@@ -207,6 +207,7 @@ tools/misc/xenlockprof
 tools/misc/lowmemd
 tools/misc/xencov
 tools/pkg-config/*
+tools/qemu-xen-build
 tools/xentrace/xenalyze
 tools/pygrub/build/*
 tools/python/build/*
index 5cadb16da2e445bbfece43e5e48e64acd0478ab9..32ab94ba47274594cd9c98bd79b9cfa9bf76a34e 100644 (file)
@@ -116,7 +116,7 @@ clean: subdirs-clean
 .PHONY: distclean
 distclean: subdirs-distclean clean
        rm -rf qemu-xen-traditional-dir qemu-xen-traditional-dir-remote
-       rm -rf qemu-xen-dir qemu-xen-dir-remote
+       rm -rf qemu-xen-dir qemu-xen-dir-remote qemu-xen-build
        rm -rf ../config/Tools.mk config.h config.log config.status \
                config.cache autom4te.cache
 
@@ -244,9 +244,10 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
        if test -d $(QEMU_UPSTREAM_LOC) ; then \
                source=$(QEMU_UPSTREAM_LOC); \
        else \
-               source=.; \
+               source=$(XEN_ROOT)/tools/qemu-xen-dir; \
        fi; \
-       cd qemu-xen-dir; \
+       mkdir -p qemu-xen-build; \
+       cd qemu-xen-build; \
        if $$source/scripts/tracetool.py --check-backend --backend log ; then \
                enable_trace_backend='--enable-trace-backend=log'; \
        elif $$source/scripts/tracetool.py --check-backend --backend stderr ; then \
@@ -301,12 +302,12 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
        $(MAKE) all
 
 subdir-install-qemu-xen-dir: subdir-all-qemu-xen-dir
-       cd qemu-xen-dir; \
+       cd qemu-xen-build; \
        $(MAKE) install
 
 subdir-clean-qemu-xen-dir:
-       set -e; if test -d qemu-xen-dir/.; then \
-               $(MAKE) -C qemu-xen-dir clean; \
+       set -e; if test -d qemu-xen-build/.; then \
+               $(MAKE) -C qemu-xen-build clean; \
        fi
 
 subdir-clean-debugger/gdbsx subdir-distclean-debugger/gdbsx: .phony