[PATCH v2 1/3] src: Define initdir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Avoid building the same path several times.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 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)
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux