[libvirt] [PATCH 2/3] tools: Always compile {virsh, virt-admin}-completer.c

Michal Privoznik posted 3 patches 7 years, 4 months ago
[libvirt] [PATCH 2/3] tools: Always compile {virsh, virt-admin}-completer.c
Posted by Michal Privoznik 7 years, 4 months ago
The functions defined in these sources are referenced all over
the place, however, compiler only when building with readline.
Thus when building without it linker gets sad as it can't find
them.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 tools/Makefile.am | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/tools/Makefile.am b/tools/Makefile.am
index 48125f516..e9597cdb4 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -216,6 +216,7 @@ virt_login_shell_CFLAGS = \
 
 virsh_SOURCES = \
 		virsh.c virsh.h \
+		virsh-completer.c virsh-completer.h \
 		virsh-console.c virsh-console.h \
 		virsh-domain.c virsh-domain.h \
 		virsh-domain-monitor.c virsh-domain-monitor.h \
@@ -231,15 +232,6 @@ virsh_SOURCES = \
 		virsh-volume.c virsh-volume.h \
 		$(NULL)
 
-VIRSH_COMPLETER = \
-		virsh-completer.c virsh-completer.h
-
-if WITH_READLINE
-virsh_SOURCES += $(VIRSH_COMPLETER)
-else ! WITH_READLINE
-EXTRA_DIST += $(VIRSH_COMPLETER)
-endif ! WITH_READLINE
-
 virsh_LDFLAGS = \
 		$(AM_LDFLAGS) \
 		$(PIE_LDFLAGS) \
@@ -256,17 +248,9 @@ virsh_CFLAGS = \
 
 virt_admin_SOURCES = \
 		virt-admin.c virt-admin.h \
+		virt-admin-completer.c virt-admin-completer.h \
 		$(NULL)
 
-VIRT_ADMIN_COMPLETER = \
-		virt-admin-completer.c virt-admin-completer.h
-
-if WITH_READLINE
-virt_admin_SOURCES += $(VIRT_ADMIN_COMPLETER)
-else ! WITH_READLINE
-EXTRA_DIST += $(VIRT_ADMIN_COMPLETER)
-endif ! WITH_READLINE
-
 virt_admin_LDFLAGS = \
 		$(AM_LDFLAGS) \
 		$(COVERAGE_LDFLAGS) \
-- 
2.13.6

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/3] tools: Always compile {virsh, virt-admin}-completer.c
Posted by Erik Skultety 7 years, 3 months ago
On Sun, Jan 14, 2018 at 02:46:44PM +0100, Michal Privoznik wrote:
> The functions defined in these sources are referenced all over
> the place, however, compiler only when building with readline.
> Thus when building without it linker gets sad as it can't find
> them.
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>

Reviewed-by: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list