Skip to content

Commit 2d9fcb3

Browse files
committed
vsh: create a noinstall libvirt_shell library
Instead of referencing vsh sources in all relevant client targets, create a library that the client can link against.
1 parent a73c67b commit 2d9fcb3

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

tools/Makefile.am

+20-8
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,24 @@ virt-sanlock-cleanup.8: virt-sanlock-cleanup.in $(top_srcdir)/configure.ac
129129
&& if grep 'POD ERROR' $(srcdir)/$@ ; then \
130130
rm $(srcdir)/$@; exit 1; fi
131131

132+
noinst_LTLIBRARIES = libvirt_shell.la
133+
libvirt_shell_la_CFLAGS = \
134+
$(AM_CFLAGS) \
135+
$(PIE_CFLAGS) \
136+
$(READLINE_CFLAGS) \
137+
$(LIBXML_CFLAGS) \
138+
$(NULL)
139+
libvirt_shell_la_LDFLAGS = \
140+
$(AM_LDFLAGS) \
141+
$(PIE_LDFLAGS) \
142+
$(COVERAGE_LDFLAGS) \
143+
$(NULL)
144+
libvirt_shell_la_LIBADD = \
145+
$(LIBXML_LIBS) \
146+
../gnulib/lib/libgnu.la \
147+
$(NULL)
148+
libvirt_shell_la_SOURCES = vsh.c vsh.h
149+
132150
virt_host_validate_SOURCES = \
133151
virt-host-validate.c \
134152
virt-host-validate-common.c virt-host-validate-common.h \
@@ -179,11 +197,7 @@ virt_login_shell_CFLAGS = \
179197
$(PIE_CFLAGS) \
180198
$(COVERAGE_CFLAGS)
181199

182-
virt_shell_SOURCES = \
183-
vsh.c vsh.h
184-
185200
virsh_SOURCES = \
186-
$(virt_shell_SOURCES) \
187201
virsh.c virsh.h \
188202
virsh-console.c virsh-console.h \
189203
virsh-domain.c virsh-domain.h \
@@ -209,15 +223,13 @@ virsh_LDADD = \
209223
../src/libvirt.la \
210224
../src/libvirt-lxc.la \
211225
../src/libvirt-qemu.la \
212-
../gnulib/lib/libgnu.la \
213-
$(LIBXML_LIBS) \
226+
libvirt_shell.la \
214227
$(VIRSH_LIBS)
215228
virsh_CFLAGS = \
216229
$(WARN_CFLAGS) \
217230
$(PIE_CFLAGS) \
218231
$(COVERAGE_CFLAGS) \
219-
$(LIBXML_CFLAGS) \
220-
$(READLINE_CFLAGS)
232+
$(LIBXML_CFLAGS)
221233
BUILT_SOURCES =
222234

223235
if WITH_WIN_ICON

0 commit comments

Comments
 (0)