move libxc and xenstore public headers to include subdir
cover move libxc and xenstore public headers to include subdir
Hi all,
this patch series separates out the public libxc and xenstore headers that are supposed to be usable by external programs, such as QEMU, from the private internal headers.
The public headers are moved to a subdirectory called "include".
The headers move requires changes to a few Makefiles, one of which is qemu-xen-traditional's (the patch to qemu-xen-traditional is sent separately).
The series in its current form is not bisectable.
Stefano Stabellini (3):
move xenstore public headers to include subdir move libxc public headers to include subdir Use the new include subdirectories to build Xen tools
tools/Makefile | 6 +++---
tools/Rules.mk | 6 +++---
tools/libxc/Makefile | 6 +++---
tools/libxc/{ => include}/xenctrl.h | 0
tools/libxc/{ => include}/xenctrlosdep.h | 0
tools/libxc/{ => include}/xenguest.h | 0
tools/libxc/{ => include}/xentoollog.h | 0
tools/python/Makefile | 2 ++
tools/xenstore/Makefile | 9 +++++----
tools/xenstore/{ => include}/compat/xs.h | 0
tools/xenstore/{ => include}/compat/xs_lib.h | 0
tools/xenstore/{ => include}/xenstore.h | 0
tools/xenstore/{ => include}/xenstore_lib.h | 0
13 files changed, 16 insertions(+), 13 deletions(-)
rename tools/libxc/{ => include}/xenctrl.h (100%)
rename tools/libxc/{ => include}/xenctrlosdep.h (100%)
rename tools/libxc/{ => include}/xenguest.h (100%)
rename tools/libxc/{ => include}/xentoollog.h (100%)
rename tools/xenstore/{ => include}/compat/xs.h (100%)
rename tools/xenstore/{ => include}/compat/xs_lib.h (100%)
rename tools/xenstore/{ => include}/xenstore.h (100%)
rename tools/xenstore/{ => include}/xenstore_lib.h (100%)PATCH 1/3 move xenstore public headers to include subdir
--- tools/xenstore/Makefile | 9 +- tools/xenstore/compat/xs.h | 2 - tools/xenstore/compat/xs_lib.h | 2 - tools/xenstore/include/compat/xs.h | 2 + tools/xenstore/include/compat/xs_lib.h | 2 + tools/xenstore/include/xenstore.h | 257 ++++++++++++++++++++++++++++++++ tools/xenstore/include/xenstore_lib.h | 85 +++++++++++ tools/xenstore/xenstore.h | 257 -------------------------------- tools/xenstore/xenstore_lib.h | 85 ----------- 9 files changed, 351 insertions(+), 350 deletions(-) delete mode 100644 tools/xenstore/compat/xs.h delete mode 100644 tools/xenstore/compat/xs_lib.h create mode 100644 tools/xenstore/include/compat/xs.h create mode 100644 tools/xenstore/include/compat/xs_lib.h create mode 100644 tools/xenstore/include/xenstore.h create mode 100644 tools/xenstore/include/xenstore_lib.h delete mode 100644 tools/xenstore/xenstore.h delete mode 100644 tools/xenstore/xenstore_lib.h
tools/xenstore/Makefile +5 -4
@@ -6,6 +6,7 @@ MINOR = 3 CFLAGS += -Werror CFLAGS += -I. +CFLAGS += -I./include CFLAGS += $(CFLAGS_libxenctrl) CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod
@@ -126,10 +127,10 @@ install: all ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR) ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstore.so $(INSTALL_DATA) libxenstore.a $(DESTDIR)$(LIBDIR) - $(INSTALL_DATA) xenstore.h $(DESTDIR)$(INCLUDEDIR) - $(INSTALL_DATA) xenstore_lib.h $(DESTDIR)$(INCLUDEDIR) - $(INSTALL_DATA) compat/xs.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs.h - $(INSTALL_DATA) compat/xs_lib.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs_lib.h + $(INSTALL_DATA) include/xenstore.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_DATA) include/xenstore_lib.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_DATA) include/compat/xs.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs.h + $(INSTALL_DATA) include/compat/xs_lib.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs_lib.h ln -sf xenstore-compat/xs.h $(DESTDIR)$(INCLUDEDIR)/xs.h ln -sf xenstore-compat/xs_lib.h $(DESTDIR)$(INCLUDEDIR)/xs_lib.h
tools/xenstore/compat/xs.h deleted +0 -2
@@ -1,2 +0,0 @@ -#warning xs.h is deprecated use xenstore.h instead -#include <xenstore.h>
tools/xenstore/compat/xs_lib.h deleted +0 -2
@@ -1,2 +0,0 @@ -#warning xs_lib.h is deprecated use xenstore_lib.h instead -#include <xenstore_lib.h>
tools/xenstore/include/compat/xs.h new file +2 -0
@@ -0,0 +1,2 @@ +#warning xs.h is deprecated use xenstore.h instead +#include <xenstore.h>
tools/xenstore/include/compat/xs_lib.h new file +2 -0
@@ -0,0 +1,2 @@ +#warning xs_lib.h is deprecated use xenstore_lib.h instead +#include <xenstore_lib.h>
tools/xenstore/include/xenstore.h new file +257 -0
257 lines not on this page · raw message
tools/xenstore/include/xenstore_lib.h new file +85 -0
85 lines not on this page · raw message
tools/xenstore/xenstore.h deleted +0 -257
257 lines not on this page · raw message
tools/xenstore/xenstore_lib.h deleted +0 -85
85 lines not on this page · raw message
Signature · 1 line
1.7.10.4
Re: [PATCH 1/3] move xenstore public headers to include subdir
Quoted 11 lines · Stefano Stabellini
Signed-off-by Stefano Stabellini <[email protected]>--- tools/xenstore/Makefile | 9 +- tools/xenstore/compat/xs.h | 2 - tools/xenstore/compat/xs_lib.h | 2 - tools/xenstore/include/compat/xs.h | 2 + tools/xenstore/include/compat/xs_lib.h | 2 + tools/xenstore/include/xenstore.h | 257 ++++++++++++++++++++++++++++++++ tools/xenstore/include/xenstore_lib.h | 85 +++++++++++ tools/xenstore/xenstore.h | 257 -------------------------------- tools/xenstore/xenstore_lib.h | 85 -----------
Please can you use "git format-patch -M" so the renames are clear.
Quoted 15 lines
9 files changed, 351 insertions(+), 350 deletions(-) delete mode 100644 tools/xenstore/compat/xs.h delete mode 100644 tools/xenstore/compat/xs_lib.h create mode 100644 tools/xenstore/include/compat/xs.h create mode 100644 tools/xenstore/include/compat/xs_lib.h create mode 100644 tools/xenstore/include/xenstore.h create mode 100644 tools/xenstore/include/xenstore_lib.h delete mode 100644 tools/xenstore/xenstore.h delete mode 100644 tools/xenstore/xenstore_lib.htools/xenstore/Makefile +0
-0
tools/xenstore/Makefile MINOR = 3 · line 9
Quoted 4 lines
tools/xenstore/Makefile +1
-0@@ -6,6 +6,7 @@ MINOR = 3 CFLAGS += -Werror CFLAGS += -I. +CFLAGS += -I./include
Since you don't change any other Makefiles how do the in-tree consumers of this library continue to build?
(probably using /usr/include/xenstore_lib.h)
Ian.
Re: [PATCH 1/3] move xenstore public headers to include subdir
Quoted 31 lines · Ian Campbell
Quoted 11 lines · Stefano Stabellini
Signed-off-by Stefano Stabellini <[email protected]>--- tools/xenstore/Makefile | 9 +- tools/xenstore/compat/xs.h | 2 - tools/xenstore/compat/xs_lib.h | 2 - tools/xenstore/include/compat/xs.h | 2 + tools/xenstore/include/compat/xs_lib.h | 2 + tools/xenstore/include/xenstore.h | 257 ++++++++++++++++++++++++++++++++ tools/xenstore/include/xenstore_lib.h | 85 +++++++++++ tools/xenstore/xenstore.h | 257 -------------------------------- tools/xenstore/xenstore_lib.h | 85 -----------Please can you use "git format-patch -M" so the renames are clear.
Quoted 16 lines
9 files changed, 351 insertions(+), 350 deletions(-) delete mode 100644 tools/xenstore/compat/xs.h delete mode 100644 tools/xenstore/compat/xs_lib.h create mode 100644 tools/xenstore/include/compat/xs.h create mode 100644 tools/xenstore/include/compat/xs_lib.h create mode 100644 tools/xenstore/include/xenstore.h create mode 100644 tools/xenstore/include/xenstore_lib.h delete mode 100644 tools/xenstore/xenstore.h delete mode 100644 tools/xenstore/xenstore_lib.htools/xenstore/Makefile +0
-0@@ -6,6 +6,7 @@ MINOR = 3
Quoted 8 lines
tools/xenstore/Makefile MINOR = 3 · line 9
Quoted 3 lines
tools/xenstore/Makefile +1
-0CFLAGS += -Werror CFLAGS += -I. +CFLAGS += -I./includeSince you don't change any other Makefiles how do the in-tree consumers of this library continue to build?
(probably using
/usr/include/xenstore_lib.h)
They don't: the series is not bisectable in the current form (I wrote it in patch #0).
I was thinking of getting some reviews and then send the whole series as a single patch.
Re: [PATCH 1/3] move xenstore public headers to include subdir
Quoted 39 lines · Stefano Stabellini
Quoted 38 lines · Ian Campbell
Quoted 11 lines · Stefano Stabellini
Signed-off-by Stefano Stabellini <[email protected]>--- tools/xenstore/Makefile | 9 +- tools/xenstore/compat/xs.h | 2 - tools/xenstore/compat/xs_lib.h | 2 - tools/xenstore/include/compat/xs.h | 2 + tools/xenstore/include/compat/xs_lib.h | 2 + tools/xenstore/include/xenstore.h | 257 ++++++++++++++++++++++++++++++++ tools/xenstore/include/xenstore_lib.h | 85 +++++++++++ tools/xenstore/xenstore.h | 257 -------------------------------- tools/xenstore/xenstore_lib.h | 85 -----------Please can you use "git format-patch -M" so the renames are clear.
Quoted 15 lines
9 files changed, 351 insertions(+), 350 deletions(-) delete mode 100644 tools/xenstore/compat/xs.h delete mode 100644 tools/xenstore/compat/xs_lib.h create mode 100644 tools/xenstore/include/compat/xs.h create mode 100644 tools/xenstore/include/compat/xs_lib.h create mode 100644 tools/xenstore/include/xenstore.h create mode 100644 tools/xenstore/include/xenstore_lib.h delete mode 100644 tools/xenstore/xenstore.h delete mode 100644 tools/xenstore/xenstore_lib.htools/xenstore/Makefile +0
-0tools/xenstore/Makefile MINOR = 3 · line 9
Quoted 4 lines
tools/xenstore/Makefile +1
-0@@ -6,6 +6,7 @@ MINOR = 3 CFLAGS += -Werror CFLAGS += -I. +CFLAGS += -I./includeSince you don't change any other Makefiles how do the in-tree consumers of this library continue to build?
Quoted 6 lines
Quoted 1 line
(probably using
/usr/include/xenstore_lib.h)They don't: the series is not bisectable in the current form (I wrote it in patch #0).
I was thinking of getting some reviews and then send the whole series as a single patch.
Ah OK, sorry for missing that bit.
Re: [PATCH 1/3] move xenstore public headers to include subdir
Quoted 40 lines · Ian Campbell
Quoted 39 lines · Stefano Stabellini
Quoted 38 lines · Ian Campbell
Quoted 11 lines · Stefano Stabellini
Signed-off-by Stefano Stabellini <[email protected]>--- tools/xenstore/Makefile | 9 +- tools/xenstore/compat/xs.h | 2 - tools/xenstore/compat/xs_lib.h | 2 - tools/xenstore/include/compat/xs.h | 2 + tools/xenstore/include/compat/xs_lib.h | 2 + tools/xenstore/include/xenstore.h | 257 ++++++++++++++++++++++++++++++++ tools/xenstore/include/xenstore_lib.h | 85 +++++++++++ tools/xenstore/xenstore.h | 257 -------------------------------- tools/xenstore/xenstore_lib.h | 85 -----------Please can you use "git format-patch -M" so the renames are clear.
Quoted 15 lines
9 files changed, 351 insertions(+), 350 deletions(-) delete mode 100644 tools/xenstore/compat/xs.h delete mode 100644 tools/xenstore/compat/xs_lib.h create mode 100644 tools/xenstore/include/compat/xs.h create mode 100644 tools/xenstore/include/compat/xs_lib.h create mode 100644 tools/xenstore/include/xenstore.h create mode 100644 tools/xenstore/include/xenstore_lib.h delete mode 100644 tools/xenstore/xenstore.h delete mode 100644 tools/xenstore/xenstore_lib.htools/xenstore/Makefile +0
-0tools/xenstore/Makefile MINOR = 3 · line 9
Quoted 4 lines
tools/xenstore/Makefile +1
-0@@ -6,6 +6,7 @@ MINOR = 3 CFLAGS += -Werror CFLAGS += -I. +CFLAGS += -I./includeSince you don't change any other Makefiles how do the in-tree consumers of this library continue to build?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
(probably using
/usr/include/xenstore_lib.h)They don't: the series is not bisectable in the current form (I wrote it in patch #0).
I was thinking of getting some reviews and then send the whole series as a single patch.Ah OK, sorry for missing that bit.
The problem remains for the Makefile of qemu-xen-traditional though. I have to make that change separately.
Re: [PATCH 1/3] move xenstore public headers to include subdir
Quoted 48 lines · Stefano Stabellini
Quoted 47 lines · Ian Campbell
Quoted 45 lines · Stefano Stabellini
Quoted 31 lines · Ian Campbell
Quoted 11 lines · Stefano Stabellini
Signed-off-by Stefano Stabellini <[email protected]>--- tools/xenstore/Makefile | 9 +- tools/xenstore/compat/xs.h | 2 - tools/xenstore/compat/xs_lib.h | 2 - tools/xenstore/include/compat/xs.h | 2 + tools/xenstore/include/compat/xs_lib.h | 2 + tools/xenstore/include/xenstore.h | 257 ++++++++++++++++++++++++++++++++ tools/xenstore/include/xenstore_lib.h | 85 +++++++++++ tools/xenstore/xenstore.h | 257 -------------------------------- tools/xenstore/xenstore_lib.h | 85 -----------Please can you use "git format-patch -M" so the renames are clear.
Quoted 16 lines
9 files changed, 351 insertions(+), 350 deletions(-) delete mode 100644 tools/xenstore/compat/xs.h delete mode 100644 tools/xenstore/compat/xs_lib.h create mode 100644 tools/xenstore/include/compat/xs.h create mode 100644 tools/xenstore/include/compat/xs_lib.h create mode 100644 tools/xenstore/include/xenstore.h create mode 100644 tools/xenstore/include/xenstore_lib.h delete mode 100644 tools/xenstore/xenstore.h delete mode 100644 tools/xenstore/xenstore_lib.htools/xenstore/Makefile +0
-0@@ -6,6 +6,7 @@ MINOR = 3Quoted 8 lines
tools/xenstore/Makefile MINOR = 3 · line 9
Quoted 3 lines
tools/xenstore/Makefile +1
-0CFLAGS += -Werror CFLAGS += -I. +CFLAGS += -I./includeSince you don't change any other Makefiles how do the in-tree consumers of this library continue to build?
(probably using
/usr/include/xenstore_lib.h)They don't: the series is not bisectable in the current form (I wrote it in patch #0).
I was thinking of getting some reviews and then send the whole series as a single patch.
Quoted 4 lines
Quoted 1 line
Ah OK, sorry for missing that bit.
The problem remains for the
Makefileof qemu-xen-traditional though. I have to make that change separately.
Don't you (or Ian) push to qemu-trad first and then update Config.mk at the same time as everything else?
Re: [PATCH 1/3] move xenstore public headers to include subdir
Quoted 49 lines · Ian Campbell
Quoted 48 lines · Stefano Stabellini
Quoted 47 lines · Ian Campbell
Quoted 45 lines · Stefano Stabellini
Quoted 31 lines · Ian Campbell
Quoted 11 lines · Stefano Stabellini
Signed-off-by Stefano Stabellini <[email protected]>--- tools/xenstore/Makefile | 9 +- tools/xenstore/compat/xs.h | 2 - tools/xenstore/compat/xs_lib.h | 2 - tools/xenstore/include/compat/xs.h | 2 + tools/xenstore/include/compat/xs_lib.h | 2 + tools/xenstore/include/xenstore.h | 257 ++++++++++++++++++++++++++++++++ tools/xenstore/include/xenstore_lib.h | 85 +++++++++++ tools/xenstore/xenstore.h | 257 -------------------------------- tools/xenstore/xenstore_lib.h | 85 -----------Please can you use "git format-patch -M" so the renames are clear.
Quoted 16 lines
9 files changed, 351 insertions(+), 350 deletions(-) delete mode 100644 tools/xenstore/compat/xs.h delete mode 100644 tools/xenstore/compat/xs_lib.h create mode 100644 tools/xenstore/include/compat/xs.h create mode 100644 tools/xenstore/include/compat/xs_lib.h create mode 100644 tools/xenstore/include/xenstore.h create mode 100644 tools/xenstore/include/xenstore_lib.h delete mode 100644 tools/xenstore/xenstore.h delete mode 100644 tools/xenstore/xenstore_lib.htools/xenstore/Makefile +0
-0@@ -6,6 +6,7 @@ MINOR = 3Quoted 8 lines
tools/xenstore/Makefile MINOR = 3 · line 9
Quoted 3 lines
tools/xenstore/Makefile +1
-0CFLAGS += -Werror CFLAGS += -I. +CFLAGS += -I./includeSince you don't change any other Makefiles how do the in-tree consumers of this library continue to build?
(probably using
/usr/include/xenstore_lib.h)They don't: the series is not bisectable in the current form (I wrote it in patch #0).
I was thinking of getting some reviews and then send the whole series as a single patch.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Ah OK, sorry for missing that bit.
The problem remains for the
Makefileof qemu-xen-traditional though. I have to make that change separately.Don't you (or Ian) push to qemu-trad first and then update Config.mk at the same time as everything else?
Yes, that would work. Ian needs to keep that in mind when applying this. I'll add a note to the commit message so that we don't forget.
PATCH 2/3 move libxc public headers to include subdir
In reply to Stefano Stabellini--- tools/libxc/Makefile | 6 +- tools/libxc/include/xenctrl.h | 2655 ++++++++++++++++++++++++++++++++++++ tools/libxc/include/xenctrlosdep.h | 173 +++ tools/libxc/include/xenguest.h | 325 +++++ tools/libxc/include/xentoollog.h | 137 ++ tools/libxc/xenctrl.h | 2655 ------------------------------------ tools/libxc/xenctrlosdep.h | 173 --- tools/libxc/xenguest.h | 325 ----- tools/libxc/xentoollog.h | 137 -- 9 files changed, 3293 insertions(+), 3293 deletions(-) create mode 100644 tools/libxc/include/xenctrl.h create mode 100644 tools/libxc/include/xenctrlosdep.h create mode 100644 tools/libxc/include/xenguest.h create mode 100644 tools/libxc/include/xentoollog.h delete mode 100644 tools/libxc/xenctrl.h delete mode 100644 tools/libxc/xenctrlosdep.h delete mode 100644 tools/libxc/xenguest.h delete mode 100644 tools/libxc/xentoollog.h
tools/libxc/Makefile +3 -3
@@ -89,7 +89,7 @@ OSDEP_SRCS-y += xenctrl_osdep_ENOSYS.c -include $(XEN_TARGET_ARCH)/Makefile CFLAGS += -Werror -Wmissing-prototypes -CFLAGS += -I. $(CFLAGS_xeninclude) +CFLAGS += -I. -I./include $(CFLAGS_xeninclude) # Needed for posix_fadvise64() in xc_linux.c CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE
@@ -140,12 +140,12 @@ install: build $(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(LIBDIR) ln -sf libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so.$(MAJOR) ln -sf libxenctrl.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so - $(INSTALL_DATA) xenctrl.h xenctrlosdep.h xentoollog.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_DATA) include/xenctrl.h include/xenctrlosdep.h include/xentoollog.h $(DESTDIR)$(INCLUDEDIR) $(INSTALL_PROG) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR) $(INSTALL_DATA) libxenguest.a $(DESTDIR)$(LIBDIR) ln -sf libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenguest.so.$(MAJOR) ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenguest.so - $(INSTALL_DATA) xenguest.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_DATA) include/xenguest.h $(DESTDIR)$(INCLUDEDIR) .PHONY: TAGS TAGS:
tools/libxc/include/xenctrl.h new file +2655 -0
2,655 lines not on this page · raw message
tools/libxc/include/xenctrlosdep.h new file +173 -0
173 lines not on this page · raw message
tools/libxc/include/xenguest.h new file +325 -0
150 lines not on this page · raw message
tools/libxc/include/xentoollog.h new file +137 -0
137 lines not on this page · raw message
tools/libxc/xenctrl.h deleted +0 -2655
2,655 lines not on this page · raw message
tools/libxc/xenctrlosdep.h deleted +0 -173
173 lines not on this page · raw message
tools/libxc/xenguest.h deleted +0 -325
325 lines not on this page · raw message
tools/libxc/xentoollog.h deleted +0 -137
137 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.10.4
Part of the diff is not shown here. View the raw message.
PATCH 3/3 Use the new include subdirectories to build Xen tools
In reply to Stefano StabelliniUse them to build qemu-xen.
Add them to the include path of CFLAGS_libxenguest, CFLAGS_libxenctrl and CFLAGS_libxenstore.
Use CFLAGS_libxenctrl and CFLAGS_libxenstore to build the python tools.
--- tools/Makefile | 6 +++--- tools/Rules.mk | 6 +++--- tools/python/Makefile | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-)
tools/Makefile +3 -3
@@ -188,9 +188,9 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find --includedir=$(PREFIX)/lib/xen/include \ --source-path=$$source \ --extra-cflags="-I$(XEN_ROOT)/tools/include \ - -I$(XEN_ROOT)/tools/libxc \ - -I$(XEN_ROOT)/tools/xenstore \ - -I$(XEN_ROOT)/tools/xenstore/compat \ + -I$(XEN_ROOT)/tools/libxc/include \ + -I$(XEN_ROOT)/tools/xenstore/include \ + -I$(XEN_ROOT)/tools/xenstore/compat/include \ $(EXTRA_CFLAGS_QEMU_XEN)" \ --extra-ldflags="-L$(XEN_ROOT)/tools/libxc \ -L$(XEN_ROOT)/tools/xenstore \
tools/Rules.mk +3 -3
@@ -19,15 +19,15 @@ XEN_LIBVCHAN = $(XEN_ROOT)/tools/libvchan CFLAGS_xeninclude = -I$(XEN_INCLUDE) -CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_xeninclude) +CFLAGS_libxenctrl = -I$(XEN_LIBXC) -I$(XEN_LIBXC)/include $(CFLAGS_xeninclude) LDLIBS_libxenctrl = $(XEN_LIBXC)/libxenctrl.so SHLIB_libxenctrl = -Wl,-rpath-link=$(XEN_LIBXC) -CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_xeninclude) +CFLAGS_libxenguest = -I$(XEN_LIBXC) -I$(XEN_LIBXC)/include $(CFLAGS_xeninclude) LDLIBS_libxenguest = $(XEN_LIBXC)/libxenguest.so SHLIB_libxenguest = -Wl,-rpath-link=L$(XEN_LIBXC) -CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_xeninclude) +CFLAGS_libxenstore = -I$(XEN_XENSTORE) -I$(XEN_XENSTORE)/include $(CFLAGS_xeninclude) LDLIBS_libxenstore = $(XEN_XENSTORE)/libxenstore.so SHLIB_libxenstore = -Wl,-rpath-link=$(XEN_XENSTORE)
tools/python/Makefile +2 -0
@@ -5,6 +5,8 @@ include $(XEN_ROOT)/tools/Rules.mk all: build XENPATH = "xen/util/path.py" +CFLAGS += $(CFLAGS_libxenctrl) +CFLAGS += $(CFLAGS_libxenstore) genpath-target = $(call buildmakevars2file,$(XENPATH)) $(eval $(genpath-target))
Signature · 1 line
1.7.10.4
Re: [PATCH 3/3] Use the new include subdirectories to build Xen tools
Quoted 6 lines · Stefano Stabellini
Use them to build qemu-xen.
Add them to the include path of
CFLAGS_libxenguest,CFLAGS_libxenctrlandCFLAGS_libxenstore.Use
CFLAGS_libxenctrlandCFLAGS_libxenstoreto build the python tools.
All of these should be included in the patches which do the moves, otherwise you break bisectability.
and I think you can drop -I$(XEN_XENSTORE) -I$(XEN_LIBXC) etc since those are supposed to be xenstore-internal headers, which oughtn't to be used even by intree users of the library.
If doing that breaks the build we should look at why.
tools/python/Makefile include $(XEN_ROOT)/tools/Rules.mk · line 9
Quoted 10 lines
tools/python/Makefile +2
-0@@ -5,6 +5,8 @@ include $(XEN_ROOT)/tools/Rules.mk all: build XENPATH = "xen/util/path.py" +CFLAGS += $(CFLAGS_libxenctrl) +CFLAGS += $(CFLAGS_libxenstore)
You should be modifying tools/python/setup.py to change include_dirs for the various modules instead of this.
Ian.
Re: [PATCH 3/3] Use the new include subdirectories to build Xen tools
Quoted 10 lines · Ian Campbell
Quoted 6 lines · Stefano Stabellini
Use them to build qemu-xen.
Add them to the include path of
CFLAGS_libxenguest,CFLAGS_libxenctrlandCFLAGS_libxenstore.Use
CFLAGS_libxenctrlandCFLAGS_libxenstoreto build the python tools.All of these should be included in the patches which do the moves, otherwise you break bisectability.
I'll send out a single big patch.
Quoted 5 lines
and I think you can drop -I$(XEN_XENSTORE) -I$(XEN_LIBXC) etc since those are supposed to be xenstore-internal headers, which oughtn't to be used even by intree users of the library.
If doing that breaks the build we should look at why.
It does break the build.
If we want to go down that path, we need to move xc_dom.h to libxc/include too. But then should we install it too?
After that we still need to fix:
tools/misc/xen-mfndump.c includes xc_private.h, xc_core.h and xg_save_restore.h.
tools/misc/xen-hptool.c includes xc_private.h and xc_core.h
tools/xcutils/readnotes.c includes xg_private.h and xc_dom.h
tools/blktap2/drivers/block-log.c includes xc_bitops.h
tools/xenpaging/file_ops.c includes xc_private.h
tools/xenpaging/xenpaging.c includes xc_bitops.h
I could add I$(XEN_XENSTORE) and/or -I$(XEN_LIBXC) to the build line of these specific programs and avoid adding them to CFLAGS_libxenctrl and CFLAGS_libxenstore.
Quoted 8 lines
Quoted 8 lines
tools/python/Makefile +0
-0@@ -5,6 +5,8 @@ include $(XEN_ROOT)/tools/Rules.mk all: build
Quoted 6 lines
tools/python/Makefile include $(XEN_ROOT)/tools/Rules.mk · line 9
Quoted 3 lines
tools/python/Makefile +2
-0XENPATH = "xen/util/path.py" +CFLAGS += $(CFLAGS_libxenctrl) +CFLAGS += $(CFLAGS_libxenstore)You should be modifying
tools/python/setup.pyto changeinclude_dirsfor the various modules instead of this.
That works.
Re: [PATCH 3/3] Use the new include subdirectories to build Xen tools
Quoted 19 lines · Stefano Stabellini
Quoted 10 lines · Ian Campbell
Quoted 6 lines · Stefano Stabellini
Use them to build qemu-xen.
Add them to the include path of
CFLAGS_libxenguest,CFLAGS_libxenctrlandCFLAGS_libxenstore.Use
CFLAGS_libxenctrlandCFLAGS_libxenstoreto build the python tools.All of these should be included in the patches which do the moves, otherwise you break bisectability.
I'll send out a single big patch.
Quoted 4 lines
and I think you can drop -I$(XEN_XENSTORE) -I$(XEN_LIBXC) etc since those are supposed to be xenstore-internal headers, which oughtn't to be used even by intree users of the library.
Quoted 5 lines
Quoted 1 line
If doing that breaks the build we should look at why.
It does break the build.
If we want to go down that path, we need to movexc_dom.hto libxc/include too. But then should we install it too?
This is because libxl and a few other bits use it I suppose?
It does strike me as a bit odd that this library isn't installed already, although I suppose the set of people want to write a domain builder directly is pretty small. But if you just wanted to move it and not tackle that aspect at the same that would be OK IMHO.
Quoted 2 lines
After that we still need to fix:
[...]
All of these really have no business poking at the libxc internals (especially xc_private.h) like that. (Or possibly some of the libxc internals should be made public).
I don't think you should be expected to fix this now though.
Quoted 3 lines
I could add I$(XEN_XENSTORE) and/or -I$(XEN_LIBXC) to the build line of these specific programs and avoid adding them to
CFLAGS_libxenctrlandCFLAGS_libxenstore.
I think this is the right answer. It's in keeping with what Andrew did to xen-mfndump in 7528dcd02de1. Please include a comment like:
# $FOO incorrectly uses libxc internals, which is naughty.
next to each one to mark it out (part of the reason for these is someone got it wrong once and it spread via cut and paste I think).
Ian.
Stefano Stabellini writes ("[PATCH 0/3] move libxc and xenstore public headers to include subdir"):
Quoted 11 lines
this patch series separates out the public libxc and xenstore headers that are supposed to be usable by external programs, such as QEMU, from the private internal headers.
The public headers are moved to a subdirectory called "include".
The headers move requires changes to a few Makefiles, one of which is qemu-xen-traditional's (the patch to qemu-xen-traditional is sent separately).
The series in its current form is not bisectable.
I don't think this is the right way to do this.
It seems to me that, instead, these headers are (or should be) put into dist/install/, and anything out-of-tree which needs them should be looking for them there.
Ian.
Quoted 11 lines · Ian Jackson
Stefano Stabellini writes ("[PATCH 0/3] move libxc and xenstore public headers to include subdir"):
Quoted 10 lines
this patch series separates out the public libxc and xenstore headers that are supposed to be usable by external programs, such as QEMU, from the private internal headers.
The public headers are moved to a subdirectory called "include".
The headers move requires changes to a few Makefiles, one of which is qemu-xen-traditional's (the patch to qemu-xen-traditional is sent separately).
Quoted 6 lines
Quoted 1 line
The series in its current form is not bisectable.
I don't think this is the right way to do this.
It seems to me that, instead, these headers are (or should be) put into dist/install/,
Definitely not. dist/install is an output directory which only some of our build runes create (basically those which are a shortcut for make install DESTDIR=dist)
My build scripts for example don't use those rules, instead they do
make -C tools build
dir=$(mktemp -d /tmp/XXXXXX)
make tools-install DESTDIR=${dir}Lots of distro packaging will do the same.
Quoted 2 lines
and anything out-of-tree which needs them should
be looking for them there.
Properly out of tree things should get them from /usr/{local/,}include which is where they are installed.
This patch is about in-tree things and pseudo-in-tree things like tools/qemu-xen-dir. They are using -Itools/xenstore and picking up xenstore's internal headers alongside the public headers.
Ian.
Ian Campbell writes ("Re: [Xen-devel] [PATCH 0/3] move libxc and xenstore public headers to include subdir"):
Quoted 7 lines · Ian Jackson
Quoted 2 lines
It seems to me that, instead, these headers are (or should be) put into dist/install/,
Definitely not. dist/install is an output directory which only some of our build runes create (basically those which are a shortcut for make install DESTDIR=dist)
Yes, that's what I meant. I was using it as a shorthand for the relevant part of DESTDIR.
Quoted 6 lines
My build scripts for example don't use those rules, instead they do
make -C tools build dir=$(mktemp -d /tmp/XXXXXX) make tools-install DESTDIR=${dir}Lots of distro packaging will do the same.
Well, then the out-of-tree things should be getting things from there.
Quoted 9 lines
Quoted 2 lines
and anything out-of-tree which needs them should
be looking for them there.Properly out of tree things should get them from
/usr/{local/,}includewhich is where they are installed.This patch is about in-tree things and pseudo-in-tree things like
tools/qemu-xen-dir. They are using -Itools/xenstore and picking up xenstore's internal headers alongside the public headers.
I agree that this is wrong. But IMO it should be fixed by having those things that can't cope (which should be only pseudo-in-tree things as you put it) -I$(DESTDIR)/include (or whatever the real thing is).
Ian.
Quoted 11 lines · Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 0/3] move libxc and xenstore public headers to include subdir"):
Quoted 7 lines · Ian Jackson
Quoted 2 lines
It seems to me that, instead, these headers are (or should be) put into dist/install/,
Definitely not. dist/install is an output directory which only some of our build runes create (basically those which are a shortcut for make install DESTDIR=dist)
Yes, that's what I meant. I was using it as a shorthand for the relevant part of DESTDIR.
DESTDIR is not set at build time, only at make install time. Its sole purpose is to install things into it as a pseudo root dirctory for the users staging/packaging purposes.
It should definitely not be used as part of our own build system.
Quoted 8 lines
Quoted 6 lines
My build scripts for example don't use those rules, instead they do
make -C tools build dir=$(mktemp -d /tmp/XXXXXX) make tools-install DESTDIR=${dir}Lots of distro packaging will do the same.
Well, then the out-of-tree things should be getting things from there.
Properly out-of-tree things should be getting them from their actal install locations (/usr/local/include or /usr/include etc), just like they get every other library header they depend on (modulo things like pkg-config etc).
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
and anything out-of-tree which needs them should
be looking for them there.Properly out of tree things should get them from
/usr/{local/,}includewhich is where they are installed.
Quoted 8 lines
Quoted 3 lines
This patch is about in-tree things and pseudo-in-tree things like
tools/qemu-xen-dir. They are using -Itools/xenstore and picking up xenstore's internal headers alongside the public headers.I agree that this is wrong. But IMO it should be fixed by having those things that can't cope (which should be only pseudo-in-tree things as you put it) -I$(DESTDIR)/include (or whatever the real thing is).
No, $(DESTDIR) must not be used in this way by anything built by Xen's build targets. Specifically qemu-xen-dir's build cannot and should not use $(DESTDIR).
If our build process for the qemu integration into the Xen process was to tell users:
make build
make install [DESTDIR=foo]
Now you have Xen. Go and build qemu yourself with:
clone qemu
cd qemu
configure it [using DESTDIR if you want]
make
then you would be right. But the last four steps here are integrated into our "make build" and cannot use DESTDIR.
Ian.
Ian Campbell writes ("Re: [Xen-devel] [PATCH 0/3] move libxc and xenstore public headers to include subdir"):
Quoted 1 line
[stuff]
OK, I'm convinced.
Ian.
Quoted 11 lines · Ian Jackson
Stefano Stabellini writes ("[PATCH 0/3] move libxc and xenstore public headers to include subdir"):
Quoted 10 lines
this patch series separates out the public libxc and xenstore headers that are supposed to be usable by external programs, such as QEMU, from the private internal headers.
The public headers are moved to a subdirectory called "include".
The headers move requires changes to a few Makefiles, one of which is qemu-xen-traditional's (the patch to qemu-xen-traditional is sent separately).
Quoted 7 lines
Quoted 1 line
The series in its current form is not bisectable.
I don't think this is the right way to do this.
It seems to me that, instead, these headers are (or should be) put into dist/install/, and anything out-of-tree which needs them should be looking for them there.
I don't feel strongly about this (I never feel strongly about build systems). However I would like to point out that this is about the forth different approach that I developed and sent out to build QEMU on ARM with Xen support. It would be nice if there wasn't a fifth.
Stefano Stabellini writes ("Re: [Xen-devel] [PATCH 0/3] move libxc and xenstore public headers to include subdir"):
Quoted 4 lines
I don't feel strongly about this (I never feel strongly about build systems). However I would like to point out that this is about the forth different approach that I developed and sent out to build QEMU on ARM with Xen support. It would be nice if there wasn't a fifth.
Oh dear. Sorry. I can live with moving the headers about if people really want to.
How are autogenerated headers handled ? They're copied into the new include/ subdirectory when their source directory is built ?
Ian.
Quoted 11 lines · Ian Jackson
Stefano Stabellini writes ("Re: [Xen-devel] [PATCH 0/3] move libxc and xenstore public headers to include subdir"):
Quoted 4 lines
I don't feel strongly about this (I never feel strongly about build systems). However I would like to point out that this is about the forth different approach that I developed and sent out to build QEMU on ARM with Xen support. It would be nice if there wasn't a fifth.
Oh dear. Sorry. I can live with moving the headers about if people really want to.
How are autogenerated headers handled ? They're copied into the new
include/subdirectory when their source directory is built ?
I guess you mean tools/include?
I haven't touched those. I have only moved libxc and xenstore headers because they are the problematic ones (they have public and private headers mixed up) and they are needed by QEMU.