[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC v1 2/6] tools: use "?=" to set XEN_ROOT in Makefile



This is because when doing a stubdom build using $(CURDIR) to refer to
XEN_ROOT is wrong. Instead, when make enters directories of interest,
XEN_ROOT is already. So use "?=" is the right choice.

While in theory I can only fix up the places needed (a few libraries),
do this for all Makefiles under tools to keep things consistent.

Done by:
find tools -name Makefile -exec sed -i 's/^\(.*XEN_ROOT\s*\)=\(.*\)$/\1 ?= 
\2/g' {} \;

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/Makefile                                | 2 +-
 tools/blktap2/Makefile                        | 2 +-
 tools/blktap2/drivers/Makefile                | 2 +-
 tools/blktap2/lvm/Makefile                    | 2 +-
 tools/blktap2/vhd/Makefile                    | 2 +-
 tools/blktap2/vhd/lib/Makefile                | 2 +-
 tools/console/Makefile                        | 2 +-
 tools/console/testsuite/Makefile              | 2 +-
 tools/debugger/gdbsx/Makefile                 | 2 +-
 tools/debugger/gdbsx/gx/Makefile              | 2 +-
 tools/debugger/gdbsx/xg/Makefile              | 2 +-
 tools/debugger/kdd/Makefile                   | 2 +-
 tools/examples/Makefile                       | 2 +-
 tools/firmware/Makefile                       | 2 +-
 tools/firmware/etherboot/Makefile             | 2 +-
 tools/firmware/hvmloader/Makefile             | 2 +-
 tools/firmware/hvmloader/acpi/Makefile        | 2 +-
 tools/firmware/rombios/32bit/Makefile         | 2 +-
 tools/firmware/rombios/32bit/tcgbios/Makefile | 2 +-
 tools/firmware/rombios/Makefile               | 2 +-
 tools/flask/Makefile                          | 2 +-
 tools/flask/policy/Makefile                   | 2 +-
 tools/flask/utils/Makefile                    | 2 +-
 tools/helpers/Makefile                        | 2 +-
 tools/hotplug/FreeBSD/Makefile                | 2 +-
 tools/hotplug/Linux/Makefile                  | 2 +-
 tools/hotplug/Linux/systemd/Makefile          | 2 +-
 tools/hotplug/Makefile                        | 2 +-
 tools/hotplug/NetBSD/Makefile                 | 2 +-
 tools/hotplug/common/Makefile                 | 2 +-
 tools/include/Makefile                        | 2 +-
 tools/include/xen-foreign/Makefile            | 2 +-
 tools/libfsimage/Makefile                     | 2 +-
 tools/libfsimage/common/Makefile              | 2 +-
 tools/libfsimage/ext2fs-lib/Makefile          | 2 +-
 tools/libfsimage/ext2fs/Makefile              | 2 +-
 tools/libfsimage/fat/Makefile                 | 2 +-
 tools/libfsimage/iso9660/Makefile             | 2 +-
 tools/libfsimage/reiserfs/Makefile            | 2 +-
 tools/libfsimage/ufs/Makefile                 | 2 +-
 tools/libfsimage/xfs/Makefile                 | 2 +-
 tools/libfsimage/zfs/Makefile                 | 2 +-
 tools/libs/Makefile                           | 2 +-
 tools/libs/call/Makefile                      | 2 +-
 tools/libs/evtchn/Makefile                    | 2 +-
 tools/libs/foreignmemory/Makefile             | 2 +-
 tools/libs/gnttab/Makefile                    | 2 +-
 tools/libs/toollog/Makefile                   | 2 +-
 tools/libvchan/Makefile                       | 2 +-
 tools/libxc/Makefile                          | 2 +-
 tools/libxl/Makefile                          | 2 +-
 tools/memshr/Makefile                         | 2 +-
 tools/misc/Makefile                           | 2 +-
 tools/ocaml/Makefile                          | 2 +-
 tools/ocaml/libs/Makefile                     | 2 +-
 tools/ocaml/libs/eventchn/Makefile            | 2 +-
 tools/ocaml/libs/mmap/Makefile                | 2 +-
 tools/ocaml/libs/xb/Makefile                  | 2 +-
 tools/ocaml/libs/xc/Makefile                  | 2 +-
 tools/ocaml/libs/xentoollog/Makefile          | 2 +-
 tools/ocaml/libs/xl/Makefile                  | 2 +-
 tools/ocaml/libs/xs/Makefile                  | 2 +-
 tools/ocaml/test/Makefile                     | 2 +-
 tools/ocaml/xenstored/Makefile                | 2 +-
 tools/pygrub/Makefile                         | 2 +-
 tools/python/Makefile                         | 2 +-
 tools/tests/Makefile                          | 2 +-
 tools/tests/mce-test/tools/Makefile           | 2 +-
 tools/tests/mem-sharing/Makefile              | 2 +-
 tools/tests/regression/Makefile               | 2 +-
 tools/tests/vhpet/Makefile                    | 2 +-
 tools/tests/x86_emulator/Makefile             | 2 +-
 tools/tests/xen-access/Makefile               | 2 +-
 tools/xcutils/Makefile                        | 2 +-
 tools/xenbackendd/Makefile                    | 2 +-
 tools/xenmon/Makefile                         | 2 +-
 tools/xenpaging/Makefile                      | 2 +-
 tools/xenpmd/Makefile                         | 2 +-
 tools/xenstat/Makefile                        | 2 +-
 tools/xenstat/libxenstat/Makefile             | 2 +-
 tools/xenstat/xentop/Makefile                 | 2 +-
 tools/xenstore/Makefile                       | 2 +-
 tools/xentrace/Makefile                       | 2 +-
 83 files changed, 83 insertions(+), 83 deletions(-)

