From: Ian Jackson Subject: [PATCH] Make $(XEN_ROOT) be absolute for make clean in ioemu-dir Date: Fri, 12 Sep 2008 10:41:36 +0100 Message-ID: <18634.14672.266842.985810@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This prevents a problem where `make clean' fails because qemu's (ioemu-remote's) build system wants to run `make clean' in `tests' but XEN_ROOT is a confection involving ../'s. Signed-off-by: Ian Jackson diff -r a5cc38391afb tools/Makefile --- a/tools/Makefile Thu Sep 11 16:51:13 2008 +0100 +++ b/tools/Makefile Fri Sep 12 10:39:30 2008 +0100 @@ -71,6 +71,14 @@ subdir-clean-ioemu: subdir-clean-ioemu: $(MAKE) -C ioemu distclean +define absolutify_xen_root + case "$(XEN_ROOT)" in \ + /*) XEN_ROOT=$(XEN_ROOT) ;; \ + *) XEN_ROOT=`pwd`/$(XEN_ROOT) ;; \ + esac; \ + export XEN_ROOT +endef + ioemu-dir-find: set -ex; \ if test -d $(CONFIG_QEMU); then \ @@ -93,17 +101,14 @@ ioemu-dir-find: 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; \ + $(absolutify_xen_root); \ cd ioemu-dir; \ ./xen-setup $(IOEMU_CONFIGURE_CROSS) subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find subdir-clean-ioemu-dir: - if test -d ioemu-dir/.; then \ + set -e; if test -d ioemu-dir/.; then \ + $(absolutify_xen_root); \ $(MAKE) -C ioemu-dir clean; \ fi