2002-07-02 12:16:54 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
.if !target(__<bsd.init.mk>__)
|
|
|
|
.error bsd.links.mk cannot be included directly.
|
|
|
|
.endif
|
|
|
|
|
2015-02-13 00:16:05 +00:00
|
|
|
.if defined(NO_ROOT)
|
|
|
|
.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
|
|
|
|
TAGS+= package=${PACKAGE}
|
|
|
|
.endif
|
|
|
|
TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
|
|
|
|
.endif
|
|
|
|
|
2002-07-02 12:16:54 +00:00
|
|
|
afterinstall: _installlinks
|
2002-07-03 12:28:03 +00:00
|
|
|
.ORDER: realinstall _installlinks
|
2002-07-02 12:16:54 +00:00
|
|
|
_installlinks:
|
|
|
|
.if defined(LINKS) && !empty(LINKS)
|
|
|
|
@set ${LINKS}; \
|
|
|
|
while test $$# -ge 2; do \
|
|
|
|
l=${DESTDIR}$$1; \
|
|
|
|
shift; \
|
|
|
|
t=${DESTDIR}$$1; \
|
|
|
|
shift; \
|
|
|
|
${ECHO} $$t -\> $$l; \
|
2015-02-13 00:16:05 +00:00
|
|
|
${INSTALL_LINK} ${TAG_ARGS} $$l $$t; \
|
2002-07-02 12:16:54 +00:00
|
|
|
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; \
|
2015-02-13 00:16:05 +00:00
|
|
|
${INSTALL_SYMLINK} ${TAG_ARGS} $$l $$t; \
|
2002-07-02 12:16:54 +00:00
|
|
|
done; true
|
|
|
|
.endif
|