[libvirt PATCH 259/351] meson: tools: build virsh binary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 tools/Makefile.am | 50 +---------------------------------------------
 tools/meson.build | 51 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 49 deletions(-)

diff --git a/tools/Makefile.am b/tools/Makefile.am
index 4f4adf94382..2cf165dffdf 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -25,7 +25,7 @@ confdir = $(sysconfdir)/libvirt
 conf_DATA =
 
 bin_SCRIPTS = virt-xml-validate virt-pki-validate
-bin_PROGRAMS = virsh virt-admin
+bin_PROGRAMS = virt-admin
 libexec_SCRIPTS = libvirt-guests.sh
 
 if WITH_SANLOCK
@@ -53,50 +53,6 @@ virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile
 
 noinst_LTLIBRARIES =
 
-virsh_SOURCES = \
-		virsh.c virsh.h \
-		virsh-backup.c virsh-backup.h \
-		virsh-checkpoint.c virsh-checkpoint.h \
-		virsh-completer.c virsh-completer.h \
-		virsh-completer-domain.c virsh-completer-domain.h \
-		virsh-completer-checkpoint.c virsh-completer-checkpoint.h \
-		virsh-completer-host.c virsh-completer-host.h \
-		virsh-completer-interface.c virsh-completer-interface.h \
-		virsh-completer-network.c virsh-completer-network.h \
-		virsh-completer-nodedev.c virsh-completer-nodedev.h \
-		virsh-completer-nwfilter.c virsh-completer-nwfilter.h \
-		virsh-completer-pool.c virsh-completer-pool.h \
-		virsh-completer-secret.c virsh-completer-secret.h \
-		virsh-completer-snapshot.c virsh-completer-snapshot.h \
-		virsh-completer-volume.c virsh-completer-volume.h \
-		virsh-console.c virsh-console.h \
-		virsh-domain.c virsh-domain.h \
-		virsh-domain-monitor.c virsh-domain-monitor.h \
-		virsh-host.c virsh-host.h \
-		virsh-interface.c virsh-interface.h \
-		virsh-network.c virsh-network.h \
-		virsh-nodedev.c virsh-nodedev.h \
-		virsh-nwfilter.c virsh-nwfilter.h \
-		virsh-pool.c virsh-pool.h \
-		virsh-secret.c virsh-secret.h \
-		virsh-snapshot.c virsh-snapshot.h \
-		virsh-util.c virsh-util.h \
-		virsh-volume.c virsh-volume.h \
-		$(NULL)
-
-virsh_LDFLAGS = \
-		$(AM_LDFLAGS) \
-		$(COVERAGE_LDFLAGS) \
-		$(NULL)
-virsh_LDADD = \
-		$(STATIC_BINARIES) \
-		../src/libvirt-lxc.la \
-		../src/libvirt-qemu.la \
-		libvirt_shell.la
-virsh_CFLAGS = \
-		$(AM_CFLAGS) \
-		$(READLINE_CFLAGS)
-
 virt_admin_SOURCES = \
 		virt-admin.c virt-admin.h \
 		virt-admin-completer.c virt-admin-completer.h \
@@ -116,10 +72,6 @@ virt_admin_CFLAGS = \
 		$(AM_CFLAGS) \
 		$(READLINE_CFLAGS)
 
-if WITH_WIN_ICON
-virsh_LDADD += virsh_win_icon.$(OBJEXT)
-endif WITH_WIN_ICON
-
 install-data-local: install-systemd install-nss \
 	install-bash-completion
 
diff --git a/tools/meson.build b/tools/meson.build
index c110cfcf177..20523b400bd 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -142,3 +142,54 @@ if host_machine.system() == 'windows'
 else
   virsh_icon_res = []
 endif
+
+executable(
+  'virsh',
+  [
+    'virsh.c',
+    'virsh-backup.c',
+    'virsh-checkpoint.c',
+    'virsh-completer.c',
+    'virsh-completer-domain.c',
+    'virsh-completer-checkpoint.c',
+    'virsh-completer-host.c',
+    'virsh-completer-interface.c',
+    'virsh-completer-network.c',
+    'virsh-completer-nodedev.c',
+    'virsh-completer-nwfilter.c',
+    'virsh-completer-pool.c',
+    'virsh-completer-secret.c',
+    'virsh-completer-snapshot.c',
+    'virsh-completer-volume.c',
+    'virsh-console.c',
+    'virsh-domain.c',
+    'virsh-domain-monitor.c',
+    'virsh-host.c',
+    'virsh-interface.c',
+    'virsh-network.c',
+    'virsh-nodedev.c',
+    'virsh-nwfilter.c',
+    'virsh-pool.c',
+    'virsh-secret.c',
+    'virsh-snapshot.c',
+    'virsh-util.c',
+    'virsh-volume.c',
+    virsh_icon_res,
+  ],
+  dependencies: [
+    tools_dep,
+    readline_dep,
+    thread_dep,
+  ],
+  link_args: [
+    coverage_flags,
+  ],
+  link_with: [
+    libvirt_lxc_lib,
+    libvirt_qemu_lib,
+    libvirt_shell_lib,
+  ],
+  install: true,
+  install_dir: bindir,
+  install_rpath: libdir,
+)
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux