From: Andrea Bolognani Date: Tue, 21 May 2019 12:11:57 +0000 (+0200) Subject: examples: Install nwfilters without shell scripting X-Git-Tag: v5.5.0-rc1~376 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db4529c5ee4be551ffd7b701f36bcefe5ca1ab56;p=thirdparty%2Flibvirt.git examples: Install nwfilters without shell scripting We're doing nothing more than copying files to a target directory, so we don't need any custom shell commands and can just use the standard autotools data installation support instead. Signed-off-by: Andrea Bolognani Acked-by: Michal Privoznik --- diff --git a/examples/Makefile.am b/examples/Makefile.am index 8c7f4a3d64..67d959c6a3 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -90,38 +90,23 @@ admin_client_info_SOURCES = admin/client_info.c admin_client_close_SOURCES = admin/client_close.c admin_logging_SOURCES = admin/logging.c -INSTALL_DATA_LOCAL = -UNINSTALL_LOCAL = - if WITH_NWFILTER -NWFILTER_DIR = "$(DESTDIR)$(sysconfdir)/libvirt/nwfilter" - -install-nwfilter-local: - $(MKDIR_P) "$(NWFILTER_DIR)" - for f in $(FILTERS); do \ - $(INSTALL_DATA) $$f "$(NWFILTER_DIR)"; \ - done -uninstall-nwfilter-local:: - for f in $(FILTERS); do \ - rm -f "$(NWFILTER_DIR)/`basename $$f`"; \ - done - -test -z "$(shell ls $(NWFILTER_DIR))" || rmdir $(NWFILTER_DIR) +nwfilterdir = $(sysconfdir)/libvirt/nwfilter +nwfilter_DATA = $(FILTERS) -INSTALL_DATA_LOCAL += install-nwfilter-local -UNINSTALL_LOCAL += uninstall-nwfilter-local endif WITH_NWFILTER examplesdir = $(docdir)/examples -install-data-local: $(INSTALL_DATA_LOCAL) +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: $(UNINSTALL_LOCAL) +uninstall-local: for p in $(EXAMPLES); do \ rm -f $(DESTDIR)$(examplesdir)/$${p}.c; \ done