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

Alan Coopersmith alan.coopersmith at oracle.com
Sat Dec 14 10:57:23 PST 2013


On 12/14/13 10:43 AM, Gaetan Nadon wrote:
> 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::
>

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list