All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] tools: split xl into a separate directory
@ 2017-02-21 15:51 Wei Liu
  2017-02-21 15:51 ` [PATCH 1/2] tools: provide libxlutil compiling and linking options Wei Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Wei Liu @ 2017-02-21 15:51 UTC (permalink / raw)
  To: Xen-devel; +Cc: yi.y.sun, Ian Jackson, Wei Liu, zhangchen.fnst, haozhong.zhang

Xl has grown sufficiently large to warrnant its own directory. We also need
clear separation between the client (xl) and library (libxl).

This patch series moves xl into tools/xl directory.

Use find to generate a list of files to be installed from staging and wip
branch, then `diff -q  staging  wip`. No output is produced from diff.

I also CC some folks who will be affected by this change. If this affects your
work heavily, please let me know.

Wei Liu (2):
  tools: provide libxlutil compiling and linking options
  tools: move xl to a dedicated directory

 .gitignore                          |  2 +-
 tools/Rules.mk                      |  7 ++++++
 tools/libxl/Makefile                | 22 ++++---------------
 tools/xl/Makefile                   | 43 +++++++++++++++++++++++++++++++++++++
 tools/{libxl => xl}/bash-completion |  0
 tools/{libxl => xl}/xl.c            |  0
 tools/{libxl => xl}/xl.h            |  0
 tools/{libxl => xl}/xl_cmdimpl.c    |  0
 tools/{libxl => xl}/xl_cmdtable.c   |  0
 tools/{libxl => xl}/xl_sxp.c        |  0
 10 files changed, 55 insertions(+), 19 deletions(-)
 create mode 100644 tools/xl/Makefile
 rename tools/{libxl => xl}/bash-completion (100%)
 rename tools/{libxl => xl}/xl.c (100%)
 rename tools/{libxl => xl}/xl.h (100%)
 rename tools/{libxl => xl}/xl_cmdimpl.c (100%)
 rename tools/{libxl => xl}/xl_cmdtable.c (100%)
 rename tools/{libxl => xl}/xl_sxp.c (100%)

-- 
2.11.0


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

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

* [PATCH 1/2] tools: provide libxlutil compiling and linking options
  2017-02-21 15:51 [PATCH 0/2] tools: split xl into a separate directory Wei Liu
@ 2017-02-21 15:51 ` Wei Liu
  2017-02-21 15:51 ` [PATCH 2/2] tools: move xl to a dedicated directory Wei Liu
  2017-02-23 12:17 ` [PATCH 0/2] tools: split xl into a separate directory Ian Jackson
  2 siblings, 0 replies; 13+ messages in thread
From: Wei Liu @ 2017-02-21 15:51 UTC (permalink / raw)
  To: Xen-devel; +Cc: yi.y.sun, Ian Jackson, Wei Liu, zhangchen.fnst, haozhong.zhang

We are about to split out xl (which depends on libxlutil) to a different
directory. Provide the proper options for compiling and linking in
Rules.mk, and replace the hardcoded string in libxl/Makefile.

No functional change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 tools/Rules.mk       | 7 +++++++
 tools/libxl/Makefile | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index b35999b21b..8a16013335 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -17,6 +17,8 @@ XEN_LIBXENCALL     = $(XEN_ROOT)/tools/libs/call
 XEN_LIBXENFOREIGNMEMORY = $(XEN_ROOT)/tools/libs/foreignmemory
 XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
 XEN_XENLIGHT       = $(XEN_ROOT)/tools/libxl
+# Currently libxlutil lives in the same directory as libxenlight
+XEN_XLUTIL         = $(XEN_XENLIGHT)
 XEN_XENSTORE       = $(XEN_ROOT)/tools/xenstore
 XEN_LIBXENSTAT     = $(XEN_ROOT)/tools/xenstat/libxenstat/src
 XEN_BLKTAP2        = $(XEN_ROOT)/tools/blktap2
@@ -172,6 +174,11 @@ SHDEPS_libxenlight = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libblktapc
 LDLIBS_libxenlight = $(SHDEPS_libxenlight) $(XEN_XENLIGHT)/libxenlight$(libextension)
 SHLIB_libxenlight  = $(SHDEPS_libxenlight) -Wl,-rpath-link=$(XEN_XENLIGHT)
 
