From 547cb1849c1d6338d3141817f67c3ddd2c2beff5 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 17 Mar 2011 10:36:25 +0000 Subject: build: Make XEN_ROOT an absolute path. Otherwise make can search the path relative to certain standard paths such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in Config.mk suffers from this). Signed-off-by: Keir Fraser --- stubdom/Makefile | 31 +++++++++++++++---------------- stubdom/c/Makefile | 2 +- stubdom/caml/Makefile | 2 +- stubdom/grub/Makefile | 2 +- stubdom/pciutils.patch | 2 +- 5 files changed, 19 insertions(+), 20 deletions(-) (limited to 'stubdom') diff --git a/stubdom/Makefile b/stubdom/Makefile index d1c6b0a5b5..938fc0ac17 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -1,4 +1,4 @@ -XEN_ROOT = .. +XEN_ROOT = $(CURDIR)/.. MINI_OS = $(XEN_ROOT)/extras/mini-os export XEN_OS=MiniOS @@ -64,7 +64,7 @@ $(call cc-options-add,TARGET_CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) GCC_INSTALL = $(shell LANG=C gcc -print-search-dirs | sed -n -e 's/install: \(.*\)/\1/p') TARGET_CPPFLAGS += -U __linux__ -U __FreeBSD__ -U __sun__ TARGET_CPPFLAGS += -nostdinc -TARGET_CPPFLAGS += -isystem $(CURDIR)/$(MINI_OS)/include/posix +TARGET_CPPFLAGS += -isystem $(MINI_OS)/include/posix TARGET_CPPFLAGS += -isystem $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include TARGET_CPPFLAGS += -isystem $(GCC_INSTALL)include TARGET_CPPFLAGS += -isystem $(CURDIR)/lwip-$(XEN_TARGET_ARCH)/src/include @@ -224,7 +224,7 @@ $(XEN_ROOT)/tools/ioemu-dir: ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/ioemu-dir mkdir -p ioemu set -e; \ - $(absolutify_xen_root); \ + $(buildmakevars2shellvars); \ cd ioemu; \ src="$$XEN_ROOT/tools/ioemu-dir"; export src; \ (cd $$src && find * -type d -print) | xargs mkdir -p; \ @@ -244,24 +244,24 @@ endif mk-headers-$(XEN_TARGET_ARCH): ioemu/linkfarm.stamp mkdir -p include/xen && \ - ln -sf $(addprefix ../../,$(wildcard $(XEN_ROOT)/xen/include/public/*.h)) include/xen && \ - ln -sf $(addprefix ../../$(XEN_ROOT)/xen/include/public/,arch-ia64 arch-x86 hvm io xsm) include/xen && \ - ( [ -h include/xen/sys ] || ln -sf ../../$(XEN_ROOT)/tools/include/xen-sys/MiniOS include/xen/sys ) && \ - ( [ -h include/xen/libelf ] || ln -sf ../../$(XEN_ROOT)/tools/include/xen/libelf include/xen/libelf ) && \ + ln -sf $(wildcard $(XEN_ROOT)/xen/include/public/*.h) include/xen && \ + ln -sf $(addprefix $(XEN_ROOT)/xen/include/public/,arch-ia64 arch-x86 hvm io xsm) include/xen && \ + ( [ -h include/xen/sys ] || ln -sf $(XEN_ROOT)/tools/include/xen-sys/MiniOS include/xen/sys ) && \ + ( [ -h include/xen/libelf ] || ln -sf $(XEN_ROOT)/tools/include/xen/libelf include/xen/libelf ) && \ mkdir -p include/xen-foreign && \ - ln -sf $(addprefix ../../,$(wildcard $(XEN_ROOT)/tools/include/xen-foreign/*)) include/xen-foreign/ && \ + ln -sf $(wildcard $(XEN_ROOT)/tools/include/xen-foreign/*) include/xen-foreign/ && \ $(CROSS_MAKE) -C include/xen-foreign/ && \ ( [ -h include/xen/foreign ] || ln -sf ../xen-foreign include/xen/foreign ) mkdir -p libxc-$(XEN_TARGET_ARCH) [ -h libxc-$(XEN_TARGET_ARCH)/Makefile ] || ( cd libxc-$(XEN_TARGET_ARCH) && \ - ln -sf ../$(XEN_ROOT)/tools/libxc/*.h . && \ - ln -sf ../$(XEN_ROOT)/tools/libxc/*.c . && \ - ln -sf ../$(XEN_ROOT)/tools/libxc/Makefile . ) + ln -sf $(XEN_ROOT)/tools/libxc/*.h . && \ + ln -sf $(XEN_ROOT)/tools/libxc/*.c . && \ + ln -sf $(XEN_ROOT)/tools/libxc/Makefile . ) mkdir -p libxc-$(XEN_TARGET_ARCH)/$(XEN_TARGET_ARCH) [ -h libxc-$(XEN_TARGET_ARCH)/$(XEN_TARGET_ARCH) ] || ( cd libxc-$(XEN_TARGET_ARCH)/$(XEN_TARGET_ARCH) && \ - ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/*.c . && \ - ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/*.h . && \ - ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/Makefile . ) + ln -sf $(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/*.c . && \ + ln -sf $(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/*.h . && \ + ln -sf $(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/Makefile . ) $(CROSS_MAKE) -C $(MINI_OS) links touch mk-headers-$(XEN_TARGET_ARCH) @@ -290,8 +290,7 @@ libxc-$(XEN_TARGET_ARCH)/libxenctrl.a: cross-zlib .PHONY: ioemu ioemu: cross-zlib cross-libpci libxc [ -f ioemu/config-host.mak ] || \ - ( $(absolutify_xen_root); \ - $(buildmakevars2shellvars); \ + ( $(buildmakevars2shellvars); \ cd ioemu ; \ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) \ TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \ diff --git a/stubdom/c/Makefile b/stubdom/c/Makefile index b5cb8e2cd7..c646c26e74 100644 --- a/stubdom/c/Makefile +++ b/stubdom/c/Makefile @@ -1,4 +1,4 @@ -XEN_ROOT = ../.. +XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/Config.mk diff --git a/stubdom/caml/Makefile b/stubdom/caml/Makefile index 5f27db67a3..e79c98df13 100644 --- a/stubdom/caml/Makefile +++ b/stubdom/caml/Makefile @@ -1,4 +1,4 @@ -XEN_ROOT = ../.. +XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/Config.mk diff --git a/stubdom/grub/Makefile b/stubdom/grub/Makefile index 77e5eb97d7..d6e3a1e5b6 100644 --- a/stubdom/grub/Makefile +++ b/stubdom/grub/Makefile @@ -1,4 +1,4 @@ -XEN_ROOT = ../.. +XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/Config.mk vpath %.c ../grub-upstream diff --git a/stubdom/pciutils.patch b/stubdom/pciutils.patch index ce9e987b2c..5ab84d6cce 100644 --- a/stubdom/pciutils.patch +++ b/stubdom/pciutils.patch @@ -38,7 +38,7 @@ diff -urN pciutils-2.2.9.orig/lib/access.c pciutils-2.2.9/lib/access.c endif +ifdef PCI_OS_MINIOS -+XEN_ROOT=../../.. ++XEN_ROOT=$(CURDIR)/../../.. +include $(XEN_ROOT)/Config.mk +OBJS += minios.o +endif -- cgit v1.2.3