diff --git a/tools/Makefile b/tools/Makefile
index 3f45fb9..038dff8 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/..
+XEN_ROOT  ?=  $(CURDIR)/..
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS-y :=
diff --git a/tools/blktap2/Makefile b/tools/blktap2/Makefile
index 94200dc..b8ec232 100644
--- a/tools/blktap2/Makefile
+++ b/tools/blktap2/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += $(CFLAGS_libxenctrl)
diff --git a/tools/blktap2/drivers/Makefile b/tools/blktap2/drivers/Makefile
index 5328c40..b093f00 100644
--- a/tools/blktap2/drivers/Makefile
+++ b/tools/blktap2/drivers/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT ?= $(CURDIR)/../../..
 BLKTAP_ROOT= ..
 include $(XEN_ROOT)/tools/Rules.mk
 
diff --git a/tools/blktap2/lvm/Makefile b/tools/blktap2/lvm/Makefile
index 7d5f8ea..3d4572f 100644
--- a/tools/blktap2/lvm/Makefile
+++ b/tools/blktap2/lvm/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 BLKTAP_ROOT := ..
 include $(XEN_ROOT)/tools/Rules.mk
 
diff --git a/tools/blktap2/vhd/Makefile b/tools/blktap2/vhd/Makefile
index fabd665..718c13c 100644
--- a/tools/blktap2/vhd/Makefile
+++ b/tools/blktap2/vhd/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT ?= $(CURDIR)/../../..
 BLKTAP_ROOT := ..
 include $(XEN_ROOT)/tools/Rules.mk
 
diff --git a/tools/blktap2/vhd/lib/Makefile b/tools/blktap2/vhd/lib/Makefile
index ab2d648..9b84037 100644
--- a/tools/blktap2/vhd/lib/Makefile
+++ b/tools/blktap2/vhd/lib/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../../..
+XEN_ROOT ?= $(CURDIR)/../../../..
 BLKTAP_ROOT := ../..
 include $(XEN_ROOT)/tools/Rules.mk
 