+CFLAGS_libxlutil = -I$(XEN_XLUTIL)
+SHDEPS_libxlutil = $(SHLIB_libxenlight)
+LDLIBS_libxlutil = $(SHDEPS_libxlutil) $(XEN_XENLIGHT)/libxlutil$(libextension)
+SHLIB_libxlutil  = $(SHDEPS_libxlutil) -Wl,-rpath-link=$(XEN_XLUTIL)
+
 CFLAGS += -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__
 
 # Get gcc to generate the dependencies for us.
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 6cc7b4511b..0f642cc57a 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -289,7 +289,7 @@ libxlutil.a: $(LIBXLU_OBJS)
 	$(AR) rcs libxlutil.a $^
 
 xl: $(XL_OBJS) libxlutil.so libxenlight.so
-	$(CC) $(LDFLAGS) -o $@ $(XL_OBJS) libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -lyajl $(APPEND_LDFLAGS)
+	$(CC) $(LDFLAGS) -o $@ $(XL_OBJS) $(LDLIBS_libxlutil) $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -lyajl $(APPEND_LDFLAGS)
 
 test_%: test_%.o test_common.o libxlutil.so libxenlight_test.so
 	$(CC) $(LDFLAGS) -o $@ $^ $(filter-out %libxenlight.so, $(LDLIBS_libxenlight)) $(LDLIBS_libxentoollog) -lyajl $(APPEND_LDFLAGS)
-- 
2.11.0


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

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

