Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk MKDEPINCLUDES support.



details:   https://anonhg.NetBSD.org/src/rev/e29d28158144
branches:  trunk
changeset: 785225:e29d28158144
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Mar 05 02:02:07 2013 +0000

description:
MKDEPINCLUDES support.

diffstat:

 share/mk/bsd.README |   9 ++++++++-
 share/mk/bsd.dep.mk |  22 ++++++++++++++++------
 2 files changed, 24 insertions(+), 7 deletions(-)

diffs (82 lines):

diff -r 62c4a652b9d0 -r e29d28158144 share/mk/bsd.README
--- a/share/mk/bsd.README       Tue Mar 05 01:59:56 2013 +0000
+++ b/share/mk/bsd.README       Tue Mar 05 02:02:07 2013 +0000
@@ -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 @@
                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
 
diff -r 62c4a652b9d0 -r e29d28158144 share/mk/bsd.dep.mk
--- a/share/mk/bsd.dep.mk       Tue Mar 05 01:59:56 2013 +0000
+++ b/share/mk/bsd.dep.mk       Tue Mar 05 02:02:07 2013 +0000
@@ -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.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}
 



Home | Main Index | Thread Index | Old Index