From a5209817400151320384c34d4f573f2cf9445fd0 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Thu, 10 Jan 2019 15:06:36 +0100 Subject: [PATCH] src: Define initdir Avoid building the same path several times. Signed-off-by: Andrea Bolognani Reviewed-by: Erik Skultety --- src/Makefile.am | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index d3e8a1b572..0a8f54120d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -811,16 +811,18 @@ uninstall-logrotate: endif ! WITH_LIBVIRTD if LIBVIRT_INIT_SCRIPT_RED_HAT +initdir = $(sysconfdir)/rc.d/init.d + install-init:: $(SYSVINIT_FILES) install-sysconfig - $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d + $(MKDIR_P) $(DESTDIR)$(initdir) for f in $(SYSVINIT_FILES:%.init=%) ; \ do \ - $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/$$f; \ + $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(initdir)/$$f; \ done uninstall-init:: uninstall-sysconfig - rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(sysconfdir)/rc.d/init.d/%) - rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || : + rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(initdir)/%) + rmdir $(DESTDIR)$(initdir) || : BUILT_SOURCES += $(SYSVINIT_FILES) DISTCLEANFILES += $(SYSVINIT_FILES)