* [PATCH 2/2] tools: move xl to a dedicated directory
  2017-02-21 15:51 [PATCH 0/2] tools: split xl into a separate directory Wei Liu
  2017-02-21 15:51 ` [PATCH 1/2] tools: provide libxlutil compiling and linking options Wei Liu
@ 2017-02-21 15:51 ` Wei Liu
  2017-02-23 12:17 ` [PATCH 0/2] tools: split xl into a separate directory Ian Jackson
  2 siblings, 0 replies; 13+ messages in thread
From: Wei Liu @ 2017-02-21 15:51 UTC (permalink / raw)
  To: Xen-devel; +Cc: yi.y.sun, Ian Jackson, Wei Liu, zhangchen.fnst, haozhong.zhang

It makes clear distinction between the client (xl) and library (libxl),
which should help design better APIs.  This will also help reduce the
code size in libxl directory.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore                          |  2 +-
 tools/libxl/Makefile                | 22 ++++---------------
 tools/xl/Makefile                   | 43 +++++++++++++++++++++++++++++++++++++
 tools/{libxl => xl}/bash-completion |  0
 tools/{libxl => xl}/xl.c            |  0
 tools/{libxl => xl}/xl.h            |  0
 tools/{libxl => xl}/xl_cmdimpl.c    |  0
 tools/{libxl => xl}/xl_cmdtable.c   |  0
 tools/{libxl => xl}/xl_sxp.c        |  0
 9 files changed, 48 insertions(+), 19 deletions(-)
 create mode 100644 tools/xl/Makefile
 rename tools/{libxl => xl}/bash-completion (100%)
 rename tools/{libxl => xl}/xl.c (100%)
 rename tools/{libxl => xl}/xl.h (100%)
 rename tools/{libxl => xl}/xl_cmdimpl.c (100%)
 rename tools/{libxl => xl}/xl_cmdtable.c (100%)
 rename tools/{libxl => xl}/xl_sxp.c (100%)

diff --git a/.gitignore b/.gitignore
index c8d56d1bdb..a785006e44 100644
--- a/.gitignore
+++ b/.gitignore
@@ -189,7 +189,6 @@ tools/libxl/ssdt*
 tools/libxl/testenum
 tools/libxl/testenum.c
 tools/libxl/tmp.*
-tools/libxl/xl
 tools/misc/cpuperf/cpuperf-perfcntr
 tools/misc/cpuperf/cpuperf-xen
 tools/misc/xc_shadow
@@ -380,6 +379,7 @@ tools/firmware/etherboot/ipxe/
 tools/python/xen/lowlevel/xl/_pyxl_types.c
 tools/python/xen/lowlevel/xl/_pyxl_types.h
 tools/xenstore/xenstore-watch
+tools/xl/xl
 
 docs/txt/misc/*.txt
 docs/txt/man/*.txt
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 0f642cc57a..f00d9ef355 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -178,16 +178,9 @@ LIBXLU_OBJS = libxlu_cfg_y.o libxlu_cfg_l.o libxlu_cfg.o \
 	libxlu_disk_l.o libxlu_disk.o libxlu_vif.o libxlu_pci.o
 $(LIBXLU_OBJS): CFLAGS += $(CFLAGS_libxenctrl) # For xentoollog.h
 
-CLIENTS = xl testidl libxl-save-helper
+$(TEST_PROG_OBJS) _libxl.api-for-check: CFLAGS += $(CFLAGS_libxentoollog)
 
-CFLAGS_XL += $(CFLAGS_libxenlight)
-CFLAGS_XL += -Wshadow
-
-XL_OBJS = xl.o xl_cmdimpl.o xl_cmdtable.o xl_sxp.o
-$(XL_OBJS) $(TEST_PROG_OBJS) _libxl.api-for-check: \
-            CFLAGS += $(CFLAGS_libxentoollog)
-$(XL_OBJS): CFLAGS += $(CFLAGS_XL)
-$(XL_OBJS): CFLAGS += -include $(XEN_ROOT)/tools/config.h # libxl_json.h needs it.
+CLIENTS = testidl libxl-save-helper
 
 libxl_dom.o: CFLAGS += -I$(XEN_ROOT)/tools  # include libacpi/x86.h
 libxl_x86_acpi.o: CFLAGS += -I$(XEN_ROOT)/tools
@@ -207,7 +200,7 @@ all: $(CLIENTS) $(TEST_PROGS) $(PKG_CONFIG) \
 		libxenlight.so libxenlight.a libxlutil.so libxlutil.a \
 	$(AUTOSRCS) $(AUTOINCS)
 
-$(LIBXL_OBJS) $(LIBXLU_OBJS) $(XL_OBJS) $(SAVE_HELPER_OBJS) \
+$(LIBXL_OBJS) $(LIBXLU_OBJS) $(SAVE_HELPER_OBJS) \
 		$(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS): \
 	$(AUTOINCS) libxl.api-ok
 
@@ -249,7 +242,7 @@ libxl_internal_json.h: _libxl_types_internal_json.h
 xl.h: _paths.h
 
 $(LIBXL_OBJS) $(LIBXL_TEST_OBJS) $(LIBXLU_OBJS) \
-	$(XL_OBJS) $(TEST_PROG_OBJS) $(SAVE_HELPER_OBJS): libxl.h
+	$(TEST_PROG_OBJS) $(SAVE_HELPER_OBJS): libxl.h
 $(LIBXL_OBJS) $(LIBXL_TEST_OBJS): libxl_internal.h
 
 _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_type%.idl gentypes.py idl.py
@@ -288,9 +281,6 @@ libxlutil.so.$(XLUMAJOR).$(XLUMINOR): $(LIBXLU_OBJS) libxenlight.so
 libxlutil.a: $(LIBXLU_OBJS)
 	$(AR) rcs libxlutil.a $^
 
-xl: $(XL_OBJS) libxlutil.so libxenlight.so
-	$(CC) $(LDFLAGS) -o $@ $(XL_OBJS) $(LDLIBS_libxlutil) $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -lyajl $(APPEND_LDFLAGS)
-
 test_%: test_%.o test_common.o libxlutil.so libxenlight_test.so
 	$(CC) $(LDFLAGS) -o $@ $^ $(filter-out %libxenlight.so, $(LDLIBS_libxenlight)) $(LDLIBS_libxentoollog) -lyajl $(APPEND_LDFLAGS)
 
@@ -306,13 +296,10 @@ $(PKG_CONFIG): % : %.in Makefile
 
 .PHONY: install
 install: all
-	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 	$(INSTALL_DIR) $(DESTDIR)$(libdir)
 	$(INSTALL_DIR) $(DESTDIR)$(includedir)
-	$(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR)
 	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
 	$(INSTALL_DIR) $(DESTDIR)$(PKG_INSTALLDIR)
-	$(INSTALL_PROG) xl $(DESTDIR)$(sbindir)
 	$(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(LIBEXEC_BIN)
 	$(INSTALL_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
 	$(SYMLINK_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenlight.so.$(MAJOR)
@@ -323,7 +310,6 @@ install: all
 	$(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR) $(DESTDIR)$(libdir)/libxlutil.so
 	$(INSTALL_DATA) libxlutil.a $(DESTDIR)$(libdir)
 	$(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h $(DESTDIR)$(includedir)
-	$(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
 	$(INSTALL_DATA) xenlight.pc $(DESTDIR)$(PKG_INSTALLDIR)
 	$(INSTALL_DATA) xlutil.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
diff --git a/tools/xl/Makefile b/tools/xl/Makefile
new file mode 100644
index 0000000000..32dff40584
--- /dev/null
+++ b/tools/xl/Makefile
@@ -0,0 +1,43 @@
+#
+# tools/xl/Makefile
+#
+
+XEN_ROOT = $(CURDIR)/../..
+include $(XEN_ROOT)/tools/Rules.mk
+
+CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
+	-Wno-declaration-after-statement -Wformat-nonliteral
+CFLAGS += -I. -fPIC
+
+CFLAGS += $(PTHREAD_CFLAGS)
+LDFLAGS += $(PTHREAD_LDFLAGS)
+
+CFLAGS_XL += $(CFLAGS_libxenlight)
+CFLAGS_XL += -Wshadow
+
+XL_OBJS = xl.o xl_cmdimpl.o xl_cmdtable.o xl_sxp.o
+$(XL_OBJS): CFLAGS += $(CFLAGS_libxentoollog)
+$(XL_OBJS): CFLAGS += $(CFLAGS_XL)
+$(XL_OBJS): CFLAGS += -include $(XEN_ROOT)/tools/config.h # libxl_json.h needs it.
+
+.PHONY: all
+all: xl
+
+xl: $(XL_OBJS)
+	$(CC) $(LDFLAGS) -o $@ $(XL_OBJS) $(LDLIBS_libxlutil) $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -lyajl $(APPEND_LDFLAGS)
+
+.PHONY: install
+install: all
+	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
+	$(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR)
+	$(INSTALL_PROG) xl $(DESTDIR)$(sbindir)
+	$(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
+
+.PHONY: clean
+clean:
+	$(RM) -f *.o xl $(DEPS)
+
+distclean: clean
+
+
+-include $(DEPS)
diff --git a/tools/libxl/bash-completion b/tools/xl/bash-completion
similarity index 100%
rename from tools/libxl/bash-completion
rename to tools/xl/bash-completion
diff --git a/tools/libxl/xl.c b/tools/xl/xl.c
similarity index 100%
rename from tools/libxl/xl.c
rename to tools/xl/xl.c
diff --git a/tools/libxl/xl.h b/tools/xl/xl.h
similarity index 100%
rename from tools/libxl/xl.h
rename to tools/xl/xl.h
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/xl/xl_cmdimpl.c
similarity index 100%
rename from tools/libxl/xl_cmdimpl.c
rename to tools/xl/xl_cmdimpl.c
diff --git a/tools/libxl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c
similarity index 100%
rename from tools/libxl/xl_cmdtable.c
rename to tools/xl/xl_cmdtable.c
diff --git a/tools/libxl/xl_sxp.c b/tools/xl/xl_sxp.c
similarity index 100%
rename from tools/libxl/xl_sxp.c
rename to tools/xl/xl_sxp.c
-- 
2.11.0


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

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

* Re: [PATCH 0/2] tools: split xl into a separate directory
  2017-02-21 15:51 [PATCH 0/2] tools: split xl into a separate directory Wei Liu
  2017-02-21 15:51 ` [PATCH 1/2] tools: provide libxlutil compiling and linking options Wei Liu
  2017-02-21 15:51 ` [PATCH 2/2] tools: move xl to a dedicated directory Wei Liu
@ 2017-02-23 12:17 ` Ian Jackson
  2017-02-23 13:20   ` Wei Liu
  2 siblings, 1 reply; 13+ messages in thread
From: Ian Jackson @ 2017-02-23 12:17 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, yi.y.sun, zhangchen.fnst, haozhong.zhang

Wei Liu writes ("[PATCH 0/2] tools: split xl into a separate directory"):
> Xl has grown sufficiently large to warrnant its own directory. We also need
> clear separation between the client (xl) and library (libxl).

This is a fine idea.

Both patches,

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

Thanks,
Ian.

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

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

* Re: [PATCH 0/2] tools: split xl into a separate directory
  2017-02-23 12:17 ` [PATCH 0/2] tools: split xl into a separate directory Ian Jackson
