[BACK]Return to bsd.inc.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

Annotation of src/share/mk/bsd.inc.mk, Revision 1.29

1.29    ! lukem       1: #      $NetBSD: bsd.inc.mk,v 1.28 2003/11/07 00:05:24 lukem Exp $
1.24      lukem       2:
                      3: .include <bsd.init.mk>
1.3       mycroft     4:
1.20      tv          5: ##### Basic targets
1.9       cjs         6: .PHONY:                incinstall
1.25      lukem       7: includes:      ${INCS} incinstall inclinkinstall
                      8:
                      9: ##### Default values
                     10: INCSYMLINKS?=
1.1       christos   11:
1.20      tv         12: ##### Install rules
                     13: incinstall::   # ensure existence
1.14      mycroft    14:
1.20      tv         15: # -c is forced on here, in order to preserve modtimes for "make depend"
1.16      mycroft    16: __incinstall: .USE
1.1       christos   17:        @cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
1.28      lukem      18:            (${_MKSHMSG_INSTALL} ${.TARGET}; \
1.29    ! lukem      19:             ${_MKSHECHO} "${INSTALL_FILE} -c -o ${BINOWN} -g ${BINGRP} \
1.23      perry      20:                -m ${NONBINMODE} ${SYSPKGTAG} ${.ALLSRC} ${.TARGET}" && \
1.29    ! lukem      21:             ${INSTALL_FILE} -c -o ${BINOWN} -g ${BINGRP} \
1.23      perry      22:                -m ${NONBINMODE} ${SYSPKGTAG} ${.ALLSRC} ${.TARGET})
1.16      mycroft    23:
1.20      tv         24: .for F in ${INCS:O:u}
                     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
                     28:
1.24      lukem      29: .if ${MKUPDATE} == "no"
1.22      mycroft    30: ${_F}!         ${F} __incinstall                       # install rule
                     31: .else
1.20      tv         32: ${_F}:         ${F} __incinstall                       # install rule
1.22      mycroft    33: .endif
                     34:
1.20      tv         35: incinstall::   ${_F}
                     36: .PRECIOUS:     ${_F}                                   # keep if install fails
1.1       christos   37: .endfor
1.5       mycroft    38:
1.20      tv         39: .undef _FDIR
                     40: .undef _FNAME
                     41: .undef _F
1.25      lukem      42:
                     43: inclinkinstall::
                     44: .if !empty(INCSYMLINKS)
                     45:        @(set ${INCSYMLINKS}; \
                     46:         while test $$# -ge 2; do \
                     47:                l=$$1; shift; \
                     48:                t=${DESTDIR}$$1; shift; \
                     49:                if  ttarg=`${TOOL_STAT} -qf '%Y' $$t` && \
                     50:                    [ "$$l" = "$$ttarg" ]; then \
                     51:                        continue ; \
                     52:                fi ; \
1.28      lukem      53:                ${_MKSHMSG_INSTALL} $$t; \
                     54:                ${_MKSHECHO} ${INSTALL_SYMLINK} ${SYSPKGTAG} $$l $$t; \
1.25      lukem      55:                ${INSTALL_SYMLINK} ${SYSPKGTAG} $$l $$t; \
                     56:         done; )
                     57: .endif

CVSweb <webmaster@jp.NetBSD.org>