mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
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: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
5cdd5d380b
commit
6d3ac4f722
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user