@ 2017-02-23 13:20   ` Wei Liu
  2017-02-23 14:55     ` Wei Liu
  0 siblings, 1 reply; 13+ messages in thread
From: Wei Liu @ 2017-02-23 13:20 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Xen-devel, Wei Liu, zhangchen.fnst, yi.y.sun, haozhong.zhang

On Thu, Feb 23, 2017 at 12:17:38PM +0000, Ian Jackson wrote:
> Wei Liu writes ("[PATCH 0/2] tools: split xl into a separate directory"):
> > Xl has grown sufficiently large to warrnant its own directory. We also need
> > clear separation between the client (xl) and library (libxl).
> 
> This is a fine idea.
> 
> Both patches,
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> 

Hmm... It turns out the build system needs a bit more attention.
Parallel build failed. I will rework and resend.

Wei.

> Thanks,
> Ian.

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

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

* Re: [PATCH 0/2] tools: split xl into a separate directory
  2017-02-23 13:20   ` Wei Liu
@ 2017-02-23 14:55     ` Wei Liu
  2017-02-23 15:54       ` Ian Jackson
  0 siblings, 1 reply; 13+ messages in thread
From: Wei Liu @ 2017-02-23 14:55 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Xen-devel, Wei Liu, zhangchen.fnst, yi.y.sun, haozhong.zhang

On Thu, Feb 23, 2017 at 01:20:25PM +0000, Wei Liu wrote:
> On Thu, Feb 23, 2017 at 12:17:38PM +0000, Ian Jackson wrote:
> > Wei Liu writes ("[PATCH 0/2] tools: split xl into a separate directory"):
> > > Xl has grown sufficiently large to warrnant its own directory. We also need
> > > clear separation between the client (xl) and library (libxl).
> > 
> > This is a fine idea.
> > 
> > Both patches,
> > 
> > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> > 
> 
> Hmm... It turns out the build system needs a bit more attention.
> Parallel build failed. I will rework and resend.
> 

So libxl needs to be built before xl. 

Basically this needs to be folded into xl/Makefile:

+# libxenlight should be built before building xl
+.PHONY: libxl
+libxl:
+       $(MAKE) -C $(XEN_ROOT)/tools/libxl
+$(XL_OBJS): libxl
+

This is in line with how we do things: libxl/Makefile has something
similar to build libacpi.

Please let me know if you have objection to this.

Wei.

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

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

* Re: [PATCH 0/2] tools: split xl into a separate directory
  2017-02-23 14:55     ` Wei Liu