diff --git a/tools/console/Makefile b/tools/console/Makefile
index a7bec75..4547030 100644
--- a/tools/console/Makefile
+++ b/tools/console/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT ?= $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += -Werror
diff --git a/tools/console/testsuite/Makefile b/tools/console/testsuite/Makefile
index 85501fd..c776a81 100644
--- a/tools/console/testsuite/Makefile
+++ b/tools/console/testsuite/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 LDFLAGS=-static
diff --git a/tools/debugger/gdbsx/Makefile b/tools/debugger/gdbsx/Makefile
index 4ed6d76..d4ce827 100644
--- a/tools/debugger/gdbsx/Makefile
+++ b/tools/debugger/gdbsx/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include ./Rules.mk
 
 .PHONY: all
diff --git a/tools/debugger/gdbsx/gx/Makefile b/tools/debugger/gdbsx/gx/Makefile
index 3b8467f..480b0f0 100644
--- a/tools/debugger/gdbsx/gx/Makefile
+++ b/tools/debugger/gdbsx/gx/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT  ?=  $(CURDIR)/../../../..
 include ../Rules.mk
 
 GX_OBJS := gx_comm.o gx_main.o gx_utils.o gx_local.o
diff --git a/tools/debugger/gdbsx/xg/Makefile b/tools/debugger/gdbsx/xg/Makefile
index 6a8937b..34b443b 100644
--- a/tools/debugger/gdbsx/xg/Makefile
+++ b/tools/debugger/gdbsx/xg/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT  ?=  $(CURDIR)/../../../..
 include ../Rules.mk
 
 XG_HDRS := xg_public.h 
diff --git a/tools/debugger/kdd/Makefile b/tools/debugger/kdd/Makefile
index f3a597d..2f33399 100644
--- a/tools/debugger/kdd/Makefile
+++ b/tools/debugger/kdd/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += -Werror
diff --git a/tools/examples/Makefile b/tools/examples/Makefile
index 87dd760..f1a374f 100644
--- a/tools/examples/Makefile
+++ b/tools/examples/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 # Xen configuration dir and configs to go there.
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index 6cc86ce..b2c8deb 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 # hvmloader is a 32-bit protected mode binary.
diff --git a/tools/firmware/etherboot/Makefile 
b/tools/firmware/etherboot/Makefile
index a0578d2..685b7f9 100644
--- a/tools/firmware/etherboot/Makefile
+++ b/tools/firmware/etherboot/Makefile
@@ -1,6 +1,6 @@
 
 override XEN_TARGET_ARCH = x86_32
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 include Config
 
diff --git a/tools/firmware/hvmloader/Makefile 
b/tools/firmware/hvmloader/Makefile
index f2f4791..9829536 100644
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -17,7 +17,7 @@
 # this program; If not, see <http://www.gnu.org/licenses/>.
 #
 
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 SUBDIRS := acpi
diff --git a/tools/firmware/hvmloader/acpi/Makefile 
b/tools/firmware/hvmloader/acpi/Makefile
index d3e882a..ac21a96 100644
--- a/tools/firmware/hvmloader/acpi/Makefile
+++ b/tools/firmware/hvmloader/acpi/Makefile
@@ -14,7 +14,7 @@
 # this program; If not, see <http://www.gnu.org/licenses/>.
 #
 
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT  ?=  $(CURDIR)/../../../..
 include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 C_SRC = build.c dsdt_anycpu.c dsdt_15cpu.c static_tables.c 
dsdt_anycpu_qemu_xen.c
diff --git a/tools/firmware/rombios/32bit/Makefile 
b/tools/firmware/rombios/32bit/Makefile
index 396906c..912bcc2 100644
--- a/tools/firmware/rombios/32bit/Makefile
+++ b/tools/firmware/rombios/32bit/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT  ?=  $(CURDIR)/../../../..
 include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 TARGET = 32bitbios_flat.h
