diff options
Diffstat (limited to 'share')
| -rw-r--r-- | share/mk/bsd.dep.mk | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index 78b2efbb482a8..770ef681a5898 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -209,6 +209,8 @@ CFLAGS+= ${DEPEND_CFLAGS} .endif # defined(SRCS) .if ${MK_DIRDEPS_BUILD} == "yes" +# Prevent meta.autodep.mk from tracking "local dependencies". +.depend: .include <meta.autodep.mk> # If using filemon then _EXTRADEPEND is skipped since it is not needed. .if empty(.MAKE.MODE:Mnofilemon) @@ -231,7 +233,14 @@ ${__obj}: ${OBJS_DEPEND_GUESS} ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .endif .endfor + +# Always run 'make depend' to generate dependencies early and to avoid the +# need for manually running it. The dirdeps build should only do this in +# sub-makes though since MAKELEVEL0 is for dirdeps calculations. +.if ${MK_DIRDEPS_BUILD} == "no" || ${.MAKE.LEVEL} > 0 +beforebuild: depend .endif +.endif # ${MK_FAST_DEPEND} == "yes" .if !target(depend) .if defined(SRCS) |
