freebsd-dev/share/mk/bsd.links.mk
Baptiste Daroussin 08d4b586d8 Symplify links installation by using multi variable for loop
Using multi variable for loop not only simplify the code, it also ensures that
the LINKS and SYMLINKS input have the right number of words

Differential Revision:	https://reviews.freebsd.org/D2069
Reviewed by:	imp
2015-03-15 21:50:58 +00:00

18 lines
336 B
Makefile

# $FreeBSD$
.if !target(__<bsd.init.mk>__)
.error bsd.links.mk cannot be included directly.
.endif
afterinstall: _installlinks
.ORDER: realinstall _installlinks
_installlinks:
.for s t in ${LINKS}
@${ECHO} "$t -> $s" ;\
${INSTALL_LINK} $s $t
.endfor
.for s t in ${SYMLINKS}
@${ECHO} "$t -> $s" ;\
${INSTALL_SYMLINK} $s $t
.endfor