diff options
author | Bruce Evans <bde@FreeBSD.org> | 1999-03-23 03:06:25 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 1999-03-23 03:06:25 +0000 |
commit | 2336a7ea7568a7bf01967afbe231d557801f8245 (patch) | |
tree | 9e5670635ad56ff8a7244d5a70bd15d79c5197e3 /share/mk/bsd.kmod.mk | |
parent | da69a97ff09cdce48c1a213d9ee3e40831114f15 (diff) | |
download | src-2336a7ea7568a7bf01967afbe231d557801f8245.tar.gz src-2336a7ea7568a7bf01967afbe231d557801f8245.zip |
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
Notes
Notes:
svn path=/head/; revision=44946
Diffstat (limited to 'share/mk/bsd.kmod.mk')
-rw-r--r-- | share/mk/bsd.kmod.mk | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk index c26a207bf2ad..516c64cc37b4 100644 --- a/share/mk/bsd.kmod.mk +++ b/share/mk/bsd.kmod.mk @@ -1,5 +1,5 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $Id: bsd.kmod.mk,v 1.57 1998/11/05 04:01:55 peter Exp $ +# $Id: bsd.kmod.mk,v 1.58 1998/11/11 07:40:44 peter Exp $ # # The include file <bsd.kmod.mk> handles installing Loadable Kernel Modules. # @@ -32,8 +32,6 @@ # # LINKS= /lkm/master /lkm/meister # -# LN_FLAGS Flags for ln(1) (see variable LINKS) -# # MODLOAD Command to load a kernel module [/sbin/modload] # # MODUNLOAD Command to unload a kernel module [/sbin/modunload] @@ -53,6 +51,9 @@ # Each of the targets will execute the same target in the # subdirectories. # +# SYMLINKS Same as LINKS, except it creates symlinks and the +# linked-to pathname may be relative. +# # DESTDIR, DISTDIR are set by other Makefiles (e.g. bsd.own.mk) # # @@ -279,8 +280,18 @@ realinstall: _SUBDIR 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 |