Improve plumbing for calling external qemu builds
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 8 Jul 2008 13:26:09 +0000 (14:26 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 8 Jul 2008 13:26:09 +0000 (14:26 +0100)
* Remove ioemu-dir before replacing it with a symlink so that
  switching between trees doesn't go wrong.
* Remove case-based arrangement for making XEN_ROOT absolute
  and replace with $(abspath ...) since we depend on GNU make
  anyway.
* `make clean' recurses into ioemu-dir

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/Makefile

index 49140339972f888c35795f53f7b185d20b5ecc77..0fc8aa0b9cf3eebfad1b87af588bc9cf9d642c20 100644 (file)
@@ -79,15 +79,14 @@ ioemu-dir-find:
                        $(GIT) clone $(CONFIG_QEMU) ioemu-remote.tmp; \
                        mv ioemu-remote.tmp ioemu-remote; \
                fi; \
+               rm -f ioemu-dir; \
                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
+       cd ioemu-dir && XEN_ROOT="$(abspath $(XEN_ROOT))" ./xen-setup
 
 subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find
+
+subdir-clean-ioemu-dir:
+       if test -d ioemu-dir/.; then \
+               $(MAKE) -C ioemu-dir clean; \
+       fi