summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.lib.mk
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-03-23 03:06:25 +0000
committerbde <bde@FreeBSD.org>1999-03-23 03:06:25 +0000
commit9c2168a7db110eba1a53fc1ee5abfd924c688984 (patch)
tree9d514dc5aed0d26619743b28bcefab6e86bbf54c /share/mk/bsd.lib.mk
parent787e89e027d176b10b17855470618da96b435fd9 (diff)
downloadFreeBSD-src-9c2168a7db110eba1a53fc1ee5abfd924c688984.zip
FreeBSD-src-9c2168a7db110eba1a53fc1ee5abfd924c688984.tar.gz
Removed all traces of LN_FLAGS. It was only used to produce a link
/usr/sbin/sysctl -> ${DESTDIR}/sbin/sysctl in some versions of 2.2, and this link was broken if DESTDIR was set. Added a SYMLINKS macro. This works the same as LINKS, except it creates symlinks and the linked-to pathname may be relative. This is more flexible than LN_FLAGS, since it supports installing symlinks independently of hard links. Use `ln -f[s] ...' instead of `rm -f ...; ln [-s] ...' for LINKS and SYMLINKS. This is equivalent if the target is neither a directory nor a symlink to a directory. PR: 8279
Diffstat (limited to 'share/mk/bsd.lib.mk')
-rw-r--r--share/mk/bsd.lib.mk18
1 files changed, 14 insertions, 4 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index aea0ff2..bb33b55 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -1,5 +1,5 @@
# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
-# $Id: bsd.lib.mk,v 1.84 1999/01/20 21:42:40 jdp Exp $
+# $Id: bsd.lib.mk,v 1.85 1999/01/22 12:41:26 jdp Exp $
#
.if !target(__initialized__)
@@ -280,7 +280,7 @@ realinstall: beforeinstall
${INSTALLFLAGS} ${SHLINSTALLFLAGS} \
${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}
.if defined(SHLIB_LINK)
- ln ${LN_FLAGS} -sf ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}/${SHLIB_LINK}
+ ln -sf ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}/${SHLIB_LINK}
.endif
.endif
.if defined(INSTALL_PIC_ARCHIVE)
@@ -295,8 +295,18 @@ realinstall: beforeinstall
t=${DESTDIR}$$1; \
shift; \
${ECHO} $$t -\> $$l; \
- rm -f $$t; \
- ln ${LN_FLAGS} $$l $$t; \
+ ln -f $$l $$t; \
+ done; true
+.endif
+.if defined(SYMLINKS) && !empty(SYMLINKS)
+ @set ${SYMLINKS}; \
+ while test $$# -ge 2; do \
+ l=$$1; \
+ shift; \
+ t=${DESTDIR}$$1; \
+ shift; \
+ ${ECHO} $$t -\> $$l; \
+ ln -fs $$l $$t; \
done; true
.endif
OpenPOWER on IntegriCloud