Refined 48959daf724bb10802ca489654035f69e701efc0 by setting up a
authorDavid Levine <levinedl@acm.org>
Thu, 21 Jun 2012 00:19:31 +0000 (19:19 -0500)
committerDavid Levine <levinedl@acm.org>
Thu, 21 Jun 2012 00:19:31 +0000 (19:19 -0500)
LN variable in the Makefile that can be used to override the
link command at install time.  For example, on Cygwin, LN will be
configured to cp.  If installing on an NTFS filesystem, the user
could install with make LN=ln to use ln instead of cp.

Makefile.am
configure.ac

index 31e710995051ae2e2f76242724406d434a74ae82..3f3410885f3c99d70a2857e472a572cc7ee9b736 100644 (file)
@@ -414,6 +414,12 @@ etc/sendfiles: $(srcdir)/etc/sendfiles.in Makefile
        rm -f $@
        $(SED) -e 's,%libdir%,$(libdir),' < $(srcdir)/etc/sendfiles.in > $@
 
+##
+## Use configure to set up default LN, but through a make variable so
+## that it can be overridden at install time.
+##
+LN = @LN@
+
 ##
 ## This rule gets called at "make install" time; we use it to create links
 ## between different programs.
@@ -426,13 +432,13 @@ install-exec-hook:
        rm -f $(DESTDIR)$(bindir)/unseen$(EXEEXT)
        rm -f $(DESTDIR)$(bindir)/prev$(EXEEXT)
        rm -f $(DESTDIR)$(bindir)/next$(EXEEXT)
-       @LINK_FILE@ $(DESTDIR)$(bindir)/flist$(EXEEXT) $(DESTDIR)$(bindir)/flists$(EXEEXT)
-       @LINK_FILE@ $(DESTDIR)$(bindir)/folder$(EXEEXT) $(DESTDIR)$(bindir)/folders$(EXEEXT)
-       @LINK_FILE@ $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fnext$(EXEEXT)
-       @LINK_FILE@ $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fprev$(EXEEXT)
-       @LINK_FILE@ $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/unseen$(EXEEXT)
-       @LINK_FILE@ $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/prev$(EXEEXT)
-       @LINK_FILE@ $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/next$(EXEEXT)
+       $(LN) $(DESTDIR)$(bindir)/flist$(EXEEXT) $(DESTDIR)$(bindir)/flists$(EXEEXT)
+       $(LN) $(DESTDIR)$(bindir)/folder$(EXEEXT) $(DESTDIR)$(bindir)/folders$(EXEEXT)
+       $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fnext$(EXEEXT)
+       $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fprev$(EXEEXT)
+       $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/unseen$(EXEEXT)
+       $(LN) $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/prev$(EXEEXT)
+       $(LN) $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/next$(EXEEXT)
        if test x$(SETGID_MAIL) != x; then \
                chgrp $(MAIL_SPOOL_GRP) $(DESTDIR)$(bindir)/inc$(EXEEXT) && \
                chmod 2755 $(DESTDIR)$(bindir)/inc$(EXEEXT); \
index 8979fdef0de14fcb3e7ee8d4b71e6076b4117869..036fb64a3af797d44a24405ce4dc12ada9f733e6 100644 (file)
@@ -350,12 +350,12 @@ dnl then use `vi' as the default.
 AS_IF([test -z "$editorpath"], [editorpath="$vipath"])
 AC_SUBST([editorpath])dnl
 
-dnl Cygwin FAT filesystems do not support hard links.  So use cp instead,
-dnl even if running on an NTFS or other filesystem.
+dnl Cygwin FAT filesystems do not support hard links.  So default to
+dnl cp instead, even if running on an NTFS or other filesystem.
 AS_CASE(["$host_os"],
-  [cygwin*],[LINK_FILE=cp],
-  [LINK_FILE=ln])
-AC_SUBST([LINK_FILE])
+  [cygwin*],[LN=cp],
+  [LN=ln])
+AC_SUBST([LN])
 
 dnl ----------------------------------------------------------
 dnl FIND MAIL SPOOL AND SEE IF WE NEED TO MAKE inc SETGID MAIL