Home | History | Annotate | Line # | Download | only in mk
bsd.inc.mk revision 1.20
      1  1.20        tv #	$NetBSD: bsd.inc.mk,v 1.20 2001/11/02 05:21:50 tv 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.20        tv ${_F}:		${F} __incinstall			# install rule
     24  1.20        tv incinstall::	${_F}
     25  1.20        tv .PRECIOUS:	${_F}					# keep if install fails
     26  1.20        tv .PHONY:		${UPDATE:U${_F}}			# clobber unless UPDATE
     27   1.1  christos .endfor
     28   1.5   mycroft 
     29  1.20        tv .undef _FDIR
     30  1.20        tv .undef _FNAME
     31  1.20        tv .undef _F
     32