提交 6d3ac4f7 编写于 作者: A Andrea Bolognani

examples: Fix installation on Windows

We can't rely on $(noinst_PROGRAMS) retaining its original
value, so let's use a separate $(EXAMPLES) variable instead.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 5cdd5d38
......@@ -34,11 +34,32 @@ LDADD = $(STATIC_BINARIES) $(WARN_CFLAGS) \
$(top_builddir)/src/libvirt.la \
$(top_builddir)/src/libvirt-admin.la
noinst_PROGRAMS=dominfo/info1 dommigrate/dommigrate domsuspend/suspend \
domtop/domtop hellolibvirt/hellolibvirt object-events/event-test \
openauth/openauth rename/rename admin/list_servers admin/list_clients \
admin/threadpool_params admin/client_limits admin/client_info \
admin/client_close admin/logging
# List of example programs. We need to list them here instead of using
# $(noinst_PROGRAMS) directly because we want to have access to the
# unmodified list during (un)installation, but at the same time automake
# might tweak $(noinst_PROGRAMS) to eg. automatically add the .exe file
# extension when targeting Windows.
EXAMPLES = \
admin/client_close \
admin/client_info \
admin/client_limits \
admin/list_clients \
admin/list_servers \
admin/logging \
admin/threadpool_params \
dominfo/info1 \
dommigrate/dommigrate \
domsuspend/suspend \
domtop/domtop \
hellolibvirt/hellolibvirt \
object-events/event-test \
openauth/openauth \
rename/rename \
$(NULL)
noinst_PROGRAMS = \
$(EXAMPLES) \
$(NULL)
dominfo_info1_SOURCES = dominfo/info1.c
dommigrate_dommigrate_SOURCES = dommigrate/dommigrate.c
......@@ -88,13 +109,13 @@ examplesdir = $(docdir)/examples
install-data-local: $(INSTALL_DATA_LOCAL)
$(mkinstalldirs) $(DESTDIR)$(examplesdir)
for p in $(noinst_PROGRAMS); do \
for p in $(EXAMPLES); do \
d=$$(dirname $$p); \
$(mkinstalldirs) $(DESTDIR)$(examplesdir)/$$d; \
$(INSTALL_DATA) $(srcdir)/$${p}.c $(DESTDIR)$(examplesdir)/$$d/; \
done
uninstall-local: $(UNINSTALL_LOCAL)
for p in $(noinst_PROGRAMS); do \
for p in $(EXAMPLES); do \
rm -f $(DESTDIR)$(examplesdir)/$${p}.c; \
done
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册