mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-29 16:44:03 +00:00
Handle installation of hard and symbolic links via a seperate .mk file.
This commit is contained in:
parent
b0f06def52
commit
84f94a79a0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99256
@ -5,7 +5,8 @@ FILES= bsd.README
|
||||
FILES+= bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.files.mk
|
||||
FILES+= bsd.info.mk bsd.incs.mk bsd.init.mk
|
||||
FILES+= bsd.kern.mk bsd.kmod.mk
|
||||
FILES+= bsd.lib.mk bsd.libnames.mk bsd.man.mk bsd.nls.mk bsd.obj.mk bsd.own.mk
|
||||
FILES+= bsd.lib.mk bsd.libnames.mk bsd.links.mk bsd.man.mk bsd.nls.mk
|
||||
FILES+= bsd.obj.mk bsd.own.mk
|
||||
FILES+= bsd.port.mk bsd.port.post.mk bsd.port.pre.mk bsd.port.subdir.mk
|
||||
FILES+= bsd.prog.mk bsd.subdir.mk bsd.sys.mk
|
||||
FILES+= sys.mk
|
||||
|
@ -317,32 +317,9 @@ _libinstall:
|
||||
.endif
|
||||
.endif defined(LIB) && !empty(LIB) && !defined(INTERNALLIB)
|
||||
|
||||
realinstall:
|
||||
.if defined(LINKS) && !empty(LINKS)
|
||||
@set ${LINKS}; \
|
||||
while test $$# -ge 2; do \
|
||||
l=${DESTDIR}$$1; \
|
||||
shift; \
|
||||
t=${DESTDIR}$$1; \
|
||||
shift; \
|
||||
${ECHO} $$t -\> $$l; \
|
||||
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
|
||||
|
||||
.include <bsd.files.mk>
|
||||
.include <bsd.incs.mk>
|
||||
.include <bsd.links.mk>
|
||||
|
||||
.if !defined(NOMAN)
|
||||
realinstall: _maninstall
|
||||
|
30
share/mk/bsd.links.mk
Normal file
30
share/mk/bsd.links.mk
Normal file
@ -0,0 +1,30 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.if !target(__<bsd.init.mk>__)
|
||||
.error bsd.links.mk cannot be included directly.
|
||||
.endif
|
||||
|
||||
afterinstall: _installlinks
|
||||
_installlinks:
|
||||
.if defined(LINKS) && !empty(LINKS)
|
||||
@set ${LINKS}; \
|
||||
while test $$# -ge 2; do \
|
||||
l=${DESTDIR}$$1; \
|
||||
shift; \
|
||||
t=${DESTDIR}$$1; \
|
||||
shift; \
|
||||
${ECHO} $$t -\> $$l; \
|
||||
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
|
@ -116,30 +116,6 @@ _proginstall:
|
||||
(cd ${DESTDIR}${ORIGBINDIR}; ln -fs dm ${PROG}; \
|
||||
chown -h ${BINOWN}:${ORIGBINGRP} ${PROG})
|
||||
.endif
|
||||
|
||||
realinstall:
|
||||
.if defined(LINKS) && !empty(LINKS)
|
||||
@set ${LINKS}; \
|
||||
while test $$# -ge 2; do \
|
||||
l=${DESTDIR}$$1; \
|
||||
shift; \
|
||||
t=${DESTDIR}$$1; \
|
||||
shift; \
|
||||
${ECHO} $$t -\> $$l; \
|
||||
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
|
||||
.endif !target(realinstall)
|
||||
|
||||
.if defined(SCRIPTS) && !empty(SCRIPTS)
|
||||
@ -171,6 +147,7 @@ _SCRIPTSINS_${script:T}: ${script}
|
||||
|
||||
.include <bsd.files.mk>
|
||||
.include <bsd.incs.mk>
|
||||
.include <bsd.links.mk>
|
||||
|
||||
.if !defined(NOMAN)
|
||||
realinstall: _maninstall
|
||||
|
Loading…
Reference in New Issue
Block a user