Home | History | Annotate | Line # | Download | only in mk
bsd.inc.mk revision 1.8.2.1
      1  1.8.2.1       cjs #	$NetBSD: bsd.inc.mk,v 1.8.2.1 1997/08/01 21:08:00 cjs Exp $
      2      1.8       cjs #
      3      1.8       cjs # If an include file is already installed, this always compares the
      4      1.8       cjs # installed file to the one we are about to install. If they are the
      5      1.8       cjs # same, it doesn't do the install. This is to avoid triggering massive
      6      1.8       cjs # amounts of rebuilding.
      7      1.8       cjs #
      8      1.8       cjs # Targets:
      9      1.8       cjs #
     10      1.8       cjs # includes:
     11      1.8       cjs #	Installs the include files in BUILDDIR if we are using one, DESTDIR
     12      1.8       cjs #	otherwise. This is to be run before `make depend' or `make'.
     13      1.8       cjs #
     14      1.8       cjs # install:
     15      1.8       cjs #	Installs the include files in DESTDIR.
     16      1.8       cjs #
     17  1.8.2.1       cjs #	$NetBSD: bsd.inc.mk,v 1.8.2.1 1997/08/01 21:08:00 cjs Exp $
     18      1.3   mycroft 
     19      1.8       cjs .PHONY:		incbuild incinstall
     20      1.1  christos 
     21      1.5   mycroft .if defined(INCS)
     22      1.8       cjs 
     23      1.1  christos .for I in ${INCS}
     24      1.8       cjs 
     25      1.8       cjs .if defined(OBJDIR)
     26      1.8       cjs .PRECIOUS: ${BUILDDIR}${INCSDIR}/$I
     27      1.8       cjs ${BUILDDIR}${INCSDIR}/$I: $I
     28      1.8       cjs 	@cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
     29      1.8       cjs 	    (echo "${INSTALL} -d `dirname ${.TARGET}`" && \
     30      1.8       cjs 	    ${INSTALL} -d `dirname ${.TARGET}` && \
     31      1.8       cjs 	    echo "${INSTALL} -c -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}" && \
     32      1.8       cjs 	     ${INSTALL} -c -m ${NONBINMODE} ${.ALLSRC} ${.TARGET})
     33      1.8       cjs 
     34      1.8       cjs incbuild:: ${BUILDDIR}${INCSDIR}/$I
     35      1.8       cjs .else
     36      1.8       cjs incbuild:: ${DESTDIR}${INCSDIR}/$I
     37      1.8       cjs .endif	# defined(OBJDIR)
     38      1.1  christos 
     39      1.4   mycroft .PRECIOUS: ${DESTDIR}${INCSDIR}/$I
     40  1.8.2.1       cjs .if !defined(UPDATE)
     41  1.8.2.1       cjs .PHONY: ${DESTDIR}${INCSDIR}/$I
     42  1.8.2.1       cjs .endif
     43      1.1  christos ${DESTDIR}${INCSDIR}/$I: $I
     44      1.1  christos 	@cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
     45      1.1  christos 	    (echo "${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${NONBINMODE} \
     46      1.1  christos 		${.ALLSRC} ${.TARGET}" && \
     47      1.1  christos 	     ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${NONBINMODE} \
     48      1.1  christos 		${.ALLSRC} ${.TARGET})
     49      1.8       cjs 
     50      1.8       cjs incinstall:: ${DESTDIR}${INCSDIR}/$I
     51      1.1  christos .endfor
     52      1.8       cjs 
     53      1.8       cjs includes:	${INCS} incbuild
     54      1.8       cjs 
     55      1.8       cjs install:	${INCS} incinstall
     56      1.8       cjs 
     57      1.8       cjs .endif	# defined(INCS)
     58      1.8       cjs 
     59      1.8       cjs .if !target(incbuild)
     60      1.8       cjs incbuild::
     61      1.5   mycroft .endif
     62      1.5   mycroft 
     63      1.5   mycroft .if !target(incinstall)
     64      1.5   mycroft incinstall::
     65      1.1  christos .endif
     66