[PATCH libXaw] Makefile: use $(LN_S) for better code portability

Gaetan Nadon memsize at videotron.ca
Sat Dec 14 10:43:29 PST 2013


Autoconf recommends using LN_S to safeguard against actual or future
portability issues.

Autoconf:
  "Symbolic links are not available on old systems; use ‘$(LN_S)’
  as a portable substitute".

AC_PROG_LN_S is brought in by AC_PROG_LIBTOOL

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 src/Makefile.am |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 55dba7b..befd850 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -84,10 +84,10 @@ if !PLATFORM_WIN32
 install-exec-hook::
 if PLATFORM_DARWIN
 	$(AM_V_at)rm -f $(DESTDIR)$(libdir)/libXaw.6. at LIBEXT@
-	$(AM_V_GEN)(cd $(DESTDIR)$(libdir) && ln -s libXaw6.6. at LIBEXT@ libXaw.6. at LIBEXT@)
+	$(AM_V_GEN)(cd $(DESTDIR)$(libdir) && $(LN_S) libXaw6.6. at LIBEXT@ libXaw.6. at LIBEXT@)
 else
 	$(AM_V_at)rm -f $(DESTDIR)$(libdir)/libXaw. at LIBEXT@.6
-	$(AM_V_GEN)(cd $(DESTDIR)$(libdir) && ln -s libXaw6. at LIBEXT@.6 libXaw. at LIBEXT@.6)
+	$(AM_V_GEN)(cd $(DESTDIR)$(libdir) && $(LN_S) libXaw6. at LIBEXT@.6 libXaw. at LIBEXT@.6)
 endif
 
 uninstall-local::
@@ -123,10 +123,10 @@ if !PLATFORM_WIN32
 install-exec-hook::
 if PLATFORM_DARWIN
 	$(AM_V_at)rm -f $(DESTDIR)$(libdir)/libXaw.7. at LIBEXT@
-	$(AM_V_GEN)(cd $(DESTDIR)$(libdir) && ln -s libXaw7.7. at LIBEXT@ libXaw.7. at LIBEXT@)
+	$(AM_V_GEN)(cd $(DESTDIR)$(libdir) && $(LN_S) libXaw7.7. at LIBEXT@ libXaw.7. at LIBEXT@)
 else
 	$(AM_V_at)rm -f $(DESTDIR)$(libdir)/libXaw. at LIBEXT@.7
-	$(AM_V_GEN)(cd $(DESTDIR)$(libdir) && ln -s libXaw7. at LIBEXT@.7 libXaw. at LIBEXT@.7)
+	$(AM_V_GEN)(cd $(DESTDIR)$(libdir) && $(LN_S) libXaw7. at LIBEXT@.7 libXaw. at LIBEXT@.7)
 endif
 
 uninstall-local::
-- 
1.7.9.5



More information about the xorg-devel mailing list