1 1.24 lukem # $NetBSD: bsd.inc.mk,v 1.24 2003/07/18 08:26:07 lukem Exp $ 2 1.24 lukem 3 1.24 lukem .include <bsd.init.mk> 4 1.3 mycroft 5 1.20 tv ##### Basic targets 6 1.9 cjs .PHONY: incinstall 7 1.9 cjs includes: ${INCS} incinstall 8 1.1 christos 9 1.20 tv ##### Install rules 10 1.20 tv incinstall:: # ensure existence 11 1.14 mycroft 12 1.20 tv # -c is forced on here, in order to preserve modtimes for "make depend" 13 1.16 mycroft __incinstall: .USE 14 1.1 christos @cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \ 15 1.20 tv (echo "${INSTALL_FILE:N-c} -c -o ${BINOWN} -g ${BINGRP} \ 16 1.23 perry -m ${NONBINMODE} ${SYSPKGTAG} ${.ALLSRC} ${.TARGET}" && \ 17 1.20 tv ${INSTALL_FILE:N-c} -c -o ${BINOWN} -g ${BINGRP} \ 18 1.23 perry -m ${NONBINMODE} ${SYSPKGTAG} ${.ALLSRC} ${.TARGET}) 19 1.16 mycroft 20 1.20 tv .for F in ${INCS:O:u} 21 1.20 tv _FDIR:= ${INCSDIR_${F:C,/,_,g}:U${INCSDIR}} # dir override 22 1.20 tv _FNAME:= ${INCSNAME_${F:C,/,_,g}:U${INCSNAME:U${F}}} # name override 23 1.20 tv _F:= ${DESTDIR}${_FDIR}/${_FNAME} # installed path 24 1.20 tv 25 1.24 lukem .if ${MKUPDATE} == "no" 26 1.22 mycroft ${_F}! ${F} __incinstall # install rule 27 1.22 mycroft .else 28 1.20 tv ${_F}: ${F} __incinstall # install rule 29 1.22 mycroft .endif 30 1.22 mycroft 31 1.20 tv incinstall:: ${_F} 32 1.20 tv .PRECIOUS: ${_F} # keep if install fails 33 1.1 christos .endfor 34 1.5 mycroft 35 1.20 tv .undef _FDIR 36 1.20 tv .undef _FNAME 37 1.20 tv .undef _F 38