summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.lib.mk
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2016-02-24 17:19:05 +0000
committerbdrewery <bdrewery@FreeBSD.org>2016-02-24 17:19:05 +0000
commit99c769b1d73d67f814b59ed3363fbf5cffad6489 (patch)
treee02f021af7d6f2e079bc0d65c88722f3f2cb08ee /share/mk/bsd.lib.mk
parentfd6008b8b78822578bdd0a5f7a8a84760879fc4f (diff)
downloadFreeBSD-src-99c769b1d73d67f814b59ed3363fbf5cffad6489.zip
FreeBSD-src-99c769b1d73d67f814b59ed3363fbf5cffad6489.tar.gz
FAST_DEPEND: Rework how guessed dependencies are handled.
Rather than depend on .depend not existing, check the actual .depend.OBJ file that will be used for that object. If it doesn't exist then use the guessed dependencies. FAST_DEPEND may never have a .depend file. Not having one means all of the previous logic would over-depend all object files on all headers which is not what we wanted. It also means that if a .depend is generated before a build is done for _EXTRADEPEND (such as for PROG or LIB) then all of these dependencies would not be used since the .depend wasn't generated from mkdep and the real .depend.* files are not generated until the build. Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'share/mk/bsd.lib.mk')
-rw-r--r--share/mk/bsd.lib.mk25
1 files changed, 14 insertions, 11 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index dc81c1c..036d3d1 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -415,28 +415,31 @@ lint: ${SRCS:M*.c}
.include <bsd.man.mk>
.endif
-.include <bsd.dep.mk>
-
-.if ${MK_FAST_DEPEND} == "yes" || !exists(${.OBJDIR}/${DEPENDFILE})
.if defined(LIB) && !empty(LIB)
-.if !exists(${.OBJDIR}/${DEPENDFILE})
-${OBJS} ${STATICOBJS} ${POBJS}: ${SRCS:M*.h}
+OBJS_DEPEND_GUESS+= ${SRCS:M*.h}
+.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE})
+${OBJS} ${STATICOBJS} ${POBJS}: ${OBJS_DEPEND_GUESS}
.endif
.for _S in ${SRCS:N*.[hly]}
-${_S:R}.po: ${_S}
+OBJS_DEPEND_GUESS.${_S:R}.po= ${_S}
+.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE})
+${_S:R}.po: ${OBJS_DEPEND_GUESS.${_S:R}.po}
+.endif
.endfor
.endif
.if defined(SHLIB_NAME) || \
defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
-.if !exists(${.OBJDIR}/${DEPENDFILE})
-${SOBJS}: ${SRCS:M*.h}
+.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE})
+${SOBJS}: ${OBJS_DEPEND_GUESS}
.endif
.for _S in ${SRCS:N*.[hly]}
-${_S:R}.So: ${_S}
-.endfor
+OBJS_DEPEND_GUESS.${_S:R}.So= ${_S}
+.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE})
+${_S:R}.So: ${OBJS_DEPEND_GUESS.${_S:R}.So}
.endif
+.endfor
.endif
+.include <bsd.dep.mk>
.include <bsd.obj.mk>
-
.include <bsd.sys.mk>
OpenPOWER on IntegriCloud