The virtlockd daemon scripts were lousy, when compared to their counterparts in daemon/Makefile.am. In particular, when init scripts were selected, this resulted in 'make distcheck' failing due to failure to clean up src/virtlockd.init. * src/Makefile.am (install-systemd): Fix dependencies. Use MKDIR_P. (uninstall-systemd): Remove empty directory. Use fewer processes. (install-init, install-sysconfig): Use MKDIR_P. (uninstall-init): Remove correct file, and also empty directory. (uninstall-sysconfig): Remove empty directory. (DISTCLEANFILES): Clean up trivially built sources. --- v2: restrict which files are cleaned; again tested with 'make distcheck' src/Makefile.am | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index cb9eb62..53ec9da 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1629,26 +1629,29 @@ EXTRA_DIST += locking/virtlockd.sysconf \ locking/test_libvirt_lockd.aug.in install-sysconfig: - mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig $(INSTALL_DATA) $(srcdir)/locking/virtlockd.sysconf \ $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd uninstall-sysconfig: rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd + rmdir $(DESTDIR)$(sysconfdir)/sysconfig || : EXTRA_DIST += locking/virtlockd.init.in if WITH_LIBVIRTD if LIBVIRT_INIT_SCRIPT_RED_HAT install-init:: virtlockd.init install-sysconfig - mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d $(INSTALL_SCRIPT) virtlockd.init \ $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlockd uninstall-init:: uninstall-sysconfig - rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd + rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/virtlockd + rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || : BUILT_SOURCES += virtlockd.init +DISTCLEANFILES += virtlockd.init else install-init:: uninstall-init:: @@ -1677,17 +1680,19 @@ if LIBVIRT_INIT_SCRIPT_SYSTEMD SYSTEMD_UNIT_DIR = /lib/systemd/system BUILT_SOURCES += virtlockd.service virtlockd.socket +DISTCLEANFILES += virtlockd.service virtlockd.socket -install-systemd: virtlockd.init install-sysconfig - mkdir -p $(DESTDIR)$(SYSTEMD_UNIT_DIR) +install-systemd: virtlockd.service virtlockd.socket install-sysconfig + $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) $(INSTALL_SCRIPT) virtlockd.service \ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ $(INSTALL_SCRIPT) virtlockd.socket \ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ uninstall-systemd: uninstall-sysconfig - rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.service - rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.socket + rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.service \ + $(DESTDIR)$(SYSTEMD_UNIT_DIR)/virtlockd.socket + rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || : else install-systemd: uninstall-systemd: -- 1.8.0.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list