Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jun 2016 21:55:03 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r302073 - in head: share/mk sys/conf
Message-ID:  <201606212155.u5LLt3sH072326@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Tue Jun 21 21:55:03 2016
New Revision: 302073
URL: https://svnweb.freebsd.org/changeset/base/302073

Log:
  META_MODE: Don't generate or read _EXTRADEPEND dependencies when using filemon.
  
  The DPADD data in .depend will be redundant with what is in the .meta file.
  
  Also extend NO_EXTRADEPEND support to bsd.prog.mk.
  
  Approved by:	re (blanket, META_MODE)
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.dep.mk
  head/share/mk/bsd.prog.mk
  head/share/mk/sys.mk
  head/sys/conf/kern.post.mk

Modified: head/share/mk/bsd.dep.mk
==============================================================================
--- head/share/mk/bsd.dep.mk	Tue Jun 21 20:32:34 2016	(r302072)
+++ head/share/mk/bsd.dep.mk	Tue Jun 21 21:55:03 2016	(r302073)
@@ -72,10 +72,16 @@ tags: ${SRCS}
 .endif
 .endif
 
+.if !empty(.MAKE.MODE:Mmeta) && empty(.MAKE.MODE:Mnofilemon)
+_meta_filemon=	1
+.endif
+
 # Skip reading .depend when not needed to speed up tree-walks
 # and simple lookups.
+# Also skip generating or including .depend.* files if in meta+filemon mode
+# since it will track dependencies itself.  OBJS_DEPEND_GUESS is still used.
 .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \
-    make(install*) || make(analyze)
+    make(install*) || make(analyze) || defined(_meta_filemon)
 _SKIP_READ_DEPEND=	1
 .if ${MK_DIRDEPS_BUILD} == "no"
 .MAKE.DEPENDFILE=	/dev/null
@@ -157,9 +163,6 @@ ${_D}.po: ${_DSRC} ${POBJS:S/^${_D}.po$/
 .endfor
 
 
-.if !empty(.MAKE.MODE:Mmeta) && empty(.MAKE.MODE:Mnofilemon)
-_meta_filemon=	1
-.endif
 .if ${MAKE_VERSION} < 20160220
 DEPEND_MP?=	-MP
 .endif
@@ -173,8 +176,6 @@ DEPENDOBJS+=	${DEPENDSRCS:R:S,$,.o,}
 DEPENDFILES_OBJS=	${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./}
 DEPEND_CFLAGS+=	-MD ${DEPEND_MP} -MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}}
 DEPEND_CFLAGS+=	-MT${.TARGET}
-# Skip generating or including .depend.* files if in meta+filemon mode since
-# it will track dependencies itself.  OBJS_DEPEND_GUESS is still used though.
 .if !defined(_meta_filemon)
 .if defined(.PARSEDIR)
 # Only add in DEPEND_CFLAGS for CFLAGS on files we expect from DEPENDOBJS
@@ -201,7 +202,7 @@ CFLAGS+=	${DEPEND_CFLAGS}
 .depend:
 .include <meta.autodep.mk>
 # If using filemon then _EXTRADEPEND is skipped since it is not needed.
-.if empty(.MAKE.MODE:Mnofilemon)
+.if defined(_meta_filemon)
 # this depend: bypasses that below
 # the dependency helps when bootstrapping
 depend: beforedepend ${DPSRCS} ${SRCS} afterdepend
@@ -245,15 +246,18 @@ depend: beforedepend ${DEPENDFILE} after
 
 DPSRCS+= ${SRCS}
 # A .depend file will only be generated if there are commands in
-# beforedepend/_EXTRADEPEND/afterdepend.  The target is kept
-# to allow 'make depend' to generate files.
+# beforedepend/_EXTRADEPEND/afterdepend  The _EXTRADEPEND target is
+# ignored if using meta+filemon since it handles all dependencies.  The other
+# targets are kept as they be used for generating something.  The target is
+# kept to allow 'make depend' to generate files.
 ${DEPENDFILE}: ${DPSRCS}
 .if exists(${.OBJDIR}/${DEPENDFILE}) || \