@ 2017-02-23 15:54       ` Ian Jackson
  2017-02-23 15:57         ` Wei Liu
  0 siblings, 1 reply; 13+ messages in thread
From: Ian Jackson @ 2017-02-23 15:54 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, Ian Jackson, zhangchen.fnst, yi.y.sun, haozhong.zhang

Wei Liu writes ("Re: [PATCH 0/2] tools: split xl into a separate directory"):
> Basically this needs to be folded into xl/Makefile:
> 
> +# libxenlight should be built before building xl
> +.PHONY: libxl
> +libxl:
> +       $(MAKE) -C $(XEN_ROOT)/tools/libxl
> +$(XL_OBJS): libxl

OMG.

> This is in line with how we do things: libxl/Makefile has something
> similar to build libacpi.
> 
> Please let me know if you have objection to this.

I hadn't noticed that libxl/Makefile had that.

No, this is entirely wrong.  You will end up running make in
tools/libxl twice simultaneously.

Ian.

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

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

* Re: [PATCH 0/2] tools: split xl into a separate directory
  2017-02-23 15:54       ` Ian Jackson
@ 2017-02-23 15:57         ` Wei Liu
  2017-02-23 16:29           ` Ian Jackson
  0 siblings, 1 reply; 13+ messages in thread
From: Wei Liu @ 2017-02-23 15:57 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Xen-devel, Wei Liu, zhangchen.fnst, yi.y.sun, haozhong.zhang

On Thu, Feb 23, 2017 at 03:54:02PM +0000, Ian Jackson wrote:
> Wei Liu writes ("Re: [PATCH 0/2] tools: split xl into a separate directory"):
> > Basically this needs to be folded into xl/Makefile:
> > 
> > +# libxenlight should be built before building xl
> > +.PHONY: libxl
> > +libxl:
> > +       $(MAKE) -C $(XEN_ROOT)/tools/libxl
> > +$(XL_OBJS): libxl
> 
> OMG.
> 
> > This is in line with how we do things: libxl/Makefile has something
> > similar to build libacpi.
> > 
> > Please let me know if you have objection to this.
> 
> I hadn't noticed that libxl/Makefile had that.
> 
> No, this is entirely wrong.  You will end up running make in
> tools/libxl twice simultaneously.

Libacpi can be built in different directories by setting ACPI_BUILD_DIR.

Libxl doesn't have that, yet. We can do that, too. But it might involve
quite a bit of fiddling with libxl/Makefile.

Wei.

> 
> Ian.

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

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

* Re: [PATCH 0/2] tools: split xl into a separate directory
  2017-02-23 15:57         ` Wei Liu
