mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 02:25:18 +00:00
examples: Rework C examples installation
Now that all C examples are neatly sorted into only three categories, getting rid of our custom installation machinery and replacing it with the standard autotools mechanism finally becomes feasible. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Acked-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
4ebefac793
commit
d56fc3c158
@ -18,6 +18,18 @@
|
|||||||
|
|
||||||
FILTERS = $(wildcard $(srcdir)/xml/nwfilter/*.xml)
|
FILTERS = $(wildcard $(srcdir)/xml/nwfilter/*.xml)
|
||||||
|
|
||||||
|
ADMIN_EXAMPLES = \
|
||||||
|
$(wildcard $(srcdir)/admin/*.c) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
DOMAIN_EXAMPLES = \
|
||||||
|
$(wildcard $(srcdir)/domain/*.c) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
MISC_EXAMPLES = \
|
||||||
|
$(wildcard $(srcdir)/misc/*.c) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
POLKIT_EXAMPLES = \
|
POLKIT_EXAMPLES = \
|
||||||
$(wildcard $(srcdir)/polkit/*.rules) \
|
$(wildcard $(srcdir)/polkit/*.rules) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
@ -65,12 +77,7 @@ LDADD = \
|
|||||||
$(top_builddir)/src/libvirt-admin.la \
|
$(top_builddir)/src/libvirt-admin.la \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
# List of example programs. We need to list them here instead of using
|
noinst_PROGRAMS = \
|
||||||
# $(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_close \
|
||||||
admin/client_info \
|
admin/client_info \
|
||||||
admin/client_limits \
|
admin/client_limits \
|
||||||
@ -88,10 +95,6 @@ EXAMPLES = \
|
|||||||
misc/openauth \
|
misc/openauth \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
noinst_PROGRAMS = \
|
|
||||||
$(EXAMPLES) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
admin_client_close_SOURCES = admin/client_close.c
|
admin_client_close_SOURCES = admin/client_close.c
|
||||||
admin_client_info_SOURCES = admin/client_info.c
|
admin_client_info_SOURCES = admin/client_info.c
|
||||||
admin_client_limits_SOURCES = admin/client_limits.c
|
admin_client_limits_SOURCES = admin/client_limits.c
|
||||||
@ -117,6 +120,15 @@ endif WITH_NWFILTER
|
|||||||
|
|
||||||
examplesdir = $(docdir)/examples
|
examplesdir = $(docdir)/examples
|
||||||
|
|
||||||
|
adminexamplesdir = $(examplesdir)/admin
|
||||||
|
adminexamples_DATA = $(ADMIN_EXAMPLES)
|
||||||
|
|
||||||
|
domainexamplesdir = $(examplesdir)/domain
|
||||||
|
domainexamples_DATA = $(DOMAIN_EXAMPLES)
|
||||||
|
|
||||||
|
miscexamplesdir = $(examplesdir)/misc
|
||||||
|
miscexamples_DATA = $(MISC_EXAMPLES)
|
||||||
|
|
||||||
polkitexamplesdir = $(examplesdir)/polkit
|
polkitexamplesdir = $(examplesdir)/polkit
|
||||||
polkitexamples_DATA = $(POLKIT_EXAMPLES)
|
polkitexamples_DATA = $(POLKIT_EXAMPLES)
|
||||||
|
|
||||||
@ -131,15 +143,3 @@ systemtapexamples_DATA = $(SYSTEMTAP_EXAMPLES)
|
|||||||
|
|
||||||
testxmlexamplesdir = $(examplesdir)/xml/test
|
testxmlexamplesdir = $(examplesdir)/xml/test
|
||||||
testxmlexamples_DATA = $(TEST_XML_EXAMPLES)
|
testxmlexamples_DATA = $(TEST_XML_EXAMPLES)
|
||||||
|
|
||||||
install-data-local:
|
|
||||||
for p in $(EXAMPLES); do \
|
|
||||||
d=$$(dirname $$p); \
|
|
||||||
$(mkinstalldirs) $(DESTDIR)$(examplesdir)/$$d; \
|
|
||||||
$(INSTALL_DATA) $(srcdir)/$${p}.c $(DESTDIR)$(examplesdir)/$$d/; \
|
|
||||||
done
|
|
||||||
|
|
||||||
uninstall-local:
|
|
||||||
for p in $(EXAMPLES); do \
|
|
||||||
rm -f $(DESTDIR)$(examplesdir)/$${p}.c; \
|
|
||||||
done
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user