[PATCH 4/4] build: Use $(LN_S) safely

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

 



The autoconf documentation recommends to always use this
construct when creating symbolic links with $(LN_S) to avoid
unexpected behavior.
---
 src/Makefile.am   | 4 ++--
 tools/Makefile.am | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 0168177..c639e37 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3078,8 +3078,8 @@ if WITH_NETWORK
 	    cp $(DESTDIR)$(confdir)/qemu/networks/default.xml.t \
 	      $(DESTDIR)$(confdir)/qemu/networks/default.xml && \
 	    rm $(DESTDIR)$(confdir)/qemu/networks/default.xml.t; }
-	$(LN_S) -f ../default.xml \
-	    $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml
+	( cd $(DESTDIR)$(confdir)/qemu/networks/autostart && \
+	    $(LN_S) -f ../default.xml default.xml )
 endif WITH_NETWORK
 
 uninstall-local:: uninstall-init uninstall-systemd
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 7f2c0fc..e963b91 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -423,8 +423,8 @@ LIBVIRT_NSS_SYMBOL_FILE = \
 NSS_SO_VER = 1
 
 install-exec-hook:
-	cd $(DESTDIR)$(libdir) && \
-	  $(LN_S) -f libnss_libvirt.so.$(NSS_SO_VER) nss_libvirt.so.$(NSS_SO_VER)
+	( cd $(DESTDIR)$(libdir) && \
+	  $(LN_S) -f libnss_libvirt.so.$(NSS_SO_VER) nss_libvirt.so.$(NSS_SO_VER) )
 
 uninstall-local:
 	-rm -f $(DESTDIR)$(libdir)/nss_libvirt.so.$(NSS_SO_VER)
-- 
2.5.5

--
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]