1 # $NetBSD: bsd.links.mk,v 1.34 2009/04/10 16:16:12 apb Exp $
13 LINKSMODE?
= ${NONBINMODE}
16 ${_MKSHMSG_INSTALL} ${.TARGET
}; \
17 ${_MKSHECHO} "${INSTALL_LINK} \
18 -o ${LINKSOWN_${.ALLSRC:T}:U${LINKSOWN}} \
19 -g ${LINKSGRP_${.ALLSRC:T}:U${LINKSGRP}} \
20 -m ${LINKSMODE_${.ALLSRC:T}:U${LINKSMODE}} \
21 ${.ALLSRC} ${.TARGET}" && \
23 -o
${LINKSOWN_
${.ALLSRC
:T
}:U
${LINKSOWN}} \
24 -g
${LINKSGRP_
${.ALLSRC
:T
}:U
${LINKSGRP}} \
25 -m
${LINKSMODE_
${.ALLSRC
:T
}:U
${LINKSMODE}} \
30 linksinstall
:: realinstall
33 while
test $$# -ge 2; do \
35 t
=${DESTDIR}$$1; shift
; \
36 if ttarg
=`${TOOL_STAT} -qf '%Y' $$t` && \
37 [ "$$l" = "$$ttarg" ]; then \
40 ${_MKSHMSG_INSTALL} $$t; \
41 ${_MKSHECHO} ${INSTALL_SYMLINK} $$l $$t; \
42 ${INSTALL_SYMLINK} $$l $$t; \
46 .for _src _dst in
${LINKS}
50 # Handle case conflicts carefully, when _dst occurs
51 # more than once after case flattening
52 .if
${MKUPDATE} == "no" ||
${LINKS
:tl
:M
${_dst
:tl
:Q
}:[\
#]} > 1
53 ${_t}! ${_l} __linkinstall
55 ${_t}: ${_l} __linkinstall
62 configinstall
: configlinksinstall
63 .PHONY
: configlinksinstall
64 configlinksinstall
:: configfilesinstall
65 .if
!empty
(CONFIGSYMLINKS
)
66 @
(set
${CONFIGSYMLINKS}; \
67 while
test $$# -ge 2; do \
69 t
=${DESTDIR}$$1; shift
; \
70 if ttarg
=`${TOOL_STAT} -qf '%Y' $$t` && \
71 [ "$$l" = "$$ttarg" ]; then \
74 ${_MKSHMSG_INSTALL} $$t; \
75 ${_MKSHECHO} ${INSTALL_SYMLINK} $$l $$t; \
76 ${INSTALL_SYMLINK} $$l $$t; \
80 .for _src _dst in
${CONFIGLINKS}
84 # Handle case conflicts carefully, when _dst occurs
85 # more than once after case flattening
86 .if
${MKUPDATE} == "no" ||
${CONFIGLINKS
:tl
:M
${_dst
:tl
:Q
}:[\
#]} > 1
87 ${_t}! ${_l} __linkinstall
89 ${_t}: ${_l} __linkinstall
92 configlinksinstall
:: ${_t}