@ 2017-02-23 16:29           ` Ian Jackson
  2017-02-23 16:59             ` Wei Liu
  0 siblings, 1 reply; 13+ messages in thread
From: Ian Jackson @ 2017-02-23 16:29 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, Ian Jackson, zhangchen.fnst, yi.y.sun, haozhong.zhang

Wei Liu writes ("Re: [PATCH 0/2] tools: split xl into a separate directory"):
> On Thu, Feb 23, 2017 at 03:54:02PM +0000, Ian Jackson wrote:
> > No, this is entirely wrong.  You will end up running make in
> > tools/libxl twice simultaneously.
> 
> Libacpi can be built in different directories by setting ACPI_BUILD_DIR.

Aha.  So it's built multiple times (presumably with different build
options, etc).

> Libxl doesn't have that, yet. We can do that, too. But it might involve
> quite a bit of fiddling with libxl/Makefile.

This is not the right approach for libxl.

Rather the parent Makefile should have a dependency, so that the make
in `tools' knows to complete libxl before starting xl.

Ian.

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

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

* Re: [PATCH 0/2] tools: split xl into a separate directory
  2017-02-23 16:29           ` Ian Jackson
@ 2017-02-23 16:59             ` Wei Liu
  2017-02-23 17:01               ` Wei Liu
  0 siblings, 1 reply; 13+ messages in thread
From: Wei Liu @ 2017-02-23 16:59 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Xen-devel, Wei Liu, zhangchen.fnst, yi.y.sun, haozhong.zhang

On Thu, Feb 23, 2017 at 04:29:46PM +0000, Ian Jackson wrote:
> Wei Liu writes ("Re: [PATCH 0/2] tools: split xl into a separate directory"):
> > On Thu, Feb 23, 2017 at 03:54:02PM +0000, Ian Jackson wrote:
> > > No, this is entirely wrong.  You will end up running make in
> > > tools/libxl twice simultaneously.
> > 
> > Libacpi can be built in different directories by setting ACPI_BUILD_DIR.
> 
> Aha.  So it's built multiple times (presumably with different build
> options, etc).
> 
> > Libxl doesn't have that, yet. We can do that, too. But it might involve
> > quite a bit of fiddling with libxl/Makefile.
> 
> This is not the right approach for libxl.
> 
> Rather the parent Makefile should have a dependency, so that the make
> in `tools' knows to complete libxl before starting xl.
> 

I think this is better.

But I am now very confused how we encode this in our build system.
Obviously there is already such need. Say, all the tools under misc
would require libxc to be built before hand, but the dependency
doesn't seem to be explicitly encoded.

Wei.

> Ian.

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

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

* Re: [PATCH 0/2] tools: split xl into a separate directory
  2017-02-23 16:59             ` Wei Liu
@ 2017-02-23 17:01               ` Wei Liu
  2017-02-23 17:25                 ` Ian Jackson
  0 siblings, 1 reply; 13+ messages in thread
From: Wei Liu @ 2017-02-23 17:01 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Xen-devel, Wei Liu, zhangchen.fnst, yi.y.sun, haozhong.zhang

