svn commit: r304697 - in head: share/mk sys/conf
Bryan Drewery
bdrewery at FreeBSD.org
Tue Aug 23 19:37:20 UTC 2016
Author: bdrewery
Date: Tue Aug 23 19:37:18 2016
New Revision: 304697
URL: https://svnweb.freebsd.org/changeset/base/304697
Log:
FAST_DEPEND: Fix 'make all install' not properly rebuilding based on .depend.* files.
An optimization is in place to skip reading the .depend.* files with
'make install'. This was too strong and broke 'make all install' and
'make foo.o foo install'. Now only skip reading the dependency files
if all make targets ran are install targets.
The problem comes about because headers are only added in as a guessed
dependency if .depend.* files do not yet exist. If they do exist, even
if being skipped from being read, then the header dependencies are not
applied. This applies to all #included files, and not just headers.
Reported by: kib
MFC after: 1 day
Sponsored by: EMC / Isilon Storage Division
Modified:
head/share/mk/bsd.dep.mk
head/sys/conf/kern.post.mk
Modified: head/share/mk/bsd.dep.mk
==============================================================================
--- head/share/mk/bsd.dep.mk Tue Aug 23 19:31:43 2016 (r304696)
+++ head/share/mk/bsd.dep.mk Tue Aug 23 19:37:18 2016 (r304697)
@@ -76,12 +76,13 @@ tags: ${SRCS}
_meta_filemon= 1
.endif
-# Skip reading .depend when not needed to speed up tree-walks
-# and simple lookups.
+# Skip reading .depend when not needed to speed up tree-walks and simple
+# lookups. For install, only do this if no other targets are specified.
# 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) || defined(_meta_filemon)
+ ${.TARGETS:M*install*} == ${.TARGETS} || \
+ make(analyze) || defined(_meta_filemon)
_SKIP_READ_DEPEND= 1
.if ${MK_DIRDEPS_BUILD} == "no"
.MAKE.DEPENDFILE= /dev/null
Modified: head/sys/conf/kern.post.mk
==============================================================================
--- head/sys/conf/kern.post.mk Tue Aug 23 19:31:43 2016 (r304696)
+++ head/sys/conf/kern.post.mk Tue Aug 23 19:37:18 2016 (r304697)
@@ -196,12 +196,13 @@ ${SYSTEM_OBJS} genassym.o vers.o: opt_gl
.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.
+# Skip reading .depend when not needed to speed up tree-walks and simple
+# lookups. For install, only do this if no other targets are specified.
# 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*) || \
+ ${.TARGETS:M*install*} == ${.TARGETS} || \
+ make(kernel-obj) || make(kernel-clean*) || \
make(kernel-install*) || defined(_meta_filemon)
_SKIP_READ_DEPEND= 1
.MAKE.DEPENDFILE= /dev/null
More information about the svn-src-head
mailing list