From nobody Wed May 14 18:34:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519304207918590.0642047695769; Thu, 22 Feb 2018 04:56:47 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7762F2812F; Thu, 22 Feb 2018 12:56:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 44C5260474; Thu, 22 Feb 2018 12:56:46 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E79474A489; Thu, 22 Feb 2018 12:56:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1MCuSj1010853 for ; Thu, 22 Feb 2018 07:56:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id A6673AF037; Thu, 22 Feb 2018 12:56:28 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id 36952AF03A; Thu, 22 Feb 2018 12:56:28 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 22 Feb 2018 12:56:10 +0000 Message-Id: <20180222125617.6768-10-berrange@redhat.com> In-Reply-To: <20180222125617.6768-1-berrange@redhat.com> References: <20180222125617.6768-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v1 09/16] make: split qemu driver build rules into qemu/Makefile.inc.am X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 22 Feb 2018 12:56:47 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: Daniel P. Berrang=C3=A9 --- src/Makefile.am | 122 +++++--------------------------------- src/qemu/Makefile.inc.am | 148 +++++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 162 insertions(+), 108 deletions(-) create mode 100644 src/qemu/Makefile.inc.am diff --git a/src/Makefile.am b/src/Makefile.am index 7927bcbb04..18566ca920 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -72,6 +72,13 @@ libvirt_la_BUILT_LIBADD =3D SYM_FILES =3D USED_SYM_FILES =3D GENERATED_SYM_FILES =3D +augeas_DATA =3D +augeastest_DATA =3D +conf_DATA =3D +AUGEAS_DIRS =3D +if WITH_DTRACE_PROBES +tapset_DATA =3D +endif WITH_DTRACE_PROBES =20 include uml/Makefile.inc.am include phyp/Makefile.inc.am @@ -81,6 +88,7 @@ include hyperv/Makefile.inc.am include vmware/Makefile.inc.am include vbox/Makefile.inc.am include openvz/Makefile.inc.am +include qemu/Makefile.inc.am =20 install-data-extra: $(INSTALL_DATA_DIRS:%=3Dinstall-data-%) uninstall-data-extra: $(INSTALL_DATA_DIRS:%=3Dinstall-data-%) @@ -109,13 +117,11 @@ moddir =3D $(libdir)/libvirt/connection-driver sbin_PROGRAMS =3D =20 confdir =3D $(sysconfdir)/libvirt -conf_DATA =3D libvirt.conf libvirt-admin.conf +conf_DATA +=3D libvirt.conf libvirt-admin.conf =20 augeasdir =3D $(datadir)/augeas/lenses -augeas_DATA =3D =20 augeastestdir =3D $(datadir)/augeas/lenses/tests -augeastest_DATA =3D =20 # These files are not related to driver APIs. Simply generic # helper APIs for various purposes @@ -778,7 +784,6 @@ DRIVER_SOURCE_FILES +=3D \ $(NODE_DEVICE_DRIVER_UDEV_SOURCES) \ $(NWFILTER_DRIVER_SOURCES) \ $(VZ_DRIVER_SOURCES) \ - $(QEMU_DRIVER_SOURCES) \ $(REMOTE_DRIVER_SOURCES) \ $(SECRET_DRIVER_SOURCES) \ $(STORAGE_DRIVER_SOURCES) \ @@ -794,7 +799,6 @@ STATEFUL_DRIVER_SOURCE_FILES +=3D \ $(NETWORK_DRIVER_SOURCES) \ $(NODE_DEVICE_DRIVER_SOURCES) \ $(NWFILTER_DRIVER_SOURCES) \ - $(QEMU_DRIVER_SOURCES) \ $(SECRET_DRIVER_SOURCES) \ $(STORAGE_DRIVER_SOURCES) \ $(XEN_DRIVER_SOURCES) \ @@ -908,35 +912,6 @@ SECURITY_DRIVER_APPARMOR_HELPER_SOURCES =3D \ $(DATATYPES_SOURCES) \ security/virt-aa-helper.c =20 -QEMU_DRIVER_SOURCES =3D \ - qemu/qemu_agent.c qemu/qemu_agent.h \ - qemu/qemu_alias.c qemu/qemu_alias.h \ - qemu/qemu_block.c qemu/qemu_block.h \ - qemu/qemu_blockjob.c qemu/qemu_blockjob.h \ - qemu/qemu_capabilities.c qemu/qemu_capabilities.h \ - qemu/qemu_command.c qemu/qemu_command.h \ - qemu/qemu_parse_command.c qemu/qemu_parse_command.h \ - qemu/qemu_domain.c qemu/qemu_domain.h \ - qemu/qemu_domain_address.c qemu/qemu_domain_address.h \ - qemu/qemu_cgroup.c qemu/qemu_cgroup.h \ - qemu/qemu_hostdev.c qemu/qemu_hostdev.h \ - qemu/qemu_hotplug.c qemu/qemu_hotplug.h \ - qemu/qemu_hotplugpriv.h \ - qemu/qemu_conf.c qemu/qemu_conf.h \ - qemu/qemu_process.c qemu/qemu_process.h \ - qemu/qemu_processpriv.h \ - qemu/qemu_migration.c qemu/qemu_migration.h \ - qemu/qemu_migration_cookie.c qemu/qemu_migration_cookie.h \ - qemu/qemu_monitor.c qemu/qemu_monitor.h \ - qemu/qemu_monitor_text.c \ - qemu/qemu_monitor_text.h \ - qemu/qemu_monitor_json.c \ - qemu/qemu_monitor_json.h \ - qemu/qemu_driver.c qemu/qemu_driver.h \ - qemu/qemu_interface.c qemu/qemu_interface.h \ - qemu/qemu_capspriv.h \ - qemu/qemu_security.c qemu/qemu_security.h - XENAPI_DRIVER_SOURCES =3D \ xenapi/xenapi_driver.c xenapi/xenapi_driver.h \ xenapi/xenapi_driver_private.h \ @@ -1418,41 +1393,6 @@ endif WITH_LIBXL EXTRA_DIST +=3D libxl/libxl.conf libxl/libvirtd_libxl.aug \ libxl/test_libvirtd_libxl.aug.in =20 -if WITH_QEMU -noinst_LTLIBRARIES +=3D libvirt_driver_qemu_impl.la -libvirt_driver_qemu_la_SOURCES =3D -libvirt_driver_qemu_la_LIBADD =3D libvirt_driver_qemu_impl.la -mod_LTLIBRARIES +=3D libvirt_driver_qemu.la -libvirt_driver_qemu_la_LIBADD +=3D libvirt.la ../gnulib/lib/libgnu.la -libvirt_driver_qemu_la_LDFLAGS =3D $(AM_LDFLAGS_MOD_NOUNDEF) - -libvirt_driver_qemu_impl_la_CFLAGS =3D \ - $(GNUTLS_CFLAGS) \ - $(LIBNL_CFLAGS) \ - $(SELINUX_CFLAGS) \ - $(XDR_CFLAGS) \ - -I$(srcdir)/access \ - -I$(srcdir)/conf \ - -I$(srcdir)/secret \ - $(AM_CFLAGS) -libvirt_driver_qemu_impl_la_LDFLAGS =3D $(AM_LDFLAGS) -libvirt_driver_qemu_impl_la_LIBADD =3D $(CAPNG_LIBS) \ - $(GNUTLS_LIBS) \ - $(LIBNL_LIBS) \ - $(SELINUX_LIBS) \ - $(LIBXML_LIBS) \ - $(NULL) -libvirt_driver_qemu_impl_la_SOURCES =3D $(QEMU_DRIVER_SOURCES) - -conf_DATA +=3D qemu/qemu.conf - -augeas_DATA +=3D qemu/libvirtd_qemu.aug -augeastest_DATA +=3D test_libvirtd_qemu.aug -CLEANFILES +=3D test_libvirtd_qemu.aug - -endif WITH_QEMU -EXTRA_DIST +=3D qemu/qemu.conf qemu/libvirtd_qemu.aug \ - qemu/test_libvirtd_qemu.aug.in qemu/THREADS.txt =20 =20 if WITH_LXC @@ -1920,7 +1860,6 @@ access/viraccessapichecklxc.c: $(srcdir)/rpc/gendispa= tch.pl \ EXTRA_DIST +=3D \ $(REMOTE_DRIVER_SOURCES) \ $(XEN_DRIVER_SOURCES) \ - $(QEMU_DRIVER_SOURCES) \ $(LXC_DRIVER_SOURCES) \ $(XENAPI_DRIVER_SOURCES) \ $(LIBXL_DRIVER_SOURCES) \ @@ -1955,7 +1894,6 @@ EXTRA_DIST +=3D \ check-local: check-augeas =20 .PHONY: check-augeas \ - check-augeas-qemu \ check-augeas-lxc \ check-augeas-sanlock \ check-augeas-lockd \ @@ -1964,26 +1902,14 @@ check-local: check-augeas check-augeas-libvirtd \ $(NULL) =20 -check-augeas: check-augeas-qemu check-augeas-lxc check-augeas-sanlock \ +check-augeas: $(AUGEAS_DIRS:%=3Dcheck-augeas-%) \ + check-augeas-lxc check-augeas-sanlock \ check-augeas-lockd check-augeas-virtlockd check-augeas-libxl \ check-augeas-bhyve check-augeas-virtlogd check-augeas-libvirtd =20 AUG_GENTEST =3D $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl EXTRA_DIST +=3D $(top_srcdir)/build-aux/augeas-gentest.pl =20 -if WITH_QEMU -test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in \ - $(srcdir)/qemu/qemu.conf $(AUG_GENTEST) - $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/qemu/qemu.conf $< $@ - -check-augeas-qemu: test_libvirtd_qemu.aug - $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ - '$(AUGPARSE)' -I $(srcdir)/qemu test_libvirtd_qemu.aug; \ - fi -else ! WITH_QEMU -check-augeas-qemu: -endif ! WITH_QEMU - if WITH_LXC test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in \ $(srcdir)/lxc/lxc.conf $(AUG_GENTEST) @@ -2308,14 +2234,9 @@ DTRACE2SYSTEMTAP_FLAGS =3D --with-modules =20 BUILT_SOURCES +=3D libvirt_probes.h libvirt_probes.stp libvirt_functions.s= tp =20 -if WITH_QEMU -libvirt_driver_qemu_la_LIBADD +=3D libvirt_qemu_probes.lo -nodist_libvirt_driver_qemu_la_SOURCES =3D libvirt_qemu_probes.h -BUILT_SOURCES +=3D libvirt_qemu_probes.h -endif WITH_QEMU =20 tapsetdir =3D $(datadir)/systemtap/tapset -tapset_DATA =3D libvirt_probes.stp libvirt_qemu_probes.stp libvirt_functio= ns.stp +tapset_DATA +=3D libvirt_probes.stp libvirt_functions.stp =20 %_probes.h: %_probes.d $(AM_V_GEN)$(DTRACE) -o $@ -h -s $< @@ -2352,13 +2273,10 @@ libvirt_functions.stp: $(RPC_PROBE_FILES) $(srcdir)= /rpc/gensystemtap.pl $(DTRACE2SYSTEMTAP_FLAGS) $(bindir) $(sbindir) $(libdir) $< > $@ =20 CLEANFILES +=3D libvirt_probes.h libvirt_probes.o libvirt_probes.lo \ - libvirt_qemu_probes.h libvirt_qemu_probes.o \ - libvirt_qemu_probes.lo\ - libvirt_functions.stp libvirt_probes.stp \ - libvirt_qemu_probes.stp + libvirt_functions.stp libvirt_probes.stp endif WITH_DTRACE_PROBES =20 -EXTRA_DIST +=3D libvirt_probes.d libvirt_qemu_probes.d +EXTRA_DIST +=3D libvirt_probes.d =20 libvirt_qemu_la_SOURCES =3D libvirt-qemu.c libvirt_qemu_la_LDFLAGS =3D \ @@ -3340,12 +3258,6 @@ endif WITH_LIBVIRTD if WITH_SANLOCK $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock" endif WITH_SANLOCK -if WITH_QEMU - $(MKDIR_P) -m 0751 "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu" - $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/qemu" - $(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt/qemu" - $(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/qemu" -endif WITH_QEMU if WITH_LXC $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/lxc" @@ -3395,12 +3307,6 @@ endif WITH_LIBVIRTD if WITH_SANLOCK rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock" ||: endif WITH_SANLOCK -if WITH_QEMU - rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu" ||: - rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/qemu" ||: - rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt/qemu" ||: - rmdir "$(DESTDIR)$(localstatedir)/log/libvirt/qemu" ||: -endif WITH_QEMU if WITH_LXC rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc" ||: rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/lxc" ||: diff --git a/src/qemu/Makefile.inc.am b/src/qemu/Makefile.inc.am new file mode 100644 index 0000000000..2ad062cdb5 --- /dev/null +++ b/src/qemu/Makefile.inc.am @@ -0,0 +1,148 @@ +QEMU_DRIVER_SOURCES =3D \ + qemu/qemu_agent.c \ + qemu/qemu_agent.h \ + qemu/qemu_alias.c \ + qemu/qemu_alias.h \ + qemu/qemu_block.c \ + qemu/qemu_block.h \ + qemu/qemu_blockjob.c \ + qemu/qemu_blockjob.h \ + qemu/qemu_capabilities.c \ + qemu/qemu_capabilities.h \ + qemu/qemu_command.c \ + qemu/qemu_command.h \ + qemu/qemu_parse_command.c \ + qemu/qemu_parse_command.h \ + qemu/qemu_domain.c \ + qemu/qemu_domain.h \ + qemu/qemu_domain_address.c \ + qemu/qemu_domain_address.h \ + qemu/qemu_cgroup.c \ + qemu/qemu_cgroup.h \ + qemu/qemu_hostdev.c \ + qemu/qemu_hostdev.h \ + qemu/qemu_hotplug.c \ + qemu/qemu_hotplug.h \ + qemu/qemu_hotplugpriv.h \ + qemu/qemu_conf.c \ + qemu/qemu_conf.h \ + qemu/qemu_process.c \ + qemu/qemu_process.h \ + qemu/qemu_processpriv.h \ + qemu/qemu_migration.c \ + qemu/qemu_migration.h \ + qemu/qemu_migration_cookie.c \ + qemu/qemu_migration_cookie.h \ + qemu/qemu_monitor.c \ + qemu/qemu_monitor.h \ + qemu/qemu_monitor_text.c \ + qemu/qemu_monitor_text.h \ + qemu/qemu_monitor_json.c \ + qemu/qemu_monitor_json.h \ + qemu/qemu_driver.c \ + qemu/qemu_driver.h \ + qemu/qemu_interface.c \ + qemu/qemu_interface.h \ + qemu/qemu_capspriv.h \ + qemu/qemu_security.c \ + qemu/qemu_security.h \ + $(NULL) + + +DRIVER_SOURCE_FILES +=3D $(QEMU_DRIVER_SOURCES) +STATEFUL_DRIVER_SOURCE_FILES +=3D $(QEMU_DRIVER_SOURCES) +EXTRA_DIST +=3D $(QEMU_DRIVER_SOURCES) + +if WITH_QEMU +noinst_LTLIBRARIES +=3D libvirt_driver_qemu_impl.la +libvirt_driver_qemu_la_SOURCES =3D +libvirt_driver_qemu_la_LIBADD =3D \ + libvirt_driver_qemu_impl.la \ + libvirt.la \ + ../gnulib/lib/libgnu.la \ + $(NULL) +mod_LTLIBRARIES +=3D libvirt_driver_qemu.la +libvirt_driver_qemu_la_LDFLAGS =3D $(AM_LDFLAGS_MOD_NOUNDEF) + +libvirt_driver_qemu_impl_la_CFLAGS =3D \ + $(GNUTLS_CFLAGS) \ + $(LIBNL_CFLAGS) \ + $(SELINUX_CFLAGS) \ + $(XDR_CFLAGS) \ + -I$(srcdir)/access \ + -I$(srcdir)/conf \ + -I$(srcdir)/secret \ + $(AM_CFLAGS) \ + $(NULL) +libvirt_driver_qemu_impl_la_LDFLAGS =3D $(AM_LDFLAGS) +libvirt_driver_qemu_impl_la_LIBADD =3D \ + $(CAPNG_LIBS) \ + $(GNUTLS_LIBS) \ + $(LIBNL_LIBS) \ + $(SELINUX_LIBS) \ + $(LIBXML_LIBS) \ + $(NULL) +libvirt_driver_qemu_impl_la_SOURCES =3D $(QEMU_DRIVER_SOURCES) + +if WITH_DTRACE_PROBES +libvirt_driver_qemu_la_LIBADD +=3D libvirt_qemu_probes.lo +nodist_libvirt_driver_qemu_la_SOURCES =3D libvirt_qemu_probes.h +BUILT_SOURCES +=3D libvirt_qemu_probes.h + +tapset_DATA +=3D libvirt_qemu_probes.stp + +CLEANFILES +=3D \ + libvirt_qemu_probes.h \ + libvirt_qemu_probes.o \ + libvirt_qemu_probes.lo \ + libvirt_qemu_probes.stp \ + $(NULL) + +endif WITH_DTRACE_PROBES + +conf_DATA +=3D qemu/qemu.conf + +augeas_DATA +=3D qemu/libvirtd_qemu.aug +augeastest_DATA +=3D test_libvirtd_qemu.aug +CLEANFILES +=3D test_libvirtd_qemu.aug + +AUGEAS_DIRS +=3D qemu + +test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in \ + $(srcdir)/qemu/qemu.conf $(AUG_GENTEST) + $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/qemu/qemu.conf $< $@ + +check-augeas-qemu: test_libvirtd_qemu.aug + $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ + '$(AUGPARSE)' -I $(srcdir)/qemu test_libvirtd_qemu.aug; \ + fi + +INSTALL_DATA_DIRS +=3D qemu + +install-data-qemu: + $(MKDIR_P) -m 0751 "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu" + $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/qemu" + $(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt/qemu" + $(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/qemu" + +uninstall-data-qemu: + rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu" ||: + rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/qemu" ||: + rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt/qemu" ||: + rmdir "$(DESTDIR)$(localstatedir)/log/libvirt/qemu" ||: + +endif WITH_QEMU + +.PHONY: \ + check-augeas-qemu \ + install-data-qemu \ + uninstall-data-qemu \ + $(NULL) + +EXTRA_DIST +=3D \ + qemu/qemu.conf \ + qemu/libvirtd_qemu.aug \ + qemu/test_libvirtd_qemu.aug.in \ + qemu/THREADS.txt \ + libvirt_qemu_probes.d \ + $(NULL) --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list