Module Name: src Committed By: christos Date: Tue Mar 5 02:02:08 UTC 2013
Modified Files: src/share/mk: bsd.README bsd.dep.mk Log Message: MKDEPINCLUDES support. To generate a diff of this commit: cvs rdiff -u -r1.313 -r1.314 src/share/mk/bsd.README cvs rdiff -u -r1.75 -r1.76 src/share/mk/bsd.dep.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/mk/bsd.README diff -u src/share/mk/bsd.README:1.313 src/share/mk/bsd.README:1.314 --- src/share/mk/bsd.README:1.313 Sat Feb 16 16:40:45 2013 +++ src/share/mk/bsd.README Mon Mar 4 21:02:07 2013 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.313 2013/02/16 21:40:45 jmmv Exp $ +# $NetBSD: bsd.README,v 1.314 2013/03/05 02:02:07 christos Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -157,6 +157,13 @@ MKDEBUGLIB Build *_g.a debugging librari with -DDEBUG. Default: no +MKDEPINCLUDES If "yes" issue .include statements in the .depend file + instead of inlining the contents of the .d files. Useful + when stale dependencies are present, to list the exact + files that need refreshing. It is off by default because + it is possibly slower. + Default "no" + MKDOC If "no", don't build or install the documentation. Default: yes Index: src/share/mk/bsd.dep.mk diff -u src/share/mk/bsd.dep.mk:1.75 src/share/mk/bsd.dep.mk:1.76 --- src/share/mk/bsd.dep.mk:1.75 Sun Nov 18 14:48:29 2012 +++ src/share/mk/bsd.dep.mk Mon Mar 4 21:02:07 2013 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.dep.mk,v 1.75 2012/11/18 19:48:29 apb Exp $ +# $NetBSD: bsd.dep.mk,v 1.76 2013/03/05 02:02:07 christos Exp $ ##### Basic targets realdepend: beforedepend .depend afterdepend @@ -36,34 +36,44 @@ __DPSRCS.notd= ${__DPSRCS.all:O:u:N*.d} ${__DPSRCS.d}: ${__DPSRCS.notd} ${DPSRCS} .endif # } +MKDEPSUFFLAGS=-s ${MKDEP_SUFFIXES:Q} + +.if defined(MKDEPINCLUDES) && ${MKDEPINCLUDES} != "no" +_MKDEP_MERGEFLAGS=-i +_MKDEP_FILEFLAGS=${MKDEPSUFFLAGS} +.else +_MKDEP_MERGEFLAGS=${MKDEPSUFFLAGS} +_MKDEP_FILEFLAGS= +.endif + .depend: ${__DPSRCS.d} ${_MKTARGET_CREATE} rm -f .depend - ${MKDEP} -d -f ${.TARGET} -s ${MKDEP_SUFFIXES:Q} ${__DPSRCS.d} + ${MKDEP} ${_MKDEP_MERGEFLAGS} -d -f ${.TARGET} ${__DPSRCS.d} .SUFFIXES: .d .s .S .c .C .cc .cpp .cxx .m .c.d: ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} \ + ${MKDEP} -f ${.TARGET} ${_MKDEP_FILEFLAGS} -- ${MKDEPFLAGS} \ ${CFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \ ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} .m.d: ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} \ + ${MKDEP} -f ${.TARGET} ${_MKDEP_FILEFLAGS} -- ${MKDEPFLAGS} \ ${OBJCFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \ ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} .s.d .S.d: ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} \ + ${MKDEP} -f ${.TARGET} ${_MKDEP_FILEFLAGS} -- ${MKDEPFLAGS} \ ${AFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \ ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${__acpp_flags} ${.IMPSRC} .C.d .cc.d .cpp.d .cxx.d: ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} \ + ${MKDEP} -f ${.TARGET} ${_MKDEP_FILEFLAGS} -- ${MKDEPFLAGS} \ ${CXXFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \ ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}