diff options
Diffstat (limited to 'mk/mkc_imp.links.mk')
-rw-r--r-- | mk/mkc_imp.links.mk | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mk/mkc_imp.links.mk b/mk/mkc_imp.links.mk new file mode 100644 index 0000000..c9f6eb3 --- /dev/null +++ b/mk/mkc_imp.links.mk @@ -0,0 +1,35 @@ +# Copyright (c) 2009-2013 by Aleksey Cheusov +# +# See LICENSE file in the distribution. +############################################################ + +.if !defined(_MKC_IMP_LINKS_MK) +_MKC_IMP_LINKS_MK := 1 + +.PHONY: linksinstall +linksinstall: + +realinstall2: linksinstall + +.if ${MKINSTALL:tl} == "yes" + +linksinstall: +.for l r in ${LINKS} + ${RM} -f ${DESTDIR}${r}; ${LN} ${DESTDIR}${l} ${DESTDIR}${r} +.endfor +.for l r in ${SYMLINKS} + ${RM} -f ${DESTDIR}${r}; ${LN_S} ${l} ${DESTDIR}${r} +.endfor + +.for l r in ${LINKS} +UNINSTALLFILES += ${DESTDIR}${r} +INSTALLDIRS += ${DESTDIR}${r:H} +.endfor + +.for l r in ${SYMLINKS} +UNINSTALLFILES += ${DESTDIR}${r} +INSTALLDIRS += ${DESTDIR}${r:H} +.endfor + +.endif # MKINSTALL=yes +.endif # _MKC_IMP_LINKS_MK |