diff --git a/tools/firmware/rombios/32bit/tcgbios/Makefile 
b/tools/firmware/rombios/32bit/tcgbios/Makefile
index f6f2649..ce342a7 100644
--- a/tools/firmware/rombios/32bit/tcgbios/Makefile
+++ b/tools/firmware/rombios/32bit/tcgbios/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../../../..
+XEN_ROOT  ?=  $(CURDIR)/../../../../..
 include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 TARGET  = tcgbiosext.o
diff --git a/tools/firmware/rombios/Makefile b/tools/firmware/rombios/Makefile
index 94e65db..77863a6 100644
--- a/tools/firmware/rombios/Makefile
+++ b/tools/firmware/rombios/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS := 32bit
diff --git a/tools/flask/Makefile b/tools/flask/Makefile
index a31cc16..2245a9c 100644
--- a/tools/flask/Makefile
+++ b/tools/flask/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS-y := utils
diff --git a/tools/flask/policy/Makefile b/tools/flask/policy/Makefile
index 4be921c..02497d9 100644
--- a/tools/flask/policy/Makefile
+++ b/tools/flask/policy/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT ?= $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 ########################################
diff --git a/tools/flask/utils/Makefile b/tools/flask/utils/Makefile
index 91a53b4..9cf3bc5 100644
--- a/tools/flask/utils/Makefile
+++ b/tools/flask/utils/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT ?= $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
diff --git a/tools/helpers/Makefile b/tools/helpers/Makefile
index a05a368..1bf57bc 100644
--- a/tools/helpers/Makefile
+++ b/tools/helpers/Makefile
@@ -2,7 +2,7 @@
 # tools/helpers/Makefile
 #
 
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 PROGS += xen-init-dom0
diff --git a/tools/hotplug/FreeBSD/Makefile b/tools/hotplug/FreeBSD/Makefile
index 10fce4f..8061a84 100644
--- a/tools/hotplug/FreeBSD/Makefile
+++ b/tools/hotplug/FreeBSD/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 # Xen script dir and scripts to go there.
diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile
index 6e10118..f7bd1b0 100644
--- a/tools/hotplug/Linux/Makefile
+++ b/tools/hotplug/Linux/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 # Init scripts.
diff --git a/tools/hotplug/Linux/systemd/Makefile 
b/tools/hotplug/Linux/systemd/Makefile
index 83e3b32..2445316 100644
--- a/tools/hotplug/Linux/systemd/Makefile
+++ b/tools/hotplug/Linux/systemd/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT  ?=  $(CURDIR)/../../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 XEN_SYSTEMD_MODULES = xen.conf
diff --git a/tools/hotplug/Makefile b/tools/hotplug/Makefile
index c1a82c1..e27f9ec 100644
--- a/tools/hotplug/Makefile
+++ b/tools/hotplug/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS-y := common
diff --git a/tools/hotplug/NetBSD/Makefile b/tools/hotplug/NetBSD/Makefile
index d01aabf..1107ea3 100644
--- a/tools/hotplug/NetBSD/Makefile
+++ b/tools/hotplug/NetBSD/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 # Xen script dir and scripts to go there.
diff --git a/tools/hotplug/common/Makefile b/tools/hotplug/common/Makefile
index b53b55c..ebb4f17 100644
--- a/tools/hotplug/common/Makefile
+++ b/tools/hotplug/common/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 HOTPLUGPATH="hotplugpath.sh"
diff --git a/tools/include/Makefile b/tools/include/Makefile
index dec8b3d..ed25612 100644
--- a/tools/include/Makefile
+++ b/tools/include/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 # Relative to $(XEN_ROOT)/xen/xsm/flask
diff --git a/tools/include/xen-foreign/Makefile 
b/tools/include/xen-foreign/Makefile
index 80a446a..22b969a 100644
--- a/tools/include/xen-foreign/Makefile
+++ b/tools/include/xen-foreign/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT ?= $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 ROOT = $(XEN_ROOT)/xen/include/public
diff --git a/tools/libfsimage/Makefile b/tools/libfsimage/Makefile
index 69fd18a..d66fbeb 100644
--- a/tools/libfsimage/Makefile
+++ b/tools/libfsimage/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS-y = common ufs reiserfs iso9660 fat zfs
diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile
index 4840bc2..f64f66a 100644
--- a/tools/libfsimage/common/Makefile
+++ b/tools/libfsimage/common/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
 
 MAJOR = 1.0
