From nobody Sun Feb 8 11:07:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594894816; cv=none; d=zohomail.com; s=zohoarc; b=PqsirHIC0wPenKWuyBluxKFy6gJb7TvRglnDsg9B0ImkrnnO/614r+ghNLnRbsete4dYNf90wVWvuDRsg+lRYFGk6AUDI5HI3Hrx4norT0yyhoQy3yivf3bBNW7NKH2uRc/JiFe3ytIWclq94rdKWShxcOYSBr7BWTDqcMGTihs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594894816; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aqn2g3EcHj5wmj88RgMDC58L6Aose8oZF3899jmfl98=; b=nURDzbbw+9TsI9w8XyTnOMuvEVT/m8Z3MdmJE8VxAF81zLOWrvNrMYTtsxk0jxozlVH8el6Kz3gi4CHwvDcqtevlKZvmLbnf6qySKWtt1NzWpd5Fo/mKPB+e74PX69zvEywZNdDLGE19YG90fsEwazQxeyCQLuQuLjzuWMlfPdE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1594894816663262.9130567961; Thu, 16 Jul 2020 03:20:16 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-104-cBFghd-aNPG4wZsKSgvcgA-1; Thu, 16 Jul 2020 06:11:09 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9DA69100AA29; Thu, 16 Jul 2020 10:11:03 +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 8070E7848E; Thu, 16 Jul 2020 10:11:03 +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 4B210A371F; Thu, 16 Jul 2020 10:11:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GA7Itr020583 for ; Thu, 16 Jul 2020 06:07:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 419EB2DE6D; Thu, 16 Jul 2020 10:07:18 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id B124C2B6DB for ; Thu, 16 Jul 2020 10:07:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594894815; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=aqn2g3EcHj5wmj88RgMDC58L6Aose8oZF3899jmfl98=; b=b6H0LnH3ueccZgQcj1CvmEoWW49gJX3hM6O/QFvrw9/lH0cjibGKnoTMu7qD6QsfbWoHr5 nfcdn1k3HWuG7SQrrr3AFOTM7LA9SIxHZ4BKRFtovXQdBwNj6LeWeybGXEio1yC+nlxYMy PoszhoGJijEtYbNX34IMGfzE71UWai8= X-MC-Unique: cBFghd-aNPG4wZsKSgvcgA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 314/351] meson: examples: build and install example files Date: Thu, 16 Jul 2020 11:59:10 +0200 Message-Id: <2711c21b8b9528dcd830c223b0fa7eb10dd6f1db.1594891445.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- Makefile.am | 2 +- configure.ac | 3 +- examples/Makefile.am | 127 ------------------------------- examples/c/admin/meson.build | 27 +++++++ examples/c/domain/meson.build | 24 ++++++ examples/c/meson.build | 3 + examples/c/misc/meson.build | 22 ++++++ examples/meson.build | 7 ++ examples/polkit/meson.build | 1 + examples/sh/meson.build | 1 + examples/systemtap/meson.build | 9 +++ examples/xml/meson.build | 2 + examples/xml/storage/meson.build | 15 ++++ examples/xml/test/meson.build | 14 ++++ meson.build | 2 + 15 files changed, 129 insertions(+), 130 deletions(-) delete mode 100644 examples/Makefile.am create mode 100644 examples/c/admin/meson.build create mode 100644 examples/c/domain/meson.build create mode 100644 examples/c/meson.build create mode 100644 examples/c/misc/meson.build create mode 100644 examples/meson.build create mode 100644 examples/polkit/meson.build create mode 100644 examples/sh/meson.build create mode 100644 examples/systemtap/meson.build create mode 100644 examples/xml/meson.build create mode 100644 examples/xml/storage/meson.build create mode 100644 examples/xml/test/meson.build diff --git a/Makefile.am b/Makefile.am index 549ade3db20..4b3abc82728 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,7 @@ DISTCHECK_CONFIGURE_FLAGS =3D --enable-werror =20 SUBDIRS =3D . docs \ - po examples + po =20 XZ_OPT ?=3D -v -T0 export XZ_OPT diff --git a/configure.ac b/configure.ac index 78676d73d2b..4f7ad909468 100644 --- a/configure.ac +++ b/configure.ac @@ -114,6 +114,5 @@ AC_CONFIG_FILES([\ libvirt-lxc.pc \ libvirt-admin.pc \ libvirt.spec mingw-libvirt.spec \ - po/Makefile \ - examples/Makefile]) + po/Makefile]) AC_OUTPUT diff --git a/examples/Makefile.am b/examples/Makefile.am deleted file mode 100644 index 15ff897cf1f..00000000000 --- a/examples/Makefile.am +++ /dev/null @@ -1,127 +0,0 @@ -## Process this file with automake to produce Makefile.in - -## Copyright (C) 2005-2016 Red Hat, Inc. -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library. If not, see -## . - -ADMIN_EXAMPLES =3D \ - $(wildcard $(srcdir)/c/admin/*.c) \ - $(NULL) - -DOMAIN_EXAMPLES =3D \ - $(wildcard $(srcdir)/c/domain/*.c) \ - $(NULL) - -MISC_EXAMPLES =3D \ - $(wildcard $(srcdir)/c/misc/*.c) \ - $(NULL) - -POLKIT_EXAMPLES =3D \ - $(wildcard $(srcdir)/polkit/*.rules) \ - $(NULL) - -SH_EXAMPLES =3D \ - $(wildcard $(srcdir)/sh/*) \ - $(NULL) - -STORAGE_XML_EXAMPLES =3D \ - $(wildcard $(srcdir)/xml/storage/*.xml) \ - $(NULL) - -SYSTEMTAP_EXAMPLES =3D \ - $(wildcard $(srcdir)/systemtap/*.stp) \ - $(NULL) - -TEST_XML_EXAMPLES =3D \ - $(wildcard $(srcdir)/xml/test/*.xml) \ - $(NULL) - -AM_CPPFLAGS =3D \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - $(NULL) - -AM_CFLAGS =3D \ - $(WARN_CFLAGS) \ - $(NULL) - -AM_LDFLAGS =3D \ - $(STATIC_BINARIES) \ - $(NULL) - -LDADD =3D \ - $(top_builddir)/src/libvirt.la \ - $(top_builddir)/src/libvirt-admin.la \ - $(NULL) - -noinst_PROGRAMS =3D \ - c/admin/client_close \ - c/admin/client_info \ - c/admin/client_limits \ - c/admin/list_clients \ - c/admin/list_servers \ - c/admin/logging \ - c/admin/threadpool_params \ - c/domain/dommigrate \ - c/domain/domtop \ - c/domain/info1 \ - c/domain/rename \ - c/domain/suspend \ - c/misc/event-test \ - c/misc/hellolibvirt \ - c/misc/openauth \ - $(NULL) - -c_admin_client_close_SOURCES =3D c/admin/client_close.c -c_admin_client_info_SOURCES =3D c/admin/client_info.c -c_admin_client_limits_SOURCES =3D c/admin/client_limits.c -c_admin_list_clients_SOURCES =3D c/admin/list_clients.c -c_admin_list_servers_SOURCES =3D c/admin/list_servers.c -c_admin_logging_SOURCES =3D c/admin/logging.c -c_admin_threadpool_params_SOURCES =3D c/admin/threadpool_params.c -c_domain_dommigrate_SOURCES =3D c/domain/dommigrate.c -c_domain_domtop_SOURCES =3D c/domain/domtop.c -c_domain_info1_SOURCES =3D c/domain/info1.c -c_domain_rename_SOURCES =3D c/domain/rename.c -c_domain_suspend_SOURCES =3D c/domain/suspend.c -c_misc_event_test_SOURCES =3D c/misc/event-test.c -c_misc_hellolibvirt_SOURCES =3D c/misc/hellolibvirt.c -c_misc_openauth_SOURCES =3D c/misc/openauth.c - -examplesdir =3D $(docdir)/examples - -adminexamplesdir =3D $(examplesdir)/c/admin -adminexamples_DATA =3D $(ADMIN_EXAMPLES) - -domainexamplesdir =3D $(examplesdir)/c/domain -domainexamples_DATA =3D $(DOMAIN_EXAMPLES) - -miscexamplesdir =3D $(examplesdir)/c/misc -miscexamples_DATA =3D $(MISC_EXAMPLES) - -polkitexamplesdir =3D $(examplesdir)/polkit -polkitexamples_DATA =3D $(POLKIT_EXAMPLES) - -shexamplesdir =3D $(examplesdir)/sh -shexamples_DATA =3D $(SH_EXAMPLES) - -storagexmlexamplesdir =3D $(examplesdir)/xml/storage -storagexmlexamples_DATA =3D $(STORAGE_XML_EXAMPLES) - -systemtapexamplesdir =3D $(examplesdir)/systemtap -systemtapexamples_DATA =3D $(SYSTEMTAP_EXAMPLES) - -testxmlexamplesdir =3D $(examplesdir)/xml/test -testxmlexamples_DATA =3D $(TEST_XML_EXAMPLES) diff --git a/examples/c/admin/meson.build b/examples/c/admin/meson.build new file mode 100644 index 00000000000..094408a63c2 --- /dev/null +++ b/examples/c/admin/meson.build @@ -0,0 +1,27 @@ +example_admin_files =3D [ + 'client_close', + 'client_info', + 'client_limits', + 'list_clients', + 'list_servers', + 'logging', + 'threadpool_params', +] + +foreach name : example_admin_files + source_file =3D '@0@.c'.format(name) + executable( + name, + [ + source_file, + ], + include_directories: [ + libvirt_inc, + ], + link_with: [ + libvirt_lib, + libvirt_admin_lib, + ], + ) + install_data(source_file, install_dir: example_dir / 'c' / 'admin') +endforeach diff --git a/examples/c/domain/meson.build b/examples/c/domain/meson.build new file mode 100644 index 00000000000..51cd03afc85 --- /dev/null +++ b/examples/c/domain/meson.build @@ -0,0 +1,24 @@ +example_domain_files =3D [ + 'dommigrate', + 'domtop', + 'info1', + 'rename', + 'suspend', +] + +foreach name : example_domain_files + source_file =3D '@0@.c'.format(name) + executable( + name, + [ + source_file, + ], + include_directories: [ + libvirt_inc, + ], + link_with: [ + libvirt_lib, + ], + ) + install_data(source_file, install_dir: example_dir / 'c' / 'domain') +endforeach diff --git a/examples/c/meson.build b/examples/c/meson.build new file mode 100644 index 00000000000..727e4caafaa --- /dev/null +++ b/examples/c/meson.build @@ -0,0 +1,3 @@ +subdir('admin') +subdir('domain') +subdir('misc') diff --git a/examples/c/misc/meson.build b/examples/c/misc/meson.build new file mode 100644 index 00000000000..b106467912f --- /dev/null +++ b/examples/c/misc/meson.build @@ -0,0 +1,22 @@ +example_misc_files =3D [ + 'event-test', + 'hellolibvirt', + 'openauth', +] + +foreach name : example_misc_files + source_file =3D '@0@.c'.format(name) + executable( + name, + [ + source_file, + ], + include_directories: [ + libvirt_inc, + ], + link_with: [ + libvirt_lib, + ], + ) + install_data(source_file, install_dir: example_dir / 'c' / 'misc') +endforeach diff --git a/examples/meson.build b/examples/meson.build new file mode 100644 index 00000000000..a57820aaed5 --- /dev/null +++ b/examples/meson.build @@ -0,0 +1,7 @@ +example_dir =3D docdir / 'examples' + +subdir('c') +subdir('polkit') +subdir('sh') +subdir('systemtap') +subdir('xml') diff --git a/examples/polkit/meson.build b/examples/polkit/meson.build new file mode 100644 index 00000000000..d57c5a19868 --- /dev/null +++ b/examples/polkit/meson.build @@ -0,0 +1 @@ +install_data('libvirt-acl.rules', install_dir: example_dir / 'polkit') diff --git a/examples/sh/meson.build b/examples/sh/meson.build new file mode 100644 index 00000000000..0cdbe17c677 --- /dev/null +++ b/examples/sh/meson.build @@ -0,0 +1 @@ +install_data('virt-lxc-convert', install_dir: example_dir / 'sh') diff --git a/examples/systemtap/meson.build b/examples/systemtap/meson.build new file mode 100644 index 00000000000..f31187e1877 --- /dev/null +++ b/examples/systemtap/meson.build @@ -0,0 +1,9 @@ +install_data( + [ + 'rpc-monitor.stp', + 'qemu-monitor.stp', + 'lock-debug.stp', + 'events.stp', + ], + install_dir: example_dir / 'systemtap', +) diff --git a/examples/xml/meson.build b/examples/xml/meson.build new file mode 100644 index 00000000000..650d6a15d27 --- /dev/null +++ b/examples/xml/meson.build @@ -0,0 +1,2 @@ +subdir('storage') +subdir('test') diff --git a/examples/xml/storage/meson.build b/examples/xml/storage/meson.= build new file mode 100644 index 00000000000..c142bb1e08d --- /dev/null +++ b/examples/xml/storage/meson.build @@ -0,0 +1,15 @@ +install_data( + [ + 'pool-dir.xml', + 'pool-fs.xml', + 'pool-logical.xml', + 'pool-netfs.xml', + 'vol-cow.xml', + 'vol-qcow.xml', + 'vol-qcow2.xml', + 'vol-raw.xml', + 'vol-sparse.xml', + 'vol-vmdk.xml', + ], + install_dir: example_dir / 'xml' / 'storage', +) diff --git a/examples/xml/test/meson.build b/examples/xml/test/meson.build new file mode 100644 index 00000000000..89ebf03a7bc --- /dev/null +++ b/examples/xml/test/meson.build @@ -0,0 +1,14 @@ +install_data( + [ + 'testdev.xml', + 'testnodeinline.xml', + 'testdomfc4.xml', + 'testdomfv0.xml', + 'testnode.xml', + 'testnetdef.xml', + 'testvol.xml', + 'testnetpriv.xml', + 'testpool.xml', + ], + install_dir: example_dir / 'xml' / 'test', +) diff --git a/meson.build b/meson.build index 2e894df1ab2..caee54a5818 100644 --- a/meson.build +++ b/meson.build @@ -2207,6 +2207,8 @@ subdir('tools') =20 subdir('tests') =20 +subdir('examples') + =20 # generate meson-config.h file configure_file(output: 'meson-config.h', configuration: conf) --=20 2.26.2