2001-11-02 08:21:47 +03:00
|
|
|
# $NetBSD: bsd.inc.mk,v 1.20 2001/11/02 05:21:50 tv Exp $
|
1997-05-07 00:54:31 +04:00
|
|
|
|
2001-11-02 08:21:47 +03:00
|
|
|
##### Basic targets
|
1997-06-01 01:21:13 +04:00
|
|
|
.PHONY: incinstall
|
|
|
|
includes: ${INCS} incinstall
|
1997-03-25 00:54:12 +03:00
|
|
|
|
2001-11-02 08:21:47 +03:00
|
|
|
##### Install rules
|
|
|
|
incinstall:: # ensure existence
|
2000-06-06 09:40:47 +04:00
|
|
|
|
2001-11-02 08:21:47 +03:00
|
|
|
# -c is forced on here, in order to preserve modtimes for "make depend"
|
2000-06-06 13:53:29 +04:00
|
|
|
__incinstall: .USE
|
1997-03-25 00:54:12 +03:00
|
|
|
@cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
|
2001-11-02 08:21:47 +03:00
|
|
|
(echo "${INSTALL_FILE:N-c} -c -o ${BINOWN} -g ${BINGRP} \
|
|
|
|
-m ${NONBINMODE} ${.ALLSRC} ${.TARGET}" && \
|
|
|
|
${INSTALL_FILE:N-c} -c -o ${BINOWN} -g ${BINGRP} \
|
|
|
|
-m ${NONBINMODE} ${.ALLSRC} ${.TARGET})
|
2000-06-06 13:53:29 +04:00
|
|
|
|
2001-11-02 08:21:47 +03:00
|
|
|
.for F in ${INCS:O:u}
|
|
|
|
_FDIR:= ${INCSDIR_${F:C,/,_,g}:U${INCSDIR}} # dir override
|
|
|
|
_FNAME:= ${INCSNAME_${F:C,/,_,g}:U${INCSNAME:U${F}}} # name override
|
|
|
|
_F:= ${DESTDIR}${_FDIR}/${_FNAME} # installed path
|
|
|
|
|
|
|
|
${_F}: ${F} __incinstall # install rule
|
|
|
|
incinstall:: ${_F}
|
|
|
|
.PRECIOUS: ${_F} # keep if install fails
|
|
|
|
.PHONY: ${UPDATE:U${_F}} # clobber unless UPDATE
|
1997-03-25 00:54:12 +03:00
|
|
|
.endfor
|
1997-05-07 19:53:28 +04:00
|
|
|
|
2001-11-02 08:21:47 +03:00
|
|
|
.undef _FDIR
|
|
|
|
.undef _FNAME
|
|
|
|
.undef _F
|