On Thu, Feb 23, 2017 at 04:59:34PM +0000, Wei Liu wrote:
> On Thu, Feb 23, 2017 at 04:29:46PM +0000, Ian Jackson wrote:
> > Wei Liu writes ("Re: [PATCH 0/2] tools: split xl into a separate directory"):
> > > On Thu, Feb 23, 2017 at 03:54:02PM +0000, Ian Jackson wrote:
> > > > No, this is entirely wrong.  You will end up running make in
> > > > tools/libxl twice simultaneously.
> > > 
> > > Libacpi can be built in different directories by setting ACPI_BUILD_DIR.
> > 
> > Aha.  So it's built multiple times (presumably with different build
> > options, etc).
> > 
> > > Libxl doesn't have that, yet. We can do that, too. But it might involve
> > > quite a bit of fiddling with libxl/Makefile.
> > 
> > This is not the right approach for libxl.
> > 
> > Rather the parent Makefile should have a dependency, so that the make
> > in `tools' knows to complete libxl before starting xl.
> > 
> 
> I think this is better.
> 
> But I am now very confused how we encode this in our build system.
> Obviously there is already such need. Say, all the tools under misc
> would require libxc to be built before hand, but the dependency
> doesn't seem to be explicitly encoded.
> 

OIC: the order matters in tools/Makefile

I just need to move

SUBDIRS-y += xl after SUBDIRS-y += libxl

Let me know what you think.

Wei.

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

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

* Re: [PATCH 0/2] tools: split xl into a separate directory
  2017-02-23 17:01               ` Wei Liu
@ 2017-02-23 17:25                 ` Ian Jackson
  2017-02-23 17:27                   ` Wei Liu
  0 siblings, 1 reply; 13+ messages in thread
From: Ian Jackson @ 2017-02-23 17:25 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, yi.y.sun, zhangchen.fnst, haozhong.zhang

Wei Liu writes ("Re: [PATCH 0/2] tools: split xl into a separate directory"):
> On Thu, Feb 23, 2017 at 04:59:34PM +0000, Wei Liu wrote:
> > But I am now very confused how we encode this in our build system.
> > Obviously there is already such need. Say, all the tools under misc
> > would require libxc to be built before hand, but the dependency
> > doesn't seem to be explicitly encoded.
> 
> OIC: the order matters in tools/Makefile

Yes.  The loop is a shell loop, not a lot of parallel make targets.

> I just need to move
> 
> SUBDIRS-y += xl after SUBDIRS-y += libxl

Precisely.

Ian.

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

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

* Re: [PATCH 0/2] tools: split xl into a separate directory
  2017-02-23 17:25                 ` Ian Jackson
@ 2017-02-23 17:27                   ` Wei Liu
  0 siblings, 0 replies; 13+ messages in thread
From: Wei Liu @ 2017-02-23 17:27 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Xen-devel, Wei Liu, zhangchen.fnst, yi.y.sun, haozhong.zhang

On Thu, Feb 23, 2017 at 05:25:32PM +0000, Ian Jackson wrote:
> Wei Liu writes ("Re: [PATCH 0/2] tools: split xl into a separate directory"):
> > On Thu, Feb 23, 2017 at 04:59:34PM +0000, Wei Liu wrote:
> > > But I am now very confused how we encode this in our build system.
> > > Obviously there is already such need. Say, all the tools under misc
> > > would require libxc to be built before hand, but the dependency
> > > doesn't seem to be explicitly encoded.
> > 
> > OIC: the order matters in tools/Makefile
> 
> Yes.  The loop is a shell loop, not a lot of parallel make targets.
> 
> > I just need to move
> > 
> > SUBDIRS-y += xl after SUBDIRS-y += libxl
> 
> Precisely.
> 

Right. I will push the updated version soon.

Wei.

> Ian.

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

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

end of thread, other threads:[~2017-02-23 17:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-21 15:51 [PATCH 0/2] tools: split xl into a separate directory Wei Liu
2017-02-21 15:51 ` [PATCH 1/2] tools: provide libxlutil compiling and linking options Wei Liu
2017-02-21 15:51 ` [PATCH 2/2] tools: move xl to a dedicated directory Wei Liu
2017-02-23 12:17 ` [PATCH 0/2] tools: split xl into a separate directory Ian Jackson
2017-02-23 13:20   ` Wei Liu
2017-02-23 14:55     ` Wei Liu
2017-02-23 15:54       ` Ian Jackson
2017-02-23 15:57         ` Wei Liu
2017-02-23 16:29           ` Ian Jackson
2017-02-23 16:59             ` Wei Liu
2017-02-23 17:01               ` Wei Liu
2017-02-23 17:25                 ` Ian Jackson
2017-02-23 17:27                   ` Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.