[libvirt PATCH 254/351] meson: tools: build libvirt_shell.a static library

Pavel Hrdina phrdina at redhat.com
Thu Jul 16 09:58:10 UTC 2020


Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 tools/Makefile.am | 19 +------------------
 tools/meson.build | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/tools/Makefile.am b/tools/Makefile.am
index f266d3e72e7..01c24bec02d 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -64,24 +64,7 @@ virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile
 	    -e 's|[@]localstatedir@|$(localstatedir)|' < $< > $@ \
 	    || (rm $@ && exit 1) && chmod +x $@
 
-noinst_LTLIBRARIES = libvirt_shell.la
-libvirt_shell_la_CFLAGS = \
-		$(AM_CFLAGS) \
-		$(READLINE_CFLAGS) \
-		$(NULL)
-libvirt_shell_la_LDFLAGS = \
-		$(AM_LDFLAGS) \
-		$(COVERAGE_LDFLAGS) \
-		$(NULL)
-libvirt_shell_la_LIBADD = \
-		../src/libvirt.la \
-		$(LIBXML_LIBS) \
-		$(READLINE_LIBS) \
-		$(GLIB_LIBS) \
-		$(NULL)
-libvirt_shell_la_SOURCES = \
-		vsh.c vsh.h \
-		vsh-table.c vsh-table.h
+noinst_LTLIBRARIES =
 
 virt_host_validate_SOURCES = \
 		virt-host-validate.c \
diff --git a/tools/meson.build b/tools/meson.build
index 49214e5706f..3a4bd760688 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -14,3 +14,21 @@ tools_dep = declare_dependency(
   ],
   link_args: libvirt_relro + libvirt_no_indirect + libvirt_no_undefined,
 )
+
+libvirt_shell_lib = static_library(
+  'virt_shell',
+  [
+    'vsh.c',
+    'vsh-table.c',
+  ],
+  dependencies: [
+    tools_dep,
+    readline_dep,
+  ],
+  link_with: [
+    libvirt_lib,
+  ],
+  link_args: [
+    coverage_flags,
+  ],
+)
-- 
2.26.2




More information about the libvir-list mailing list