diff --git a/tools/libfsimage/ext2fs-lib/Makefile 
b/tools/libfsimage/ext2fs-lib/Makefile
index 0e00fde..7f606e7 100644
--- a/tools/libfsimage/ext2fs-lib/Makefile
+++ b/tools/libfsimage/ext2fs-lib/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 
 LIB_SRCS-y = ext2fs-lib.c
 
diff --git a/tools/libfsimage/ext2fs/Makefile b/tools/libfsimage/ext2fs/Makefile
index 8ff4c71..986012a 100644
--- a/tools/libfsimage/ext2fs/Makefile
+++ b/tools/libfsimage/ext2fs/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 
 LIB_SRCS-y = fsys_ext2fs.c
 
diff --git a/tools/libfsimage/fat/Makefile b/tools/libfsimage/fat/Makefile
index 2911a0e..dacec21 100644
--- a/tools/libfsimage/fat/Makefile
+++ b/tools/libfsimage/fat/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 
 LIB_SRCS-y = fsys_fat.c
 
diff --git a/tools/libfsimage/iso9660/Makefile 
b/tools/libfsimage/iso9660/Makefile
index 4096caf..0915b26 100644
--- a/tools/libfsimage/iso9660/Makefile
+++ b/tools/libfsimage/iso9660/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 
 LIB_SRCS-y = fsys_iso9660.c
 
diff --git a/tools/libfsimage/reiserfs/Makefile 
b/tools/libfsimage/reiserfs/Makefile
index 57f286b..06f109d 100644
--- a/tools/libfsimage/reiserfs/Makefile
+++ b/tools/libfsimage/reiserfs/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 
 LIB_SRCS-y = fsys_reiserfs.c
 
diff --git a/tools/libfsimage/ufs/Makefile b/tools/libfsimage/ufs/Makefile
index c137108..7dcea7d 100644
--- a/tools/libfsimage/ufs/Makefile
+++ b/tools/libfsimage/ufs/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 
 LIB_SRCS-y = fsys_ufs.c
 
diff --git a/tools/libfsimage/xfs/Makefile b/tools/libfsimage/xfs/Makefile
index 6580007..1ce6b1c 100644
--- a/tools/libfsimage/xfs/Makefile
+++ b/tools/libfsimage/xfs/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 
 LIB_SRCS-y = fsys_xfs.c
 
diff --git a/tools/libfsimage/zfs/Makefile b/tools/libfsimage/zfs/Makefile
index 4b9f131..6d5cdf1 100644
--- a/tools/libfsimage/zfs/Makefile
+++ b/tools/libfsimage/zfs/Makefile
@@ -21,7 +21,7 @@
 #  Use is subject to license terms.
 #
 
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 
 CFLAGS += -DFSYS_ZFS -DFSIMAGE -I$(XEN_ROOT)/tools/libfsimage/zfs
 LIB_SRCS-y = zfs_lzjb.c zfs_sha256.c zfs_fletcher.c fsi_zfs.c fsys_zfs.c
diff --git a/tools/libs/Makefile b/tools/libs/Makefile
index dc5726d..f732a1c 100644
--- a/tools/libs/Makefile
+++ b/tools/libs/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS-y :=
diff --git a/tools/libs/call/Makefile b/tools/libs/call/Makefile
index 9402ea5..76f6980 100644
--- a/tools/libs/call/Makefile
+++ b/tools/libs/call/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 1
diff --git a/tools/libs/evtchn/Makefile b/tools/libs/evtchn/Makefile
index 9917864..74374fc 100644
--- a/tools/libs/evtchn/Makefile
+++ b/tools/libs/evtchn/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 1
diff --git a/tools/libs/foreignmemory/Makefile 
b/tools/libs/foreignmemory/Makefile
index f062f45..fb11b0d 100644
--- a/tools/libs/foreignmemory/Makefile
+++ b/tools/libs/foreignmemory/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 1
diff --git a/tools/libs/gnttab/Makefile b/tools/libs/gnttab/Makefile
index af64542..ed570e8 100644
--- a/tools/libs/gnttab/Makefile
+++ b/tools/libs/gnttab/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 1
diff --git a/tools/libs/toollog/Makefile b/tools/libs/toollog/Makefile
index fb701be..a652959 100644
--- a/tools/libs/toollog/Makefile
+++ b/tools/libs/toollog/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR  = 1
diff --git a/tools/libvchan/Makefile b/tools/libvchan/Makefile
index 0573d2f..9ff09e9 100644
--- a/tools/libvchan/Makefile
+++ b/tools/libvchan/Makefile
@@ -2,7 +2,7 @@
 # tools/libvchan/Makefile
 #
 
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 LIBVCHAN_OBJS = init.o io.o
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index 608404f..1619c06 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 4.6
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 789a12e..81c3db4 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -2,7 +2,7 @@
 # tools/libxl/Makefile
 #
 
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR = 4.6
diff --git a/tools/memshr/Makefile b/tools/memshr/Makefile
index ce86f20..6faa23e 100644
--- a/tools/memshr/Makefile
+++ b/tools/memshr/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 LIBMEMSHR-BUILD := libmemshr.a
diff --git a/tools/misc/Makefile b/tools/misc/Makefile
index a2ef0ec..8ea9e36 100644
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT ?= $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
diff --git a/tools/ocaml/Makefile b/tools/ocaml/Makefile
index cfa931a..f3d07e7 100644
--- a/tools/ocaml/Makefile
+++ b/tools/ocaml/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS := libs
diff --git a/tools/ocaml/libs/Makefile b/tools/ocaml/libs/Makefile
index f7c3c0e..afb975f 100644
--- a/tools/ocaml/libs/Makefile
+++ b/tools/ocaml/libs/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS= \
diff --git a/tools/ocaml/libs/eventchn/Makefile 
b/tools/ocaml/libs/eventchn/Makefile
index 154efd4..3b3761a 100644
--- a/tools/ocaml/libs/eventchn/Makefile
+++ b/tools/ocaml/libs/eventchn/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT ?= $(TOPLEVEL)/../..
 include $(TOPLEVEL)/common.make
 
 CFLAGS += $(CFLAGS_libxenevtchn) $(CFLAGS_xeninclude)
diff --git a/tools/ocaml/libs/mmap/Makefile b/tools/ocaml/libs/mmap/Makefile
index df45819..a3359bc 100644
--- a/tools/ocaml/libs/mmap/Makefile
+++ b/tools/ocaml/libs/mmap/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT ?= $(TOPLEVEL)/../..
 include $(TOPLEVEL)/common.make
 
 OBJS = xenmmap
diff --git a/tools/ocaml/libs/xb/Makefile b/tools/ocaml/libs/xb/Makefile
index 09d1bc8..c41aa92 100644
--- a/tools/ocaml/libs/xb/Makefile
+++ b/tools/ocaml/libs/xb/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT ?= $(TOPLEVEL)/../..
 include $(TOPLEVEL)/common.make
 
 CFLAGS += -I../mmap
