diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2013-07-31 16:15:50 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-08-20 15:33:54 +0100 |
commit | 03145f0fe42c007834c1ef50d95fe6c4f58a326a (patch) | |
tree | 83b0a7896a8de2e13237ce33b43a625f0472dd98 /tools/python | |
parent | 9af42f3598ba6f4b38384fdd2038c30f7ec763b9 (diff) | |
download | xen-03145f0fe42c007834c1ef50d95fe6c4f58a326a.tar.gz xen-03145f0fe42c007834c1ef50d95fe6c4f58a326a.tar.bz2 xen-03145f0fe42c007834c1ef50d95fe6c4f58a326a.zip |
tools: make building xend configurable.
xend has been deprecated for 2 releases now. Lets make it possible to not even
build it.
For now I'm leaving the default of on but I would like to change that before
the 4.4 release.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Matt Wilson <msw@amazon.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/python')
-rw-r--r-- | tools/python/Makefile | 10 | ||||
-rw-r--r-- | tools/python/setup.py | 35 |
2 files changed, 34 insertions, 11 deletions
diff --git a/tools/python/Makefile b/tools/python/Makefile index 8461d0fe4d..3d0f8f0678 100644 --- a/tools/python/Makefile +++ b/tools/python/Makefile @@ -16,20 +16,26 @@ build: genpath genwrap.py $(XEN_ROOT)/tools/libxl/libxl_types.idl \ $(XEN_ROOT)/tools/libxl/libxl_types.idl \ xen/lowlevel/xl/_pyxl_types.h \ xen/lowlevel/xl/_pyxl_types.c - CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py build + CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py build --xend=$(CONFIG_XEND) .PHONY: install install: install-dtd CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \ - $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force + $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force --xend=$(CONFIG_XEND) $(INSTALL_DIR) $(DESTDIR)$(SBINDIR) +ifeq ($(CONFIG_XEND),y) $(INSTALL_PYTHON_PROG) xen/xm/xm $(DESTDIR)$(SBINDIR)/xm $(INSTALL_PYTHON_PROG) xen/xend/xend $(DESTDIR)$(SBINDIR)/xend +endif install-dtd: all +ifeq ($(CONFIG_XEND),y) $(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/xen $(INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)$(SHAREDIR)/xen +else + : +endif .PHONY: test test: diff --git a/tools/python/setup.py b/tools/python/setup.py index 42a70fc8d3..4f6656427c 100644 --- a/tools/python/setup.py +++ b/tools/python/setup.py @@ -1,6 +1,6 @@ from distutils.core import setup, Extension -import os +import os, sys XEN_ROOT = "../.." @@ -95,11 +95,19 @@ if plat == 'SunOS': if plat == 'Linux': modules.extend([ checkpoint, netlink ]) -setup(name = 'xen', - version = '3.0', - description = 'Xen', - packages = ['xen', - 'xen.lowlevel', +enable_xend = True +new_argv = [] +for arg in sys.argv: + if arg == "--xend=y": + enable_xend = True + elif arg == "--xend=n": + enable_xend = False + else: + new_argv.append(arg) +sys.argv = new_argv + +if enable_xend: + xend_packages = [ 'xen.util', 'xen.util.xsm', 'xen.util.xsm.dummy', @@ -110,14 +118,23 @@ setup(name = 'xen', 'xen.xend.xenstore', 'xen.xm', 'xen.web', - 'xen.sv', - 'xen.xsview', 'xen.remus', 'xen.xend.tests', 'xen.xend.server.tests', 'xen.xend.xenstore.tests', 'xen.xm.tests' - ], + ] +else: + xend_packages = [] + +setup(name = 'xen', + version = '3.0', + description = 'Xen', + packages = ['xen', + 'xen.lowlevel', + 'xen.sv', + 'xen.xsview', + ] + xend_packages, ext_package = "xen.lowlevel", ext_modules = modules ) |