mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
meson: examples: build and install example files
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
432aa659f7
commit
f31209fc6c
@ -21,7 +21,7 @@
|
|||||||
DISTCHECK_CONFIGURE_FLAGS = --enable-werror
|
DISTCHECK_CONFIGURE_FLAGS = --enable-werror
|
||||||
|
|
||||||
SUBDIRS = . docs \
|
SUBDIRS = . docs \
|
||||||
po examples
|
po
|
||||||
|
|
||||||
XZ_OPT ?= -v -T0
|
XZ_OPT ?= -v -T0
|
||||||
export XZ_OPT
|
export XZ_OPT
|
||||||
|
@ -114,6 +114,5 @@ AC_CONFIG_FILES([\
|
|||||||
libvirt-lxc.pc \
|
libvirt-lxc.pc \
|
||||||
libvirt-admin.pc \
|
libvirt-admin.pc \
|
||||||
libvirt.spec mingw-libvirt.spec \
|
libvirt.spec mingw-libvirt.spec \
|
||||||
po/Makefile \
|
po/Makefile])
|
||||||
examples/Makefile])
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
@ -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
|
|
||||||
## <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
ADMIN_EXAMPLES = \
|
|
||||||
$(wildcard $(srcdir)/c/admin/*.c) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
DOMAIN_EXAMPLES = \
|
|
||||||
$(wildcard $(srcdir)/c/domain/*.c) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
MISC_EXAMPLES = \
|
|
||||||
$(wildcard $(srcdir)/c/misc/*.c) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
POLKIT_EXAMPLES = \
|
|
||||||
$(wildcard $(srcdir)/polkit/*.rules) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
SH_EXAMPLES = \
|
|
||||||
$(wildcard $(srcdir)/sh/*) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
STORAGE_XML_EXAMPLES = \
|
|
||||||
$(wildcard $(srcdir)/xml/storage/*.xml) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
SYSTEMTAP_EXAMPLES = \
|
|
||||||
$(wildcard $(srcdir)/systemtap/*.stp) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
TEST_XML_EXAMPLES = \
|
|
||||||
$(wildcard $(srcdir)/xml/test/*.xml) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
|
||||||
-I$(top_builddir)/include \
|
|
||||||
-I$(top_srcdir)/include \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
AM_CFLAGS = \
|
|
||||||
$(WARN_CFLAGS) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
AM_LDFLAGS = \
|
|
||||||
$(STATIC_BINARIES) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
LDADD = \
|
|
||||||
$(top_builddir)/src/libvirt.la \
|
|
||||||
$(top_builddir)/src/libvirt-admin.la \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
noinst_PROGRAMS = \
|
|
||||||
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 = c/admin/client_close.c
|
|
||||||
c_admin_client_info_SOURCES = c/admin/client_info.c
|
|
||||||
c_admin_client_limits_SOURCES = c/admin/client_limits.c
|
|
||||||
c_admin_list_clients_SOURCES = c/admin/list_clients.c
|
|
||||||
c_admin_list_servers_SOURCES = c/admin/list_servers.c
|
|
||||||
c_admin_logging_SOURCES = c/admin/logging.c
|
|
||||||
c_admin_threadpool_params_SOURCES = c/admin/threadpool_params.c
|
|
||||||
c_domain_dommigrate_SOURCES = c/domain/dommigrate.c
|
|
||||||
c_domain_domtop_SOURCES = c/domain/domtop.c
|
|
||||||
c_domain_info1_SOURCES = c/domain/info1.c
|
|
||||||
c_domain_rename_SOURCES = c/domain/rename.c
|
|
||||||
c_domain_suspend_SOURCES = c/domain/suspend.c
|
|
||||||
c_misc_event_test_SOURCES = c/misc/event-test.c
|
|
||||||
c_misc_hellolibvirt_SOURCES = c/misc/hellolibvirt.c
|
|
||||||
c_misc_openauth_SOURCES = c/misc/openauth.c
|
|
||||||
|
|
||||||
examplesdir = $(docdir)/examples
|
|
||||||
|
|
||||||
adminexamplesdir = $(examplesdir)/c/admin
|
|
||||||
adminexamples_DATA = $(ADMIN_EXAMPLES)
|
|
||||||
|
|
||||||
domainexamplesdir = $(examplesdir)/c/domain
|
|
||||||
domainexamples_DATA = $(DOMAIN_EXAMPLES)
|
|
||||||
|
|
||||||
miscexamplesdir = $(examplesdir)/c/misc
|
|
||||||
miscexamples_DATA = $(MISC_EXAMPLES)
|
|
||||||
|
|
||||||
polkitexamplesdir = $(examplesdir)/polkit
|
|
||||||
polkitexamples_DATA = $(POLKIT_EXAMPLES)
|
|
||||||
|
|
||||||
shexamplesdir = $(examplesdir)/sh
|
|
||||||
shexamples_DATA = $(SH_EXAMPLES)
|
|
||||||
|
|
||||||
storagexmlexamplesdir = $(examplesdir)/xml/storage
|
|
||||||
storagexmlexamples_DATA = $(STORAGE_XML_EXAMPLES)
|
|
||||||
|
|
||||||
systemtapexamplesdir = $(examplesdir)/systemtap
|
|
||||||
systemtapexamples_DATA = $(SYSTEMTAP_EXAMPLES)
|
|
||||||
|
|
||||||
testxmlexamplesdir = $(examplesdir)/xml/test
|
|
||||||
testxmlexamples_DATA = $(TEST_XML_EXAMPLES)
|
|
27
examples/c/admin/meson.build
Normal file
27
examples/c/admin/meson.build
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
example_admin_files = [
|
||||||
|
'client_close',
|
||||||
|
'client_info',
|
||||||
|
'client_limits',
|
||||||
|
'list_clients',
|
||||||
|
'list_servers',
|
||||||
|
'logging',
|
||||||
|
'threadpool_params',
|
||||||
|
]
|
||||||
|
|
||||||
|
foreach name : example_admin_files
|
||||||
|
source_file = '@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
|
24
examples/c/domain/meson.build
Normal file
24
examples/c/domain/meson.build
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
example_domain_files = [
|
||||||
|
'dommigrate',
|
||||||
|
'domtop',
|
||||||
|
'info1',
|
||||||
|
'rename',
|
||||||
|
'suspend',
|
||||||
|
]
|
||||||
|
|
||||||
|
foreach name : example_domain_files
|
||||||
|
source_file = '@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
|
3
examples/c/meson.build
Normal file
3
examples/c/meson.build
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
subdir('admin')
|
||||||
|
subdir('domain')
|
||||||
|
subdir('misc')
|
22
examples/c/misc/meson.build
Normal file
22
examples/c/misc/meson.build
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
example_misc_files = [
|
||||||
|
'event-test',
|
||||||
|
'hellolibvirt',
|
||||||
|
'openauth',
|
||||||
|
]
|
||||||
|
|
||||||
|
foreach name : example_misc_files
|
||||||
|
source_file = '@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
|
7
examples/meson.build
Normal file
7
examples/meson.build
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
example_dir = docdir / 'examples'
|
||||||
|
|
||||||
|
subdir('c')
|
||||||
|
subdir('polkit')
|
||||||
|
subdir('sh')
|
||||||
|
subdir('systemtap')
|
||||||
|
subdir('xml')
|
1
examples/polkit/meson.build
Normal file
1
examples/polkit/meson.build
Normal file
@ -0,0 +1 @@
|
|||||||
|
install_data('libvirt-acl.rules', install_dir: example_dir / 'polkit')
|
1
examples/sh/meson.build
Normal file
1
examples/sh/meson.build
Normal file
@ -0,0 +1 @@
|
|||||||
|
install_data('virt-lxc-convert', install_dir: example_dir / 'sh')
|
9
examples/systemtap/meson.build
Normal file
9
examples/systemtap/meson.build
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
install_data(
|
||||||
|
[
|
||||||
|
'rpc-monitor.stp',
|
||||||
|
'qemu-monitor.stp',
|
||||||
|
'lock-debug.stp',
|
||||||
|
'events.stp',
|
||||||
|
],
|
||||||
|
install_dir: example_dir / 'systemtap',
|
||||||
|
)
|
2
examples/xml/meson.build
Normal file
2
examples/xml/meson.build
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
subdir('storage')
|
||||||
|
subdir('test')
|
15
examples/xml/storage/meson.build
Normal file
15
examples/xml/storage/meson.build
Normal file
@ -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',
|
||||||
|
)
|
14
examples/xml/test/meson.build
Normal file
14
examples/xml/test/meson.build
Normal file
@ -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',
|
||||||
|
)
|
@ -2227,6 +2227,8 @@ subdir('tools')
|
|||||||
|
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
|
||||||
|
subdir('examples')
|
||||||
|
|
||||||
|
|
||||||
# generate meson-config.h file
|
# generate meson-config.h file
|
||||||
configure_file(output: 'meson-config.h', configuration: conf)
|
configure_file(output: 'meson-config.h', configuration: conf)
|
||||||
|
Loading…
Reference in New Issue
Block a user