-    ((commands(beforedepend) || commands(_EXTRADEPEND) || \
+    ((commands(beforedepend) || \
+    (!defined(_meta_filemon) && commands(_EXTRADEPEND)) || \
     commands(afterdepend)) && !empty(.MAKE.MODE:Mmeta))
 	rm -f ${DEPENDFILE}
 .endif
-.if target(_EXTRADEPEND)
+.if !defined(_meta_filemon) && target(_EXTRADEPEND)
 _EXTRADEPEND: .USE
 ${DEPENDFILE}: _EXTRADEPEND
 .endif

Modified: head/share/mk/bsd.prog.mk
==============================================================================
--- head/share/mk/bsd.prog.mk	Tue Jun 21 20:32:34 2016	(r302072)
+++ head/share/mk/bsd.prog.mk	Tue Jun 21 21:55:03 2016	(r302073)
@@ -178,6 +178,7 @@ CLEANFILES+= ${OBJS}
 .include <bsd.libnames.mk>
 
 .if defined(PROG)
+.if !defined(NO_EXTRADEPEND)
 _EXTRADEPEND:
 .if defined(LDFLAGS) && !empty(LDFLAGS:M-nostdlib)
 .if defined(DPADD) && !empty(DPADD)
@@ -193,6 +194,7 @@ _EXTRADEPEND:
 .endif
 .endif
 .endif
+.endif	# !defined(NO_EXTRADEPEND)
 .endif
 
 .if !target(install)

Modified: head/share/mk/sys.mk
==============================================================================
--- head/share/mk/sys.mk	Tue Jun 21 20:32:34 2016	(r302072)
+++ head/share/mk/sys.mk	Tue Jun 21 21:55:03 2016	(r302073)
@@ -75,6 +75,8 @@ META_MODE?= normal
 # buildworld -> installworld -> buildworld to rebuild everything.
 # Since the build is self-reliant and bootstraps everything it needs,
 # this should not be a real problem for incremental builds.
+# XXX: This relies on the existing host tools retaining ABI compatibility
+# through upgrades since they won't be rebuilt on header/library changes.
 # Note that these are prefix matching, so /lib matches /libexec.
 .MAKE.META.IGNORE_PATHS+= \
 	${__MAKE_SHELL} \

Modified: head/sys/conf/kern.post.mk
==============================================================================
--- head/sys/conf/kern.post.mk	Tue Jun 21 20:32:34 2016	(r302072)
+++ head/sys/conf/kern.post.mk	Tue Jun 21 21:55:03 2016	(r302073)
@@ -189,11 +189,16 @@ genassym.o: $S/$M/$M/genassym.c
 
 ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h
 
+.if !empty(.MAKE.MODE:Unormal:Mmeta) && empty(.MAKE.MODE:Unormal:Mnofilemon)
+_meta_filemon=	1
+.endif
 # Skip reading .depend when not needed to speed up tree-walks
 # and simple lookups.
+# Also skip generating or including .depend.* files if in meta+filemon mode
+# since it will track dependencies itself.  OBJS_DEPEND_GUESS is still used.
 .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \
     make(install*) || make(kernel-obj) || make(kernel-clean*) || \
-    make(kernel-install*)
+    make(kernel-install*) || defined(_meta_filemon)
 _SKIP_READ_DEPEND=	1
 .MAKE.DEPENDFILE=	/dev/null
 .endif
@@ -203,11 +208,6 @@ SRCS=	assym.s vnode_if.h ${BEFORE_DEPEND
 	${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \
 	${MFILES:T:S/.m$/.h/}
 DEPENDFILES=	.depend .depend.*
-# Skip generating or including .depend.* files if in meta+filemon mode since
-# it will track dependencies itself.  OBJS_DEPEND_GUESS is still used though.
-.if !empty(.MAKE.MODE:Unormal:Mmeta) && empty(.MAKE.MODE:Unormal:Mnofilemon)
-_meta_filemon=	1
-.endif
 DEPENDOBJS+=	${SYSTEM_OBJS} genassym.o
 DEPENDFILES_OBJS=	${DEPENDOBJS:O:u:C/^/.depend./}
 .if ${MAKE_VERSION} < 20160220



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606212155.u5LLt3sH072326>