xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0 of 5] Build system tweaks
@ 2012-07-31 15:51 Andrew Cooper
  2012-07-31 15:51 ` [PATCH 1 of 5] tools/ocaml: ignore and clean .spot and .spit files Andrew Cooper
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Andrew Cooper @ 2012-07-31 15:51 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell, Ian Jackson, Keir Fraser, Jan Beulich

This patch series comes as a result of integrating xen-unstable into the
XenServer build system, and trying to remove some of the hacks we have
accumulated over time.

The patches are a bit of mix, but none of the defaults are changed.  As such, I
recommend the series be considered for 4.2.

~Andrew

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1 of 5] tools/ocaml: ignore and clean .spot and .spit files
  2012-07-31 15:51 [PATCH 0 of 5] Build system tweaks Andrew Cooper
@ 2012-07-31 15:51 ` Andrew Cooper
  2012-07-31 16:08   ` Ian Jackson
  2012-07-31 15:51 ` [PATCH 2 of 5] tools/config: Allow building of components to be controlled from .config Andrew Cooper
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 21+ messages in thread
From: Andrew Cooper @ 2012-07-31 15:51 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell, Ian Jackson, Keir Fraser, Jan Beulich

Newer ocaml toolchains generate .spot and .spit files which are ocaml metadata
about their respective source files.

Add them to the clean rules as well as the .{hg,git}ignore files.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

diff -r e6266fc76d08 -r 7012e0d68f3b .gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,8 @@
 *.bin
 *.bak
 *.tmp
+*.spot
+*.spit
 TAGS
 cscope.files
 cscope.in.out
diff -r e6266fc76d08 -r 7012e0d68f3b .hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -15,6 +15,8 @@
 .*\.flc$
 .*\.orig$
 .*\.rej$
+.*\.spot$
+.*\.spit$
 .*/a\.out$
 .*/Modules\.symvers$
 .*/cscope\..*$
