svn commit: r301290 - head/share/mk

Bryan Drewery bdrewery at FreeBSD.org
Fri Jun 3 21:35:20 UTC 2016


Author: bdrewery
Date: Fri Jun  3 21:35:19 2016
New Revision: 301290
URL: https://svnweb.freebsd.org/changeset/base/301290

Log:
  WITH_META_MODE: Avoid "building" .depend if there is nothing to do.
  
  This avoids 'Building /path/.depend' when it will not actually produce a
  file.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.dep.mk

Modified: head/share/mk/bsd.dep.mk
==============================================================================
--- head/share/mk/bsd.dep.mk	Fri Jun  3 21:23:11 2016	(r301289)
+++ head/share/mk/bsd.dep.mk	Fri Jun  3 21:35:19 2016	(r301290)
@@ -246,7 +246,9 @@ DPSRCS+= ${SRCS}
 # beforedepend/_EXTRADEPEND/afterdepend.  The target is kept
 # to allow 'make depend' to generate files.
 ${DEPENDFILE}: ${DPSRCS}
-.if !empty(.MAKE.MODE:Mmeta) || exists(${.OBJDIR}/${DEPENDFILE})
+.if exists(${.OBJDIR}/${DEPENDFILE}) || \
+    ((commands(beforedepend) || commands(_EXTRADEPEND) || \
+    commands(afterdepend)) && !empty(.MAKE.MODE:Mmeta))
 	rm -f ${DEPENDFILE}
 .endif
 .if target(_EXTRADEPEND)


More information about the svn-src-head mailing list