From 2cd876eb7f5739c71e5211468076fdf6de514290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 21 Feb 2018 18:05:56 +0000 Subject: [PATCH] make: split xen driver build rules into xen/Makefile.inc.am MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel P. Berrangé --- src/Makefile.am | 39 +----------------------- src/xen/Makefile.inc.am | 67 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 38 deletions(-) create mode 100644 src/xen/Makefile.inc.am diff --git a/src/Makefile.am b/src/Makefile.am index 5476e8c0b5..2ae02842b9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -92,6 +92,7 @@ include qemu/Makefile.inc.am include bhyve/Makefile.inc.am include xenconfig/Makefile.inc.am include libxl/Makefile.inc.am +include xen/Makefile.inc.am install-data-extra: $(INSTALL_DATA_DIRS:%=install-data-%) uninstall-data-extra: $(INSTALL_DATA_DIRS:%=install-data-%) @@ -789,7 +790,6 @@ DRIVER_SOURCE_FILES += \ $(REMOTE_DRIVER_SOURCES) \ $(SECRET_DRIVER_SOURCES) \ $(STORAGE_DRIVER_SOURCES) \ - $(XEN_DRIVER_SOURCES) \ $(XENAPI_DRIVER_SOURCES) \ $(NULL) @@ -801,7 +801,6 @@ STATEFUL_DRIVER_SOURCE_FILES += \ $(NWFILTER_DRIVER_SOURCES) \ $(SECRET_DRIVER_SOURCES) \ $(STORAGE_DRIVER_SOURCES) \ - $(XEN_DRIVER_SOURCES) \ $(VZ_DRIVER_SOURCES) \ $(NULL) @@ -830,17 +829,6 @@ check-local: check-protocol check-symfile check-symsorting \ check-aclperms check-admin-symfile check-admin-symsorting .PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct) -# Now the Hypervisor specific drivers -XEN_DRIVER_SOURCES = \ - xen/block_stats.c xen/block_stats.h \ - xen/xen_hypervisor.c xen/xen_hypervisor.h \ - xen/xen_driver.c xen/xen_driver.h \ - xen/xend_internal.c xen/xend_internal.h \ - xen/xm_internal.c xen/xm_internal.h \ - xen/xs_internal.c xen/xs_internal.h -if WITH_XEN_INOTIFY -XEN_DRIVER_SOURCES += xen/xen_inotify.c xen/xen_inotify.h -endif WITH_XEN_INOTIFY LXC_MONITOR_PROTOCOL_GENERATED = \ lxc/lxc_monitor_protocol.h \ @@ -1278,24 +1266,6 @@ EXTRA_DIST += \ $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \ $< $(srcdir)/$(subst $(srcdir)/,,$@) -if WITH_XEN -noinst_LTLIBRARIES += libvirt_driver_xen_impl.la -libvirt_driver_xen_la_SOURCES = -libvirt_driver_xen_la_LIBADD = libvirt_driver_xen_impl.la -mod_LTLIBRARIES += libvirt_driver_xen.la -libvirt_driver_xen_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la -libvirt_driver_xen_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF) - -libvirt_driver_xen_impl_la_CFLAGS = \ - $(XEN_CFLAGS) \ - -I$(srcdir)/access \ - -I$(srcdir)/conf \ - -I$(srcdir)/xenconfig \ - $(AM_CFLAGS) -libvirt_driver_xen_impl_la_LDFLAGS = $(AM_LDFLAGS) -libvirt_driver_xen_impl_la_LIBADD = $(XEN_LIBS) libvirt_xenconfig.la -libvirt_driver_xen_impl_la_SOURCES = $(XEN_DRIVER_SOURCES) -endif WITH_XEN if WITH_XENAPI noinst_LTLIBRARIES += libvirt_driver_xenapi.la @@ -1752,7 +1722,6 @@ access/viraccessapichecklxc.c: $(srcdir)/rpc/gendispatch.pl \ # Add all conditional sources just in case... EXTRA_DIST += \ $(REMOTE_DRIVER_SOURCES) \ - $(XEN_DRIVER_SOURCES) \ $(LXC_DRIVER_SOURCES) \ $(XENAPI_DRIVER_SOURCES) \ $(VZ_DRIVER_SOURCES) \ @@ -3122,9 +3091,6 @@ if WITH_LXC $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/lxc" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/lxc" endif WITH_LXC -if WITH_XEN - $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/xen" -endif WITH_XEN if WITH_NETWORK $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/network" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/dnsmasq" @@ -3166,9 +3132,6 @@ if WITH_LXC rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/lxc" ||: rmdir "$(DESTDIR)$(localstatedir)/log/libvirt/lxc" ||: endif WITH_LXC -if WITH_XEN - rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/xen" ||: -endif WITH_XEN if WITH_NETWORK rm -f $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml rm -f $(DESTDIR)$(confdir)/qemu/networks/default.xml diff --git a/src/xen/Makefile.inc.am b/src/xen/Makefile.inc.am new file mode 100644 index 0000000000..85260251ec --- /dev/null +++ b/src/xen/Makefile.inc.am @@ -0,0 +1,67 @@ +XEN_DRIVER_SOURCES = \ + xen/block_stats.c \ + xen/block_stats.h \ + xen/xen_hypervisor.c \ + xen/xen_hypervisor.h \ + xen/xen_driver.c \ + xen/xen_driver.h \ + xen/xend_internal.c \ + xen/xend_internal.h \ + xen/xm_internal.c \ + xen/xm_internal.h \ + xen/xs_internal.c \ + xen/xs_internal.h \ + $(NULL) + +XEN_DRIVER_INOTIFY_SOURCES = \ + xen/xen_inotify.c \ + xen/xen_inotify.h \ + $(NULL) + +if WITH_XEN_INOTIFY +XEN_DRIVER_SOURCES += $(XEN_DRIVER_INOTIFY_SOURCES) +endif WITH_XEN_INOTIFY + +DRIVER_SOURCE_FILES += $(XEN_DRIVER_SOURCES) +STATEFUL_DRIVER_SOURCE_FILES += $(XEN_DRIVER_SOURCES) +EXTRA_DIST += $(XEN_DRIVER_SOURCES) $(XEN_DRIVER_INOTIFY_SOURCES) + +if WITH_XEN +noinst_LTLIBRARIES += libvirt_driver_xen_impl.la +libvirt_driver_xen_la_SOURCES = +libvirt_driver_xen_la_LIBADD = \ + libvirt_driver_xen_impl.la \ + libvirt.la \ + ../gnulib/lib/libgnu.la \ + $(NULL) +mod_LTLIBRARIES += libvirt_driver_xen.la +libvirt_driver_xen_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF) + +libvirt_driver_xen_impl_la_CFLAGS = \ + $(XEN_CFLAGS) \ + -I$(srcdir)/access \ + -I$(srcdir)/conf \ + -I$(srcdir)/xenconfig \ + $(AM_CFLAGS) \ + $(NULL) +libvirt_driver_xen_impl_la_LDFLAGS = $(AM_LDFLAGS) +libvirt_driver_xen_impl_la_LIBADD = \ + $(XEN_LIBS) \ + libvirt_xenconfig.la \ + $(NULL) +libvirt_driver_xen_impl_la_SOURCES = $(XEN_DRIVER_SOURCES) + +INSTALL_DATA_DIRS += xen + +install-data-xen: + $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/xen" + +uninstall-data-xen: + rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/xen" ||: + +endif WITH_XEN + +.PHONY: \ + install-data-xen \ + uninstall-data-xen \ + $(NULL) -- GitLab