diff -r e6266fc76d08 -r 7012e0d68f3b tools/ocaml/Makefile.rules
--- a/tools/ocaml/Makefile.rules
+++ b/tools/ocaml/Makefile.rules
@@ -45,7 +45,7 @@ ALL_OCAML_OBJ_SOURCES=$(addsuffix .ml, $
 	$(call quiet-command, $(OCAMLDEP) $(ALL_OCAML_OBJ_SOURCES) *.mli $o,MLDEP,)
 
 clean: $(CLEAN_HOOKS)
-	$(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make
+	$(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot *.spot *.spit $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make
 
 quiet-command = $(if $(V),$1,@printf " %-8s %s\n" "$2" "$3" && $1)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 2 of 5] tools/config: Allow building of components to be controlled from .config
  2012-07-31 15:51 [PATCH 0 of 5] Build system tweaks Andrew Cooper
  2012-07-31 15:51 ` [PATCH 1 of 5] tools/ocaml: ignore and clean .spot and .spit files Andrew Cooper
@ 2012-07-31 15:51 ` Andrew Cooper
  2012-07-31 16:10   ` Ian Jackson
  2012-07-31 15:51 ` [PATCH 3 of 5] config: Split debug build from debug symbols Andrew Cooper
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 21+ messages in thread
From: Andrew Cooper @ 2012-07-31 15:51 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell, Ian Jackson, Keir Fraser, Jan Beulich

For build systems which build certain Xen components separately, allow certain
components to be conditionally built based on .config, rather than always
building them.

This patch allows qemu and blktap to be configured in this manner.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

diff -r 7012e0d68f3b -r 2d5cac99caf7 config/x86_32.mk
--- a/config/x86_32.mk
+++ b/config/x86_32.mk
@@ -5,7 +5,7 @@ CONFIG_X86_$(XEN_OS) := y
 CONFIG_HVM := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
-CONFIG_IOEMU := y
+CONFIG_IOEMU ?= y
 
 CFLAGS += -m32 -march=i686
 
diff -r 7012e0d68f3b -r 2d5cac99caf7 config/x86_64.mk
--- a/config/x86_64.mk
+++ b/config/x86_64.mk
@@ -6,7 +6,7 @@ CONFIG_COMPAT := y
 CONFIG_HVM := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
-CONFIG_IOEMU := y
+CONFIG_IOEMU ?= y
 
 CFLAGS += -m64
 
diff -r 7012e0d68f3b -r 2d5cac99caf7 tools/Rules.mk
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -40,9 +40,9 @@ LDLIBS_libxenvchan = $(SHLIB_libxenctrl)
 SHLIB_libxenvchan  = -Wl,-rpath-link=$(XEN_LIBVCHAN)
 
 ifeq ($(CONFIG_Linux),y)
-LIBXL_BLKTAP = y
+LIBXL_BLKTAP ?= y
 else
-LIBXL_BLKTAP = n
+LIBXL_BLKTAP ?= n
 endif
 
 ifeq ($(LIBXL_BLKTAP),y)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 3 of 5] config: Split debug build from debug symbols
  2012-07-31 15:51 [PATCH 0 of 5] Build system tweaks Andrew Cooper
  2012-07-31 15:51 ` [PATCH 1 of 5] tools/ocaml: ignore and clean .spot and .spit files Andrew Cooper
  2012-07-31 15:51 ` [PATCH 2 of 5] tools/config: Allow building of components to be controlled from .config Andrew Cooper
@ 2012-07-31 15:51 ` Andrew Cooper
  2012-07-31 16:12   ` Ian Jackson
  2012-08-13 17:14   ` Ian Jackson
  2012-07-31 15:52 ` [PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally Andrew Cooper
  2012-07-31 15:52 ` [PATCH 5 of 5] makefile: Use $(abspath) for XEN_ROOT Andrew Cooper
  4 siblings, 2 replies; 21+ messages in thread
From: Andrew Cooper @ 2012-07-31 15:51 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell, Ian Jackson, Keir Fraser, Jan Beulich

RPM based packaging systems expect binaries to have debug symbols which get
placed in a separate debuginfo RPM.

Split the concept of a debug build up so that binaries can be built with
debugging symbols without having the other gubbins which $(debug) implies, most
notibly frame pointers.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

diff -r 2d5cac99caf7 -r 6db5c184a777 Config.mk
--- a/Config.mk
+++ b/Config.mk
@@ -11,6 +11,7 @@ realpath = $(wildcard $(foreach file,$(1
 
 # A debug build of Xen and tools?
 debug ?= y
+debug_symbols ?= $(debug)
 
 XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
                          -e s/i86pc/x86_32/ -e s/amd64/x86_64/ -e s/arm.*/arm/)
@@ -147,7 +148,7 @@ define buildmakevars2file-closure
 	$(call move-if-changed,$(1).tmp,$(1))
 endef
 
-ifeq ($(debug),y)
+ifeq ($(debug_symbols),y)
 CFLAGS += -g
 endif

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally
  2012-07-31 15:51 [PATCH 0 of 5] Build system tweaks Andrew Cooper
                   ` (2 preceding siblings ...)
  2012-07-31 15:51 ` [PATCH 3 of 5] config: Split debug build from debug symbols Andrew Cooper
@ 2012-07-31 15:52 ` Andrew Cooper
  2012-07-31 16:55   ` Ian Jackson
  2012-07-31 15:52 ` [PATCH 5 of 5] makefile: Use $(abspath) for XEN_ROOT Andrew Cooper
  4 siblings, 1 reply; 21+ messages in thread
From: Andrew Cooper @ 2012-07-31 15:52 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell, Ian Jackson, Keir Fraser, Jan Beulich

Build systems which build Xen from a source tarball rather than from a mercurial
tree (such as constructing an SRPM then building an RPM from it) will always end
up having the changeset set as "unavailable".

This change allows a build system to be able to provide changeset information
even when the source is not part of a mercurial repository.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

diff -r 6db5c184a777 -r ae32690d0d74 xen/Makefile
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -13,6 +13,7 @@ export BASEDIR := $(CURDIR)
 export XEN_ROOT := $(BASEDIR)/..
 
 EFI_MOUNTPOINT ?= /boot/efi
+XEN_CHANGESET  ?= $(shell hg root &> /dev/null && hg parents --template "{date|date} {rev}:{node|short}" || echo "unavailable" )
 
 .PHONY: default
 default: build
@@ -107,7 +108,7 @@ include/xen/compile.h: include/xen/compi
 	    -e 's/@@version@@/$(XEN_VERSION)/g' \
 	    -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
 	    -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
-	    -e 's!@@changeset@@!$(shell ((hg parents --template "{date|date} {rev}:{node|short}" >/dev/null && hg parents --template "{date|date} {rev}:{node|short}") || echo "unavailable") 2>/dev/null)!g' \
+	    -e 's!@@changeset@@!$(XEN_CHANGESET)!g' \
 	    < include/xen/compile.h.in > $@.new
 	@grep \" .banner >> $@.new
 	@grep -v \" .banner

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 5 of 5] makefile: Use $(abspath) for XEN_ROOT
  2012-07-31 15:51 [PATCH 0 of 5] Build system tweaks Andrew Cooper
                   ` (3 preceding siblings ...)
  2012-07-31 15:52 ` [PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally Andrew Cooper
@ 2012-07-31 15:52 ` Andrew Cooper
  2012-07-31 16:38   ` Jan Beulich
  4 siblings, 1 reply; 21+ messages in thread
From: Andrew Cooper @ 2012-07-31 15:52 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell, Ian Jackson, Keir Fraser, Jan Beulich

This patch wraps the assignment of XEN_ROOT in each Makefile with a call to
$(abspath) which removes internal parent path references which result from the
definition of XEN_ROOT as $(CURDIR)../../ (etc).

For example, it changes the output from

  gcc readnotes.o -o readnotes
  /bind/myrepos/xen-unstable.hg/tools/xcutils/../../tools/libxc/libxenctrl.so
  /bind/myrepos/xen-unstable.hg/tools/xcutils/../../tools/libxc/libxenguest.so

to

  gcc readnotes.o -o readnotes /bind/myrepos/xen-unstable.hg/tools/libxc/libxenctrl.so
  /bind/myrepos/xen-unstable.hg/tools/libxc/libxenguest.so

which decreases verbosity and increases clarity when reading the build log.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

diff -r ae32690d0d74 -r c655330a5805 Config.mk
--- a/Config.mk
+++ b/Config.mk
@@ -122,7 +122,7 @@ endef
 define buildmakevars2shellvars
     export PREFIX="$(PREFIX)";                                            \
     export XEN_SCRIPT_DIR="$(XEN_SCRIPT_DIR)";                            \
-    export XEN_ROOT="$(XEN_ROOT)"
+    export XEN_ROOT=$(abspath "$(XEN_ROOT)")
 endef
 
 #
diff -r ae32690d0d74 -r c655330a5805 docs/Makefile
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 
-XEN_ROOT=$(CURDIR)/..
+XEN_ROOT=$(abspath $(CURDIR)/..)
 include $(XEN_ROOT)/Config.mk
 include $(XEN_ROOT)/docs/Docs.mk
 
diff -r ae32690d0d74 -r c655330a5805 docs/xen-api/Makefile
--- a/docs/xen-api/Makefile
+++ b/docs/xen-api/Makefile
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT=$(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/Config.mk
 include $(XEN_ROOT)/docs/Docs.mk
 
diff -r ae32690d0d74 -r c655330a5805 extras/mini-os/Makefile
--- a/extras/mini-os/Makefile
+++ b/extras/mini-os/Makefile
@@ -4,7 +4,7 @@
 # Makefile and a arch.mk.
 #
 
-export XEN_ROOT = $(CURDIR)/../..
+export XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/Config.mk
 OBJ_DIR ?= $(CURDIR)
 
diff -r ae32690d0d74 -r c655330a5805 extras/mini-os/arch/ia64/Makefile
--- a/extras/mini-os/arch/ia64/Makefile
+++ b/extras/mini-os/arch/ia64/Makefile
@@ -2,7 +2,7 @@
 # Special makefile for ia64.
 #
 
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../../..)
 include $(XEN_ROOT)/Config.mk
 
 include ../../Config.mk
diff -r ae32690d0d74 -r c655330a5805 extras/mini-os/arch/x86/Makefile
--- a/extras/mini-os/arch/x86/Makefile
+++ b/extras/mini-os/arch/x86/Makefile
@@ -3,7 +3,7 @@
 # It's is used for x86_32, x86_32y and x86_64
 #
 
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../../..)
 include $(XEN_ROOT)/Config.mk
 include ../../Config.mk
 
diff -r ae32690d0d74 -r c655330a5805 stubdom/Makefile
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/..
+XEN_ROOT = $(abspath $(CURDIR)/..)
 MINI_OS = $(XEN_ROOT)/extras/mini-os
 
 export XEN_OS=MiniOS
diff -r ae32690d0d74 -r c655330a5805 stubdom/c/Makefile
--- a/stubdom/c/Makefile
+++ b/stubdom/c/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 
 include $(XEN_ROOT)/Config.mk
 
diff -r ae32690d0d74 -r c655330a5805 stubdom/caml/Makefile
--- a/stubdom/caml/Makefile
+++ b/stubdom/caml/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 
 include $(XEN_ROOT)/Config.mk
 
diff -r ae32690d0d74 -r c655330a5805 stubdom/grub/Makefile
--- a/stubdom/grub/Makefile
+++ b/stubdom/grub/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 
 include $(XEN_ROOT)/Config.mk
 vpath %.c ../grub-upstream
diff -r ae32690d0d74 -r c655330a5805 stubdom/pciutils.patch
--- a/stubdom/pciutils.patch
+++ b/stubdom/pciutils.patch
@@ -38,7 +38,7 @@ diff -urN pciutils-2.2.9.orig/lib/access
  endif
  
 +ifdef PCI_OS_MINIOS
-+XEN_ROOT=$(CURDIR)/../../..
++XEN_ROOT=$(abspath $(CURDIR)/../../..)
 +include $(XEN_ROOT)/Config.mk
 +OBJS += minios.o
 +endif
diff -r ae32690d0d74 -r c655330a5805 tools/Makefile
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/..
+XEN_ROOT = $(abspath $(CURDIR)/..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 ifneq ($(CONFIG_SYSTEM_LIBAIO),y)
diff -r ae32690d0d74 -r c655330a5805 tools/blktap/Makefile
--- a/tools/blktap/Makefile
+++ b/tools/blktap/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS-y :=
diff -r ae32690d0d74 -r c655330a5805 tools/blktap/drivers/Makefile
--- a/tools/blktap/drivers/Makefile
+++ b/tools/blktap/drivers/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 IBIN         = blktapctrl tapdisk
diff -r ae32690d0d74 -r c655330a5805 tools/blktap/lib/Makefile
--- a/tools/blktap/lib/Makefile
+++ b/tools/blktap/lib/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 3.0
diff -r ae32690d0d74 -r c655330a5805 tools/blktap2/Makefile
--- a/tools/blktap2/Makefile
+++ b/tools/blktap2/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += $(CFLAGS_libxenctrl)
diff -r ae32690d0d74 -r c655330a5805 tools/blktap2/control/Makefile
--- a/tools/blktap2/control/Makefile
+++ b/tools/blktap2/control/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT := $(CURDIR)/../../../
+XEN_ROOT := $(abspath $(CURDIR)/../../../)
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR              = 1.0
diff -r ae32690d0d74 -r c655330a5805 tools/blktap2/drivers/Makefile
--- a/tools/blktap2/drivers/Makefile
+++ b/tools/blktap2/drivers/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT=$(abspath $(CURDIR)/../../..)
 BLKTAP_ROOT= ..
 include $(XEN_ROOT)/tools/Rules.mk
 
diff -r ae32690d0d74 -r c655330a5805 tools/blktap2/include/Makefile
--- a/tools/blktap2/include/Makefile
+++ b/tools/blktap2/include/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT := $(CURDIR)/../../..
+XEN_ROOT := $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 .PHONY: all
diff -r ae32690d0d74 -r c655330a5805 tools/blktap2/lvm/Makefile
--- a/tools/blktap2/lvm/Makefile
+++ b/tools/blktap2/lvm/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 BLKTAP_ROOT := ..
 include $(XEN_ROOT)/tools/Rules.mk
 
diff -r ae32690d0d74 -r c655330a5805 tools/blktap2/vhd/Makefile
--- a/tools/blktap2/vhd/Makefile
+++ b/tools/blktap2/vhd/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT=$(abspath $(CURDIR)/../../..)
 BLKTAP_ROOT := ..
 include $(XEN_ROOT)/tools/Rules.mk
 
diff -r ae32690d0d74 -r c655330a5805 tools/blktap2/vhd/lib/Makefile
--- a/tools/blktap2/vhd/lib/Makefile
+++ b/tools/blktap2/vhd/lib/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../../..
+XEN_ROOT=$(abspath $(CURDIR)/../../../..)
 BLKTAP_ROOT := ../..
 include $(XEN_ROOT)/tools/Rules.mk
 
diff -r ae32690d0d74 -r c655330a5805 tools/console/Makefile
--- a/tools/console/Makefile
+++ b/tools/console/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT=$(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += -Werror
diff -r ae32690d0d74 -r c655330a5805 tools/console/testsuite/Makefile
--- a/tools/console/testsuite/Makefile
+++ b/tools/console/testsuite/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 LDFLAGS=-static
diff -r ae32690d0d74 -r c655330a5805 tools/debugger/gdbsx/Makefile
--- a/tools/debugger/gdbsx/Makefile
+++ b/tools/debugger/gdbsx/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include ./Rules.mk
 
 .PHONY: all
diff -r ae32690d0d74 -r c655330a5805 tools/debugger/gdbsx/gx/Makefile
--- a/tools/debugger/gdbsx/gx/Makefile
+++ b/tools/debugger/gdbsx/gx/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../../..)
 include ../Rules.mk
 
 GX_OBJS := gx_comm.o gx_main.o gx_utils.o gx_local.o
diff -r ae32690d0d74 -r c655330a5805 tools/debugger/gdbsx/xg/Makefile
--- a/tools/debugger/gdbsx/xg/Makefile
+++ b/tools/debugger/gdbsx/xg/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../../..)
 include ../Rules.mk
 
 XG_HDRS := xg_public.h 
diff -r ae32690d0d74 -r c655330a5805 tools/debugger/kdd/Makefile
--- a/tools/debugger/kdd/Makefile
+++ b/tools/debugger/kdd/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += $(CFLAGS_libxenctrl)
diff -r ae32690d0d74 -r c655330a5805 tools/debugger/xenitp/Makefile
--- a/tools/debugger/xenitp/Makefile
+++ b/tools/debugger/xenitp/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT=$(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 #CFLAGS  += -Werror -g -O0
diff -r ae32690d0d74 -r c655330a5805 tools/examples/Makefile
--- a/tools/examples/Makefile
+++ b/tools/examples/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 # Init scripts.
diff -r ae32690d0d74 -r c655330a5805 tools/firmware/Makefile
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 # hvmloader is a 32-bit protected mode binary.
diff -r ae32690d0d74 -r c655330a5805 tools/firmware/etherboot/Makefile
--- 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 = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 include Config
 
diff -r ae32690d0d74 -r c655330a5805 tools/firmware/hvmloader/Makefile
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -18,7 +18,7 @@
 # Place - Suite 330, Boston, MA 02111-1307 USA.
 #
 
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 SUBDIRS := acpi
diff -r ae32690d0d74 -r c655330a5805 tools/firmware/hvmloader/acpi/Makefile
--- a/tools/firmware/hvmloader/acpi/Makefile
+++ b/tools/firmware/hvmloader/acpi/Makefile
@@ -15,7 +15,7 @@
 # Place - Suite 330, Boston, MA 02111-1307 USA.
 #
 
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT = $(abspath $(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 -r ae32690d0d74 -r c655330a5805 tools/firmware/rombios/32bit/Makefile
--- a/tools/firmware/rombios/32bit/Makefile
+++ b/tools/firmware/rombios/32bit/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../../..)
 include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 TARGET = 32bitbios_flat.h
diff -r ae32690d0d74 -r c655330a5805 tools/firmware/rombios/32bit/tcgbios/Makefile
--- a/tools/firmware/rombios/32bit/tcgbios/Makefile
+++ b/tools/firmware/rombios/32bit/tcgbios/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../../../..)
 include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 TARGET  = tcgbiosext.o
diff -r ae32690d0d74 -r c655330a5805 tools/firmware/rombios/Makefile
--- a/tools/firmware/rombios/Makefile
+++ b/tools/firmware/rombios/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS := 32bit
diff -r ae32690d0d74 -r c655330a5805 tools/flask/Makefile
--- a/tools/flask/Makefile
+++ b/tools/flask/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS :=
diff -r ae32690d0d74 -r c655330a5805 tools/flask/utils/Makefile
--- a/tools/flask/utils/Makefile
+++ b/tools/flask/utils/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT=$(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Wall -g -Werror
diff -r ae32690d0d74 -r c655330a5805 tools/hotplug/Linux/Makefile
--- a/tools/hotplug/Linux/Makefile
+++ b/tools/hotplug/Linux/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 # Init scripts.
diff -r ae32690d0d74 -r c655330a5805 tools/hotplug/Makefile
--- a/tools/hotplug/Makefile
+++ b/tools/hotplug/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS-y := common
diff -r ae32690d0d74 -r c655330a5805 tools/hotplug/NetBSD/Makefile
--- a/tools/hotplug/NetBSD/Makefile
+++ b/tools/hotplug/NetBSD/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 # Xen script dir and scripts to go there.
diff -r ae32690d0d74 -r c655330a5805 tools/hotplug/common/Makefile
--- a/tools/hotplug/common/Makefile
+++ b/tools/hotplug/common/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 HOTPLUGPATH="hotplugpath.sh"
diff -r ae32690d0d74 -r c655330a5805 tools/include/Makefile
--- a/tools/include/Makefile
+++ b/tools/include/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 .PHONY: all
diff -r ae32690d0d74 -r c655330a5805 tools/include/xen-foreign/Makefile
--- a/tools/include/xen-foreign/Makefile
+++ b/tools/include/xen-foreign/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT=$(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 ROOT = $(XEN_ROOT)/xen/include/public
diff -r ae32690d0d74 -r c655330a5805 tools/libaio/src/Makefile
--- a/tools/libaio/src/Makefile
+++ b/tools/libaio/src/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 prefix=$(PREFIX)
diff -r ae32690d0d74 -r c655330a5805 tools/libfsimage/Makefile
--- a/tools/libfsimage/Makefile
+++ b/tools/libfsimage/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS-y = common ufs reiserfs iso9660 fat zfs
diff -r ae32690d0d74 -r c655330a5805 tools/libfsimage/common/Makefile
--- a/tools/libfsimage/common/Makefile
+++ b/tools/libfsimage/common/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
 
 MAJOR = 1.0
diff -r ae32690d0d74 -r c655330a5805 tools/libfsimage/ext2fs-lib/Makefile
--- a/tools/libfsimage/ext2fs-lib/Makefile
+++ b/tools/libfsimage/ext2fs-lib/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 
 LIB_SRCS-y = ext2fs-lib.c
 
diff -r ae32690d0d74 -r c655330a5805 tools/libfsimage/ext2fs/Makefile
--- a/tools/libfsimage/ext2fs/Makefile
+++ b/tools/libfsimage/ext2fs/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 
 LIB_SRCS-y = fsys_ext2fs.c
 
diff -r ae32690d0d74 -r c655330a5805 tools/libfsimage/fat/Makefile
--- a/tools/libfsimage/fat/Makefile
+++ b/tools/libfsimage/fat/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 
 LIB_SRCS-y = fsys_fat.c
 
diff -r ae32690d0d74 -r c655330a5805 tools/libfsimage/iso9660/Makefile
--- a/tools/libfsimage/iso9660/Makefile
+++ b/tools/libfsimage/iso9660/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 
 LIB_SRCS-y = fsys_iso9660.c
 
diff -r ae32690d0d74 -r c655330a5805 tools/libfsimage/reiserfs/Makefile
--- a/tools/libfsimage/reiserfs/Makefile
+++ b/tools/libfsimage/reiserfs/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 
 LIB_SRCS-y = fsys_reiserfs.c
 
diff -r ae32690d0d74 -r c655330a5805 tools/libfsimage/ufs/Makefile
--- a/tools/libfsimage/ufs/Makefile
+++ b/tools/libfsimage/ufs/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 
 LIB_SRCS-y = fsys_ufs.c
 
diff -r ae32690d0d74 -r c655330a5805 tools/libfsimage/xfs/Makefile
--- a/tools/libfsimage/xfs/Makefile
+++ b/tools/libfsimage/xfs/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 
 LIB_SRCS-y = fsys_xfs.c
 
diff -r ae32690d0d74 -r c655330a5805 tools/libfsimage/zfs/Makefile
--- a/tools/libfsimage/zfs/Makefile
+++ b/tools/libfsimage/zfs/Makefile
@@ -22,7 +22,7 @@
 #  Use is subject to license terms.
 #
 
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(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 -r ae32690d0d74 -r c655330a5805 tools/libvchan/Makefile
--- a/tools/libvchan/Makefile
+++ b/tools/libvchan/Makefile
@@ -2,7 +2,7 @@
 # tools/libvchan/Makefile
 #
 
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 LIBVCHAN_OBJS = init.o io.o
diff -r ae32690d0d74 -r c655330a5805 tools/libxc/Makefile
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 4.2
diff -r ae32690d0d74 -r c655330a5805 tools/libxen/Makefile
--- a/tools/libxen/Makefile
+++ b/tools/libxen/Makefile
@@ -15,7 +15,7 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 #
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT=$(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR = 1.0
diff -r ae32690d0d74 -r c655330a5805 tools/libxl/Makefile
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -2,7 +2,7 @@
 # tools/libxl/Makefile
 #
 
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR = 2.0
diff -r ae32690d0d74 -r c655330a5805 tools/memshr/Makefile
--- a/tools/memshr/Makefile
+++ b/tools/memshr/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 LIBMEMSHR-BUILD := libmemshr.a
diff -r ae32690d0d74 -r c655330a5805 tools/misc/Makefile
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT=$(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
diff -r ae32690d0d74 -r c655330a5805 tools/misc/lomount/Makefile
--- a/tools/misc/lomount/Makefile
+++ b/tools/misc/lomount/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT=$(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += -Werror
diff -r ae32690d0d74 -r c655330a5805 tools/misc/miniterm/Makefile
--- a/tools/misc/miniterm/Makefile
+++ b/tools/misc/miniterm/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT:=$(CURDIR)/../../..
+XEN_ROOT:=$(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 TARGET = miniterm
diff -r ae32690d0d74 -r c655330a5805 tools/misc/nsplitd/Makefile
--- a/tools/misc/nsplitd/Makefile
+++ b/tools/misc/nsplitd/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT := $(CURDIR)/../../..
+XEN_ROOT := $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFILES = $(wildcard *.c)
diff -r ae32690d0d74 -r c655330a5805 tools/ocaml/Makefile
--- a/tools/ocaml/Makefile
+++ b/tools/ocaml/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS_PROGRAMS = xenstored
diff -r ae32690d0d74 -r c655330a5805 tools/ocaml/libs/Makefile
--- a/tools/ocaml/libs/Makefile
+++ b/tools/ocaml/libs/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS= \
diff -r ae32690d0d74 -r c655330a5805 tools/ocaml/libs/eventchn/Makefile
--- a/tools/ocaml/libs/eventchn/Makefile
+++ b/tools/ocaml/libs/eventchn/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT=$(abspath $(TOPLEVEL)/../..)
 include $(TOPLEVEL)/common.make
 
 CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_xeninclude)
diff -r ae32690d0d74 -r c655330a5805 tools/ocaml/libs/mmap/Makefile
--- a/tools/ocaml/libs/mmap/Makefile
+++ b/tools/ocaml/libs/mmap/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT=$(abspath $(TOPLEVEL)/../..)
 include $(TOPLEVEL)/common.make
 
 OBJS = xenmmap
diff -r ae32690d0d74 -r c655330a5805 tools/ocaml/libs/xb/Makefile
--- a/tools/ocaml/libs/xb/Makefile
+++ b/tools/ocaml/libs/xb/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT=$(abspath $(TOPLEVEL)/../..)
 include $(TOPLEVEL)/common.make
 
 CFLAGS += -I../mmap
diff -r ae32690d0d74 -r c655330a5805 tools/ocaml/libs/xc/Makefile
--- a/tools/ocaml/libs/xc/Makefile
+++ b/tools/ocaml/libs/xc/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT=$(abspath $(TOPLEVEL)/../..)
 include $(TOPLEVEL)/common.make
 
 CFLAGS += -I../mmap $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest)
diff -r ae32690d0d74 -r c655330a5805 tools/ocaml/libs/xl/Makefile
--- a/tools/ocaml/libs/xl/Makefile
+++ b/tools/ocaml/libs/xl/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT=$(abspath $(TOPLEVEL)/../..)
 include $(TOPLEVEL)/common.make
 
 # ignore unused generated functions
diff -r ae32690d0d74 -r c655330a5805 tools/ocaml/libs/xs/Makefile
--- a/tools/ocaml/libs/xs/Makefile
+++ b/tools/ocaml/libs/xs/Makefile
@@ -1,5 +1,5 @@
 TOPLEVEL=$(CURDIR)/../..
-XEN_ROOT=$(TOPLEVEL)/../..
+XEN_ROOT=$(abspath $(TOPLEVEL)/../..)
 include $(TOPLEVEL)/common.make
 
 OCAMLINCLUDE += -I ../xb/
diff -r ae32690d0d74 -r c655330a5805 tools/ocaml/xenstored/Makefile
--- a/tools/ocaml/xenstored/Makefile
+++ b/tools/ocaml/xenstored/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 OCAML_TOPLEVEL = $(CURDIR)/..
 include $(OCAML_TOPLEVEL)/common.make
 
diff -r ae32690d0d74 -r c655330a5805 tools/pygrub/Makefile
--- a/tools/pygrub/Makefile
+++ b/tools/pygrub/Makefile
@@ -1,5 +1,5 @@
 
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 .PHONY: all
diff -r ae32690d0d74 -r c655330a5805 tools/python/Makefile
--- a/tools/python/Makefile
+++ b/tools/python/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 .PHONY: all
diff -r ae32690d0d74 -r c655330a5805 tools/remus/Makefile
--- a/tools/remus/Makefile
+++ b/tools/remus/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT=$(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 SCRIPTS = remus
diff -r ae32690d0d74 -r c655330a5805 tools/tests/Makefile
--- a/tools/tests/Makefile
+++ b/tools/tests/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += $(CFLAGS_libxenctrl)
diff -r ae32690d0d74 -r c655330a5805 tools/tests/mce-test/tools/Makefile
--- a/tools/tests/mce-test/tools/Makefile
+++ b/tools/tests/mce-test/tools/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../../..
+XEN_ROOT=$(abspath $(CURDIR)/../../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
diff -r ae32690d0d74 -r c655330a5805 tools/tests/mem-sharing/Makefile
--- a/tools/tests/mem-sharing/Makefile
+++ b/tools/tests/mem-sharing/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT=$(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
diff -r ae32690d0d74 -r c655330a5805 tools/tests/regression/Makefile
--- 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=$(abspath $(PWD)/../../..)
 REG_TEST_DIR=$(PWD)
 
 PYTHON_VERSIONS=python-2.3 python-2.4 python-2.5 python-2.6 python-3.1
diff -r ae32690d0d74 -r c655330a5805 tools/tests/x86_emulator/Makefile
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -1,5 +1,5 @@
 
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT=$(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 TARGET := test_x86_emulator
diff -r ae32690d0d74 -r c655330a5805 tools/tests/x86_emulator/blowfish.mk
--- a/tools/tests/x86_emulator/blowfish.mk
+++ b/tools/tests/x86_emulator/blowfish.mk
@@ -1,5 +1,5 @@
 
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 CFLAGS =
 include $(XEN_ROOT)/tools/Rules.mk
 
diff -r ae32690d0d74 -r c655330a5805 tools/tests/xen-access/Makefile
--- a/tools/tests/xen-access/Makefile
+++ b/tools/tests/xen-access/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT=$(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
diff -r ae32690d0d74 -r c655330a5805 tools/vtpm/Makefile
--- a/tools/vtpm/Makefile
+++ b/tools/vtpm/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 
 # Base definitions and rules
 include $(XEN_ROOT)/tools/vtpm/Rules.mk
diff -r ae32690d0d74 -r c655330a5805 tools/vtpm_manager/Makefile
--- a/tools/vtpm_manager/Makefile
+++ b/tools/vtpm_manager/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 
 # Base definitions and rules
 include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
diff -r ae32690d0d74 -r c655330a5805 tools/vtpm_manager/crypto/Makefile
--- a/tools/vtpm_manager/crypto/Makefile
+++ b/tools/vtpm_manager/crypto/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
 
 BIN		= libtcpaCrypto.a
diff -r ae32690d0d74 -r c655330a5805 tools/vtpm_manager/manager/Makefile
--- a/tools/vtpm_manager/manager/Makefile
+++ b/tools/vtpm_manager/manager/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
 
 BIN		= vtpm_managerd
diff -r ae32690d0d74 -r c655330a5805 tools/vtpm_manager/migration/Makefile
--- a/tools/vtpm_manager/migration/Makefile
+++ b/tools/vtpm_manager/migration/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
 
 VPATH = ../manager
diff -r ae32690d0d74 -r c655330a5805 tools/vtpm_manager/tcs/Makefile
--- a/tools/vtpm_manager/tcs/Makefile
+++ b/tools/vtpm_manager/tcs/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
 
 BIN		= libTCS.a
diff -r ae32690d0d74 -r c655330a5805 tools/vtpm_manager/util/Makefile
--- a/tools/vtpm_manager/util/Makefile
+++ b/tools/vtpm_manager/util/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../../..
+XEN_ROOT = $(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
 
 BIN		= libTCGUtils.a
diff -r ae32690d0d74 -r c655330a5805 tools/xcutils/Makefile
--- a/tools/xcutils/Makefile
+++ b/tools/xcutils/Makefile
@@ -8,7 +8,7 @@
 # Copyright (C) 2005 by Christian Limpach
 #
 
-XEN_ROOT	= $(CURDIR)/../..
+XEN_ROOT	= $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 PROGRAMS = xc_restore xc_save readnotes lsevtchn
diff -r ae32690d0d74 -r c655330a5805 tools/xenbackendd/Makefile
--- 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=$(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += -Werror
diff -r ae32690d0d74 -r c655330a5805 tools/xenmon/Makefile
--- 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=$(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += -Werror
diff -r ae32690d0d74 -r c655330a5805 tools/xenpaging/Makefile
--- a/tools/xenpaging/Makefile
+++ b/tools/xenpaging/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT=$(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(PTHREAD_CFLAGS)
diff -r ae32690d0d74 -r c655330a5805 tools/xenpmd/Makefile
--- a/tools/xenpmd/Makefile
+++ b/tools/xenpmd/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT=$(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
diff -r ae32690d0d74 -r c655330a5805 tools/xenstat/Makefile
--- a/tools/xenstat/Makefile
+++ b/tools/xenstat/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT = $(CURDIR)/../..
+XEN_ROOT = $(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS :=
diff -r ae32690d0d74 -r c655330a5805 tools/xenstat/libxenstat/Makefile
--- 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=$(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 prefix=$(PREFIX)
diff -r ae32690d0d74 -r c655330a5805 tools/xenstat/xentop/Makefile
--- 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=$(abspath $(CURDIR)/../../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 ifneq ($(XENSTAT_XENTOP),y)
diff -r ae32690d0d74 -r c655330a5805 tools/xenstore/Makefile
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT=$(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR = 3.0
diff -r ae32690d0d74 -r c655330a5805 tools/xentrace/Makefile
--- a/tools/xentrace/Makefile
+++ b/tools/xentrace/Makefile
@@ -1,4 +1,4 @@
-XEN_ROOT=$(CURDIR)/../..
+XEN_ROOT=$(abspath $(CURDIR)/../..)
 include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
diff -r ae32690d0d74 -r c655330a5805 xen/Makefile
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -10,7 +10,7 @@ export XEN_WHOAMI	?= $(USER)
 export XEN_DOMAIN	?= $(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))
 
 export BASEDIR := $(CURDIR)
-export XEN_ROOT := $(BASEDIR)/..
+export XEN_ROOT := $(abspath $(BASEDIR)/..)
 
 EFI_MOUNTPOINT ?= /boot/efi
 XEN_CHANGESET  ?= $(shell hg root &> /dev/null && hg parents --template "{date|date} {rev}:{node|short}" || echo "unavailable" )

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1 of 5] tools/ocaml: ignore and clean .spot and .spit files
  2012-07-31 15:51 ` [PATCH 1 of 5] tools/ocaml: ignore and clean .spot and .spit files Andrew Cooper
@ 2012-07-31 16:08   ` Ian Jackson
  2012-08-01 11:47     ` Ian Campbell
  0 siblings, 1 reply; 21+ messages in thread
From: Ian Jackson @ 2012-07-31 16:08 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Keir (Xen.org), Ian Campbell, Jan Beulich,
	xen-devel@lists.xen.org

Andrew Cooper writes ("[PATCH 1 of 5] tools/ocaml: ignore and clean .spot and .spit files"):
> Newer ocaml toolchains generate .spot and .spit files which are ocaml metadata
> about their respective source files.
> 
> Add them to the clean rules as well as the .{hg,git}ignore files.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

This is good for 4.2 IMO

Ian.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 2 of 5] tools/config: Allow building of components to be controlled from .config
  2012-07-31 15:51 ` [PATCH 2 of 5] tools/config: Allow building of components to be controlled from .config Andrew Cooper
@ 2012-07-31 16:10   ` Ian Jackson
  2012-08-01 11:47     ` Ian Campbell
  0 siblings, 1 reply; 21+ messages in thread
From: Ian Jackson @ 2012-07-31 16:10 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Keir (Xen.org), Ian Campbell, Jan Beulich,
	xen-devel@lists.xen.org

Andrew Cooper writes ("[PATCH 2 of 5] tools/config: Allow building of components to be controlled from .config"):
> For build systems which build certain Xen components separately, allow certain
> components to be conditionally built based on .config, rather than always
> building them.
> 
> This patch allows qemu and blktap to be configured in this manner.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Good for 4.2 IMO.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3 of 5] config: Split debug build from debug symbols
  2012-07-31 15:51 ` [PATCH 3 of 5] config: Split debug build from debug symbols Andrew Cooper
@ 2012-07-31 16:12   ` Ian Jackson
  2012-08-01 11:47     ` Ian Campbell
  2012-08-13 17:14   ` Ian Jackson
  1 sibling, 1 reply; 21+ messages in thread
From: Ian Jackson @ 2012-07-31 16:12 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Keir (Xen.org), Ian Campbell, Jan Beulich,
	xen-devel@lists.xen.org

Andrew Cooper writes ("[PATCH 3 of 5] config: Split debug build from debug symbols"):
> RPM based packaging systems expect binaries to have debug symbols which get
> placed in a separate debuginfo RPM.
> 
> Split the concept of a debug build up so that binaries can be built with
> debugging symbols without having the other gubbins which $(debug) implies, most
> notibly frame pointers.

This looks plausible (for 4.2) but I would like to run a test build
and check the results.

Ian.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 5 of 5] makefile: Use $(abspath) for XEN_ROOT
  2012-07-31 15:52 ` [PATCH 5 of 5] makefile: Use $(abspath) for XEN_ROOT Andrew Cooper
@ 2012-07-31 16:38   ` Jan Beulich
  2012-07-31 16:54     ` Ian Jackson
  2012-07-31 17:36     ` Andrew Cooper
  0 siblings, 2 replies; 21+ messages in thread
From: Jan Beulich @ 2012-07-31 16:38 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Ian Campbell, Keir Fraser, Ian Jackson, xen-devel

>>> On 31.07.12 at 17:52, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> This patch wraps the assignment of XEN_ROOT in each Makefile with a call to
> $(abspath) which removes internal parent path references which result from 
> the definition of XEN_ROOT as $(CURDIR)../../ (etc).

Except that it's a make 3.81 invention, and so far we support
building with make 3.80. So if you want to use it, you'll need to
provide a fallback implementation (the placement of which may
turn out to be problematic).

Jan

> For example, it changes the output from
> 
>   gcc readnotes.o -o readnotes
>   /bind/myrepos/xen-unstable.hg/tools/xcutils/../../tools/libxc/libxenctrl.so
>   
> /bind/myrepos/xen-unstable.hg/tools/xcutils/../../tools/libxc/libxenguest.so
> 
> to
> 
>   gcc readnotes.o -o readnotes 
> /bind/myrepos/xen-unstable.hg/tools/libxc/libxenctrl.so
>   /bind/myrepos/xen-unstable.hg/tools/libxc/libxenguest.so
> 
> which decreases verbosity and increases clarity when reading the build log.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 5 of 5] makefile: Use $(abspath) for XEN_ROOT
  2012-07-31 16:38   ` Jan Beulich
@ 2012-07-31 16:54     ` Ian Jackson
  2012-07-31 17:36     ` Andrew Cooper
  1 sibling, 0 replies; 21+ messages in thread
From: Ian Jackson @ 2012-07-31 16:54 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Andrew Cooper, Keir (Xen.org), Ian Campbell,
	xen-devel@lists.xen.org

Jan Beulich writes ("Re: [PATCH 5 of 5] makefile: Use $(abspath) for XEN_ROOT"):
> >>> On 31.07.12 at 17:52, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> > This patch wraps the assignment of XEN_ROOT in each Makefile with a call to
> > $(abspath) which removes internal parent path references which result from 
> > the definition of XEN_ROOT as $(CURDIR)../../ (etc).
> 
> Except that it's a make 3.81 invention, and so far we support
> building with make 3.80. So if you want to use it, you'll need to
> provide a fallback implementation (the placement of which may
> turn out to be problematic).

Indeed so.  Also this is a cosmetic change which I think can wait for
4.3 at least.

Ian.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally
  2012-07-31 15:52 ` [PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally Andrew Cooper
@ 2012-07-31 16:55   ` Ian Jackson
  2012-08-01  7:49     ` Jan Beulich
  0 siblings, 1 reply; 21+ messages in thread
From: Ian Jackson @ 2012-07-31 16:55 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Keir (Xen.org), Ian Campbell, Jan Beulich,
	xen-devel@lists.xen.org

Andrew Cooper writes ("[PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally"):
..
> diff -r 6db5c184a777 -r ae32690d0d74 xen/Makefile
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -13,6 +13,7 @@ export BASEDIR := $(CURDIR)
>  export XEN_ROOT := $(BASEDIR)/..
>  
>  EFI_MOUNTPOINT ?= /boot/efi
> +XEN_CHANGESET  ?= $(shell hg root &> /dev/null && hg parents --template "{date|date} {rev}:{node|short}" || echo "unavailable" )
>  
>  .PHONY: default
>  default: build
> @@ -107,7 +108,7 @@ include/xen/compile.h: include/xen/compi
>  	    -e 's/@@version@@/$(XEN_VERSION)/g' \
>  	    -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
>  	    -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
> -	    -e 's!@@changeset@@!$(shell ((hg parents --template "{date|date} {rev}:{node|short}" >/dev/null && hg parents --template "{date|date} {rev}:{node|short}") || echo "unavailable") 2>/dev/null)!g' \
> +	    -e 's!@@changeset@@!$(XEN_CHANGESET)!g' \
>  	    < include/xen/compile.h.in > $@.new
>  	@grep \" .banner >> $@.new
>  	@grep -v \" .banner

We need to check how many times, and at which point, this gets
executed, when this patch is applied.  I think it's OK...

Ian.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 5 of 5] makefile: Use $(abspath) for XEN_ROOT
  2012-07-31 16:38   ` Jan Beulich
  2012-07-31 16:54     ` Ian Jackson
@ 2012-07-31 17:36     ` Andrew Cooper
  1 sibling, 0 replies; 21+ messages in thread
From: Andrew Cooper @ 2012-07-31 17:36 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Keir (Xen.org), Ian Jackson, Ian Campbell,
	xen-devel@lists.xen.org

On 31/07/12 17:38, Jan Beulich wrote:
>>>> On 31.07.12 at 17:52, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> This patch wraps the assignment of XEN_ROOT in each Makefile with a call to
>> $(abspath) which removes internal parent path references which result from 
>> the definition of XEN_ROOT as $(CURDIR)../../ (etc).
> Except that it's a make 3.81 invention, and so far we support
> building with make 3.80. So if you want to use it, you'll need to
> provide a fallback implementation (the placement of which may
> turn out to be problematic).
>
> Jan

Ah - so it is. 

Unfortunately, it appears hard to provide a backwards compatible way of
doing this.  Best to just forget this patch then, although it would be
nice to address this issue somehow in 4.3

~Andrew

>
>> For example, it changes the output from
>>
>>   gcc readnotes.o -o readnotes
>>   /bind/myrepos/xen-unstable.hg/tools/xcutils/../../tools/libxc/libxenctrl.so
>>   
>> /bind/myrepos/xen-unstable.hg/tools/xcutils/../../tools/libxc/libxenguest.so
>>
>> to
>>
>>   gcc readnotes.o -o readnotes 
>> /bind/myrepos/xen-unstable.hg/tools/libxc/libxenctrl.so
>>   /bind/myrepos/xen-unstable.hg/tools/libxc/libxenguest.so
>>
>> which decreases verbosity and increases clarity when reading the build log.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally
  2012-07-31 16:55   ` Ian Jackson
@ 2012-08-01  7:49     ` Jan Beulich
  2012-08-01  9:33       ` Andrew Cooper
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Beulich @ 2012-08-01  7:49 UTC (permalink / raw)
  To: Andrew Cooper, Ian Jackson
  Cc: Keir (Xen.org), Ian Campbell, xen-devel@lists.xen.org

>>> On 31.07.12 at 18:55, Ian Jackson <Ian.Jackson@eu.citrix.com> wrote:
> Andrew Cooper writes ("[PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be 
> set externally"):
> ..
>> diff -r 6db5c184a777 -r ae32690d0d74 xen/Makefile
>> --- a/xen/Makefile
>> +++ b/xen/Makefile
>> @@ -13,6 +13,7 @@ export BASEDIR := $(CURDIR)
>>  export XEN_ROOT := $(BASEDIR)/..
>>  
>>  EFI_MOUNTPOINT ?= /boot/efi
>> +XEN_CHANGESET  ?= $(shell hg root &> /dev/null && hg parents --template 
> "{date|date} {rev}:{node|short}" || echo "unavailable" )
>>  
>>  .PHONY: default
>>  default: build
>> @@ -107,7 +108,7 @@ include/xen/compile.h: include/xen/compi
>>  	    -e 's/@@version@@/$(XEN_VERSION)/g' \
>>  	    -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
>>  	    -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
>> -	    -e 's!@@changeset@@!$(shell ((hg parents --template "{date|date} 
> {rev}:{node|short}" >/dev/null && hg parents --template "{date|date} 
> {rev}:{node|short}") || echo "unavailable") 2>/dev/null)!g' \
>> +	    -e 's!@@changeset@@!$(XEN_CHANGESET)!g' \
>>  	    < include/xen/compile.h.in > $@.new
>>  	@grep \" .banner >> $@.new
>>  	@grep -v \" .banner
> 
> We need to check how many times, and at which point, this gets
> executed, when this patch is applied.  I think it's OK...

If in doubt, perhaps the better option would be to execute this
once unconditionally (via := assignment to a helper variable), or
to use := here but frame the assignment with some if construct
excluding it to be executed when the changeset was already
specified (assuming that an empty specification is pointless,
simply checking for it to be non-empty should suffice).

Jan

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally
  2012-08-01  7:49     ` Jan Beulich
@ 2012-08-01  9:33       ` Andrew Cooper
  2012-08-02 13:35         ` Ian Jackson
  0 siblings, 1 reply; 21+ messages in thread
From: Andrew Cooper @ 2012-08-01  9:33 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Keir (Xen.org), Ian Jackson, Ian Campbell,
	xen-devel@lists.xen.org


On 01/08/12 08:49, Jan Beulich wrote:
>>>> On 31.07.12 at 18:55, Ian Jackson <Ian.Jackson@eu.citrix.com> wrote:
>> Andrew Cooper writes ("[PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be 
>> set externally"):
>> ..
>>> diff -r 6db5c184a777 -r ae32690d0d74 xen/Makefile
>>> --- a/xen/Makefile
>>> +++ b/xen/Makefile
>>> @@ -13,6 +13,7 @@ export BASEDIR := $(CURDIR)
>>>  export XEN_ROOT := $(BASEDIR)/..
>>>  
>>>  EFI_MOUNTPOINT ?= /boot/efi
>>> +XEN_CHANGESET  ?= $(shell hg root &> /dev/null && hg parents --template 
>> "{date|date} {rev}:{node|short}" || echo "unavailable" )
>>>  
>>>  .PHONY: default
>>>  default: build
>>> @@ -107,7 +108,7 @@ include/xen/compile.h: include/xen/compi
>>>  	    -e 's/@@version@@/$(XEN_VERSION)/g' \
>>>  	    -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
>>>  	    -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
>>> -	    -e 's!@@changeset@@!$(shell ((hg parents --template "{date|date} 
>> {rev}:{node|short}" >/dev/null && hg parents --template "{date|date} 
>> {rev}:{node|short}") || echo "unavailable") 2>/dev/null)!g' \
>>> +	    -e 's!@@changeset@@!$(XEN_CHANGESET)!g' \
>>>  	    < include/xen/compile.h.in > $@.new
>>>  	@grep \" .banner >> $@.new
>>>  	@grep -v \" .banner
>> We need to check how many times, and at which point, this gets
>> executed, when this patch is applied.  I think it's OK...
> If in doubt, perhaps the better option would be to execute this
> once unconditionally (via := assignment to a helper variable), or
> to use := here but frame the assignment with some if construct
> excluding it to be executed when the changeset was already
> specified (assuming that an empty specification is pointless,
> simply checking for it to be non-empty should suffice).
>
> Jan
>

The rule looks like:

# compile.h contains dynamic build info. Rebuilt on every 'make'
invocation.                                                                                                                                  

include/xen/compile.h: include/xen/compile.h.in .banner
        @sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \

So it should only be executed once (unless someone is messing around
deleting compile.h)

Having said that, even if it were executed more than once, there is no
reasonable circumstance during which the contents of XEN_CHANGESET
should change.

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 2 of 5] tools/config: Allow building of components to be controlled from .config
  2012-07-31 16:10   ` Ian Jackson
@ 2012-08-01 11:47     ` Ian Campbell
  0 siblings, 0 replies; 21+ messages in thread
From: Ian Campbell @ 2012-08-01 11:47 UTC (permalink / raw)
  To: Ian Jackson
  Cc: Andrew Cooper, Keir (Xen.org), Jan Beulich,
	xen-devel@lists.xen.org

On Tue, 2012-07-31 at 17:10 +0100, Ian Jackson wrote:
> Andrew Cooper writes ("[PATCH 2 of 5] tools/config: Allow building of components to be controlled from .config"):
> > For build systems which build certain Xen components separately, allow certain
> > components to be conditionally built based on .config, rather than always
> > building them.
> > 
> > This patch allows qemu and blktap to be configured in this manner.
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Applied.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3 of 5] config: Split debug build from debug symbols
  2012-07-31 16:12   ` Ian Jackson
@ 2012-08-01 11:47     ` Ian Campbell
  0 siblings, 0 replies; 21+ messages in thread
From: Ian Campbell @ 2012-08-01 11:47 UTC (permalink / raw)
  To: Ian Jackson
  Cc: Andrew Cooper, Keir (Xen.org), Jan Beulich,
	xen-devel@lists.xen.org

On Tue, 2012-07-31 at 17:12 +0100, Ian Jackson wrote:
> Andrew Cooper writes ("[PATCH 3 of 5] config: Split debug build from debug symbols"):
> > RPM based packaging systems expect binaries to have debug symbols which get
> > placed in a separate debuginfo RPM.
> > 
> > Split the concept of a debug build up so that binaries can be built with
> > debugging symbols without having the other gubbins which $(debug) implies, most
> > notibly frame pointers.
> 
> This looks plausible (for 4.2) but I would like to run a test build
> and check the results.

OK, I'll wait for you to do that before applying.

Ian.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1 of 5] tools/ocaml: ignore and clean .spot and .spit files
  2012-07-31 16:08   ` Ian Jackson
@ 2012-08-01 11:47     ` Ian Campbell
  0 siblings, 0 replies; 21+ messages in thread
From: Ian Campbell @ 2012-08-01 11:47 UTC (permalink / raw)
  To: Ian Jackson
  Cc: Andrew Cooper, Keir (Xen.org), Jan Beulich,
	xen-devel@lists.xen.org

On Tue, 2012-07-31 at 17:08 +0100, Ian Jackson wrote:
> Andrew Cooper writes ("[PATCH 1 of 5] tools/ocaml: ignore and clean .spot and .spit files"):
> > Newer ocaml toolchains generate .spot and .spit files which are ocaml metadata
> > about their respective source files.
> > 
> > Add them to the clean rules as well as the .{hg,git}ignore files.
> > 
> > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> This is good for 4.2 IMO

Agreed, applied.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally
  2012-08-01  9:33       ` Andrew Cooper
@ 2012-08-02 13:35         ` Ian Jackson
  2012-08-02 13:47           ` Andrew Cooper
  0 siblings, 1 reply; 21+ messages in thread
From: Ian Jackson @ 2012-08-02 13:35 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Keir (Xen.org), Ian Campbell, Jan Beulich,
	xen-devel@lists.xen.org

Andrew Cooper writes ("Re: [PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally"):
> # compile.h contains dynamic build info. Rebuilt on every 'make'
> invocation.                                                                                                                                  
> 
> include/xen/compile.h: include/xen/compile.h.in .banner
>         @sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \
> 
> So it should only be executed once (unless someone is messing around
> deleting compile.h)
> 
> Having said that, even if it were executed more than once, there is no
> reasonable circumstance during which the contents of XEN_CHANGESET
> should change.

Uh, "hg up <changeset>", surely ?

Ian.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally
  2012-08-02 13:35         ` Ian Jackson
@ 2012-08-02 13:47           ` Andrew Cooper
  0 siblings, 0 replies; 21+ messages in thread
From: Andrew Cooper @ 2012-08-02 13:47 UTC (permalink / raw)
  To: Ian Jackson
  Cc: Keir (Xen.org), Ian Campbell, Jan Beulich,
	xen-devel@lists.xen.org

On 02/08/12 14:35, Ian Jackson wrote:
> Andrew Cooper writes ("Re: [PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally"):
>> # compile.h contains dynamic build info. Rebuilt on every 'make'
>> invocation.                                                                                                                                  
>>
>> include/xen/compile.h: include/xen/compile.h.in .banner
>>         @sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \
>>
>> So it should only be executed once (unless someone is messing around
>> deleting compile.h)
>>
>> Having said that, even if it were executed more than once, there is no
>> reasonable circumstance during which the contents of XEN_CHANGESET
>> should change.
> Uh, "hg up <changeset>", surely ?
>
> Ian.

Sure, but compile.h is regenerated on every invocation of Make

I should have stated that during an individual build there are no
reasonable circumstances.  Running an hg update during a build is asking
for trouble.

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3 of 5] config: Split debug build from debug symbols
  2012-07-31 15:51 ` [PATCH 3 of 5] config: Split debug build from debug symbols Andrew Cooper
  2012-07-31 16:12   ` Ian Jackson
@ 2012-08-13 17:14   ` Ian Jackson
  1 sibling, 0 replies; 21+ messages in thread
From: Ian Jackson @ 2012-08-13 17:14 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Ian Campbell, Keir Fraser, Jan Beulich, xen-devel

Andrew Cooper writes ("[Xen-devel] [PATCH 3 of 5] config: Split debug build from debug symbols"):
> RPM based packaging systems expect binaries to have debug symbols which get
> placed in a separate debuginfo RPM.
> 
> Split the concept of a debug build up so that binaries can be built with
> debugging symbols without having the other gubbins which $(debug) implies, most
> notibly frame pointers.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

I build tested this and it seemed not to break.

Tested-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

Ian.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-08-13 17:14 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31 15:51 [PATCH 0 of 5] Build system tweaks Andrew Cooper
2012-07-31 15:51 ` [PATCH 1 of 5] tools/ocaml: ignore and clean .spot and .spit files Andrew Cooper
2012-07-31 16:08   ` Ian Jackson
2012-08-01 11:47     ` Ian Campbell
2012-07-31 15:51 ` [PATCH 2 of 5] tools/config: Allow building of components to be controlled from .config Andrew Cooper
2012-07-31 16:10   ` Ian Jackson
2012-08-01 11:47     ` Ian Campbell
2012-07-31 15:51 ` [PATCH 3 of 5] config: Split debug build from debug symbols Andrew Cooper
2012-07-31 16:12   ` Ian Jackson
2012-08-01 11:47     ` Ian Campbell
2012-08-13 17:14   ` Ian Jackson
2012-07-31 15:52 ` [PATCH 4 of 5] xen/makefile: Allow XEN_CHANGESET to be set externally Andrew Cooper
2012-07-31 16:55   ` Ian Jackson
2012-08-01  7:49     ` Jan Beulich
2012-08-01  9:33       ` Andrew Cooper
2012-08-02 13:35         ` Ian Jackson
2012-08-02 13:47           ` Andrew Cooper
2012-07-31 15:52 ` [PATCH 5 of 5] makefile: Use $(abspath) for XEN_ROOT Andrew Cooper
2012-07-31 16:38   ` Jan Beulich
2012-07-31 16:54     ` Ian Jackson
2012-07-31 17:36     ` Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).