ia64/xen-unstable
changeset 18488:e827c54462d3
$(XEN_ROOT) absolutification fixes for ioemu-remote (incl stubdom)
* Move code for generating an absolute version of XEN_ROOT
into a common make variable set in Config.mk
* Use this common code when invoking make -C ioemu-dir clean
from tools/, which avoids 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.
* Use this common code in stubdom/Makefile, instead of $(abspath...)
as the latter is a relatively new feature in GNU make and is not
available in all the places that we want to be able to build
(cf c/s 17997:3f23e01d31985899dbd1660b166f229f1ee74292)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Move code for generating an absolute version of XEN_ROOT
into a common make variable set in Config.mk
* Use this common code when invoking make -C ioemu-dir clean
from tools/, which avoids 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.
* Use this common code in stubdom/Makefile, instead of $(abspath...)
as the latter is a relatively new feature in GNU make and is not
available in all the places that we want to be able to build
(cf c/s 17997:3f23e01d31985899dbd1660b166f229f1ee74292)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Fri Sep 12 13:15:36 2008 +0100 (2008-09-12) |
parents | 982e6fce0e47 |
children | 15b1c3d4459a |
files | Config.mk stubdom/Makefile tools/Makefile |
line diff
1.1 --- a/Config.mk Fri Sep 12 11:43:47 2008 +0100 1.2 +++ b/Config.mk Fri Sep 12 13:15:36 2008 +0100 1.3 @@ -54,6 +54,22 @@ define cc-ver-check-closure 1.4 endif 1.5 endef 1.6 1.7 +define absolutify_xen_root 1.8 + case "$(XEN_ROOT)" in \ 1.9 + /*) XEN_ROOT=$(XEN_ROOT) ;; \ 1.10 + *) xen_root_lhs=`pwd`; \ 1.11 + xen_root_rhs=$(XEN_ROOT)/; \ 1.12 + while [ "x$${xen_root_rhs#../}" != "x$$xen_root_rhs" ]; do \ 1.13 + xen_root_rhs="$${xen_root_rhs#../}"; \ 1.14 + xen_root_rhs="$${xen_root_rhs#/}"; \ 1.15 + xen_root_rhs="$${xen_root_rhs#/}"; \ 1.16 + xen_root_lhs="$${xen_root_lhs%/*}"; \ 1.17 + done; \ 1.18 + XEN_ROOT="$$xen_root_lhs/$$xen_root_rhs" ;; \ 1.19 + esac; \ 1.20 + export XEN_ROOT 1.21 +endef 1.22 + 1.23 ifeq ($(debug),y) 1.24 CFLAGS += -g 1.25 endif
2.1 --- a/stubdom/Makefile Fri Sep 12 11:43:47 2008 +0100 2.2 +++ b/stubdom/Makefile Fri Sep 12 13:15:36 2008 +0100 2.3 @@ -232,8 +232,9 @@ ifeq ($(CONFIG_QEMU),ioemu) 2.4 CPPFLAGS="$(TARGET_CPPFLAGS)" $(MAKE) -C ioemu LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) TOOLS= 2.5 else 2.6 [ -f ioemu/config-host.mak ] || \ 2.7 - ( cd ioemu ; \ 2.8 - CONFIG_STUBDOM=yes XEN_ROOT=$(abspath $(XEN_ROOT)) XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) CFLAGS="$(TARGET_CFLAGS)" sh ./xen-setup --cc=$(CC) --disable-gcc-check $(IOEMU_OPTIONS)) 2.9 + ( $(absolutify_xen_root); \ 2.10 + cd ioemu ; \ 2.11 + CONFIG_STUBDOM=yes XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) CFLAGS="$(TARGET_CFLAGS)" sh ./xen-setup --cc=$(CC) --disable-gcc-check $(IOEMU_OPTIONS)) 2.12 CPPFLAGS= TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" $(MAKE) -C ioemu LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) TOOLS= CONFIG_STUBDOM=yes 2.13 endif 2.14
3.1 --- a/tools/Makefile Fri Sep 12 11:43:47 2008 +0100 3.2 +++ b/tools/Makefile Fri Sep 12 13:15:36 2008 +0100 3.3 @@ -93,17 +93,14 @@ ioemu-dir-find: 3.4 ln -sf ioemu-remote ioemu-dir; \ 3.5 fi 3.6 set -e; \ 3.7 - case "$(XEN_ROOT)" in \ 3.8 - /*) XEN_ROOT=$(XEN_ROOT) ;; \ 3.9 - *) XEN_ROOT=`pwd`/$(XEN_ROOT) ;; \ 3.10 - esac; \ 3.11 - export XEN_ROOT; \ 3.12 + $(absolutify_xen_root); \ 3.13 cd ioemu-dir; \ 3.14 ./xen-setup $(IOEMU_CONFIGURE_CROSS) 3.15 3.16 subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find 3.17 3.18 subdir-clean-ioemu-dir: 3.19 - if test -d ioemu-dir/.; then \ 3.20 + set -e; if test -d ioemu-dir/.; then \ 3.21 + $(absolutify_xen_root); \ 3.22 $(MAKE) -C ioemu-dir clean; \ 3.23 fi