diff --git a/tools/ocaml/libs/xc/Makefile b/tools/ocaml/libs/xc/Makefile
index d24b014..3b83138 100644
--- a/tools/ocaml/libs/xc/Makefile
+++ b/tools/ocaml/libs/xc/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT ?= $(TOPLEVEL)/../..
 include $(TOPLEVEL)/common.make
 
 CFLAGS += -I../mmap $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest)
diff --git a/tools/ocaml/libs/xentoollog/Makefile 
b/tools/ocaml/libs/xentoollog/Makefile
index 8ae0a78..75b4664 100644
--- a/tools/ocaml/libs/xentoollog/Makefile
+++ b/tools/ocaml/libs/xentoollog/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT ?= $(TOPLEVEL)/../..
 include $(TOPLEVEL)/common.make
 
 # allow mixed declarations and code
diff --git a/tools/ocaml/libs/xl/Makefile b/tools/ocaml/libs/xl/Makefile
index 0d1549d..66d0c3e 100644
--- a/tools/ocaml/libs/xl/Makefile
+++ b/tools/ocaml/libs/xl/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT ?= $(TOPLEVEL)/../..
 include $(TOPLEVEL)/common.make
 
 # ignore unused generated functions and allow mixed declarations and code
diff --git a/tools/ocaml/libs/xs/Makefile b/tools/ocaml/libs/xs/Makefile
index 7a3d886..c9f2f54 100644
--- a/tools/ocaml/libs/xs/Makefile
+++ b/tools/ocaml/libs/xs/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT ?= $(TOPLEVEL)/../..
 include $(TOPLEVEL)/common.make
 
 OCAMLINCLUDE += -I ../xb/
diff --git a/tools/ocaml/test/Makefile b/tools/ocaml/test/Makefile
index 30a304b..737d5f1 100644
--- a/tools/ocaml/test/Makefile
+++ b/tools/ocaml/test/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 OCAML_TOPLEVEL = $(CURDIR)/..
 include $(OCAML_TOPLEVEL)/common.make
 
diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile
index 59875f7..a0274a2 100644
--- a/tools/ocaml/xenstored/Makefile
+++ b/tools/ocaml/xenstored/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT  ?=  $(CURDIR)/../../..
 OCAML_TOPLEVEL = $(CURDIR)/..
 include $(OCAML_TOPLEVEL)/common.make
 
diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
index fe8e03b..e423be4 100644
--- a/tools/pygrub/Makefile
+++ b/tools/pygrub/Makefile
@@ -1,5 +1,5 @@
 
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS) $(APPEND_LDFLAGS)
diff --git a/tools/python/Makefile b/tools/python/Makefile
index 2363537..33b75bd 100644
--- a/tools/python/Makefile
+++ b/tools/python/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 .PHONY: all
diff --git a/tools/tests/Makefile b/tools/tests/Makefile
index adeb120..6902bd2 100644
--- a/tools/tests/Makefile
+++ b/tools/tests/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += $(CFLAGS_libxenctrl)
diff --git a/tools/tests/mce-test/tools/Makefile 
b/tools/tests/mce-test/tools/Makefile
index 0e92ac2..fcf3e8f 100644
--- a/tools/tests/mce-test/tools/Makefile
+++ b/tools/tests/mce-test/tools/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../../..
+XEN_ROOT ?= $(CURDIR)/../../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
diff --git a/tools/tests/mem-sharing/Makefile b/tools/tests/mem-sharing/Makefile
index d89e283..39ff84e 100644
--- a/tools/tests/mem-sharing/Makefile
+++ b/tools/tests/mem-sharing/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT ?= $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
diff --git a/tools/tests/regression/Makefile b/tools/tests/regression/Makefile
index 70d524a..83d871b 100644
--- a/tools/tests/regression/Makefile
+++ b/tools/tests/regression/Makefile
@@ -5,7 +5,7 @@
 # To run this, at least the basic build / development environment must
 # be installed (gcc, ...)
 #
