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