]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: tools: build virsh binary
authorPavel Hrdina <phrdina@redhat.com>
Wed, 24 Jun 2020 11:33:22 +0000 (13:33 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:27:05 +0000 (09:27 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
tools/Makefile.am
tools/meson.build

index 4e5051067ba5fbff8729d2f782ad2317b8ed2a50..b7411e046231353262eb9e590573061da1a782f4 100644 (file)
@@ -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 \
@@ -117,10 +73,6 @@ virt_admin_CFLAGS = \
                $(READLINE_CFLAGS)
 BUILT_SOURCES =
 
-if WITH_WIN_ICON
-virsh_LDADD += virsh_win_icon.$(OBJEXT)
-endif WITH_WIN_ICON
-
 install-data-local: install-systemd install-nss \
        install-bash-completion
 
index 54de68193a920e28d445e64a5e21029b2f0b7fe8..a8cd26f5c43dafada5a624a33d1570be0e72522a 100644 (file)
@@ -146,3 +146,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,
+)