/share/mk/bsd.links.mk
https://bitbucket.org/freebsd/freebsd-head/ · Makefile · 31 lines · 28 code · 2 blank · 1 comment · 4 complexity · d767e1f9864a490d60208ec293426cea MD5 · raw file
- # $FreeBSD$
- .if !target(__<bsd.init.mk>__)
- .error bsd.links.mk cannot be included directly.
- .endif
- afterinstall: _installlinks
- .ORDER: realinstall _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