From ed5c929777dd5f0b2efe420750540eec976d0efc Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Wed, 20 Apr 2016 19:24:22 +0200 Subject: [PATCH] build: Use $(LN_S) safely 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 016817768b..c639e37e3e 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 7f2c0fcea9..e963b9116f 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.39.5