1 # $NetBSD: bsd.inc.mk,v 1.31 2004/07/06 12:07:34 mycroft Exp $
6 includes
: ${INCS} incinstall inclinkinstall
12 incinstall
:: # ensure existence
15 # -c is forced on here, in order to preserve modtimes for "make depend"
17 @cmp
-s
${.ALLSRC
} ${.TARGET
} > /dev
/null
2>&1 || \
18 (${_MKSHMSG_INSTALL} ${.TARGET
}; \
19 ${_MKSHECHO} "${INSTALL_FILE} -c -o ${BINOWN} -g ${BINGRP} \
20 -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}" && \
21 ${INSTALL_FILE} -c
-o
${BINOWN} -g
${BINGRP} \
22 -m
${NONBINMODE} ${.ALLSRC
} ${.TARGET
})
25 _FDIR
:= ${INCSDIR_
${F
:C
,/,_
,g
}:U
${INCSDIR}} # dir override
26 _FNAME
:= ${INCSNAME_
${F
:C
,/,_
,g
}:U
${INCSNAME
:U
${F}}} # name override
27 _F
:= ${DESTDIR}${_FDIR}/${_FNAME} # installed path
29 .if
${MKUPDATE} == "no"
30 ${_F}! ${F} __incinstall
# install rule
32 ${_F}: ${F} __incinstall
# install rule
36 .PRECIOUS
: ${_F} # keep if install fails
43 inclinkinstall
: .PHONY
44 .if
!empty
(INCSYMLINKS
)
45 @
(set
${INCSYMLINKS}; \
46 while
test $$# -ge 2; do \
48 t
=${DESTDIR}$$1; shift
; \
49 if ttarg
=`${TOOL_STAT} -qf '%Y' $$t` && \
50 [ "$$l" = "$$ttarg" ]; then \
53 ${_MKSHMSG_INSTALL} $$t; \
54 ${_MKSHECHO} ${INSTALL_SYMLINK} $$l $$t; \
55 ${INSTALL_SYMLINK} $$l $$t; \