-XEN_ROOT=$(PWD)/../../..
+XEN_ROOT ?= $(PWD)/../../..
 REG_TEST_DIR=$(PWD)
 
 PYTHON_VERSIONS=python-2.3 python-2.4 python-2.5 python-2.6 python-3.1
diff --git a/tools/tests/vhpet/Makefile b/tools/tests/vhpet/Makefile
index cb88dd0..5ed2720 100644
--- a/tools/tests/vhpet/Makefile
+++ b/tools/tests/vhpet/Makefile
@@ -1,5 +1,5 @@
 
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT ?= $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 TARGET := test_vhpet
diff --git a/tools/tests/x86_emulator/Makefile 
b/tools/tests/x86_emulator/Makefile
index b52f227..033cebe 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -1,5 +1,5 @@
 
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT ?= $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 TARGET := test_x86_emulator
diff --git a/tools/tests/xen-access/Makefile b/tools/tests/xen-access/Makefile
index 25ff469..6be2916 100644
--- a/tools/tests/xen-access/Makefile
+++ b/tools/tests/xen-access/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT ?= $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
diff --git a/tools/xcutils/Makefile b/tools/xcutils/Makefile
index e127af8..ed83644 100644
--- a/tools/xcutils/Makefile
+++ b/tools/xcutils/Makefile
@@ -8,7 +8,7 @@
 # Copyright (C) 2005 by Christian Limpach
 #
 
-XEN_ROOT       = $(CURDIR)/../..
+XEN_ROOT        ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 PROGRAMS = readnotes lsevtchn
diff --git a/tools/xenbackendd/Makefile b/tools/xenbackendd/Makefile
index f52be74..06ad929 100644
--- a/tools/xenbackendd/Makefile
+++ b/tools/xenbackendd/Makefile
@@ -9,7 +9,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT ?= $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += -Werror
diff --git a/tools/xenmon/Makefile b/tools/xenmon/Makefile
index 98056f2..6c26e8c 100644
--- a/tools/xenmon/Makefile
+++ b/tools/xenmon/Makefile
@@ -10,7 +10,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT ?= $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += -Werror
diff --git a/tools/xenpaging/Makefile b/tools/xenpaging/Makefile
index 64876b3..58b1eaa 100644
--- a/tools/xenpaging/Makefile
+++ b/tools/xenpaging/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT ?= $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 # xenpaging.c and file_ops.c incorrectly use libxc internals
diff --git a/tools/xenpmd/Makefile b/tools/xenpmd/Makefile
index 55e8fc5..8eb417b 100644
--- a/tools/xenpmd/Makefile
+++ b/tools/xenpmd/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT ?= $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
diff --git a/tools/xenstat/Makefile b/tools/xenstat/Makefile
index 901be4a..a02b83c 100644
--- a/tools/xenstat/Makefile
+++ b/tools/xenstat/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT  ?=  $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS :=
diff --git a/tools/xenstat/libxenstat/Makefile 
b/tools/xenstat/libxenstat/Makefile
index 850d24a..99de0a1 100644
--- a/tools/xenstat/libxenstat/Makefile
+++ b/tools/xenstat/libxenstat/Makefile
@@ -12,7 +12,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # Lesser General Public License for more details.
 
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT ?= $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 LDCONFIG=ldconfig
diff --git a/tools/xenstat/xentop/Makefile b/tools/xenstat/xentop/Makefile
index 1cc393f..4063248 100644
--- a/tools/xenstat/xentop/Makefile
+++ b/tools/xenstat/xentop/Makefile
@@ -10,7 +10,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT ?= $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 ifneq ($(XENSTAT_XENTOP),y)
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index d691b78..3b2c813 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT ?= $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR = 3.0
diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile
index 0157be2..52a14b1 100644
--- a/tools/xentrace/Makefile
+++ b/tools/xentrace/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT ?= $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.