1
2.if !target(__<bsd.init.mk>__)
3.error bsd.links.mk cannot be included directly.
4.endif
5
6.if defined(NO_ROOT)
7.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
8TAGS+=         package=${PACKAGE}
9.endif
10TAG_ARGS=      -T ${TAGS:[*]:S/ /,/g}
11.endif
12
13afterinstall: _installlinks
14.ORDER: realinstall _installlinks
15_installlinks:
16.for s t in ${LINKS}
17# On MacOS, assume case folding FS, and don't install links from foo.x to FOO.x.
18.if ${.MAKE.OS} != "Darwin" || ${s:tu} != ${t:tu}
19.if defined(LINKTAGS)
20	${INSTALL_LINK} ${TAG_ARGS:D${TAG_ARGS},${LINKTAGS}} ${DESTDIR}${s} ${DESTDIR}${t}
21.else
22	${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}${s} ${DESTDIR}${t}
23.endif
24.endif
25.endfor
26.for s t in ${SYMLINKS}
27# On MacOS, assume case folding FS, and don't install links from foo.x to FOO.x.
28.if ${.MAKE.OS} != "Darwin" || ${s:tu} != ${t:tu}
29.if defined(LINKTAGS)
30	${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},${LINKTAGS}} ${s} ${DESTDIR}${t}
31.else
32	${INSTALL_SYMLINK} ${TAG_ARGS} ${s} ${DESTDIR}${t}
33.endif
34.endif
35.endfor
36