From 88fe1f7ab39cf915614221a883d61a9de908dc3d Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Wed, 2 Mar 2016 21:03:42 +0000 Subject: [PATCH] Add guessed dependencies to OBJS after bsd.dep.mk in case of it adding to SRCS. This was a regression in r295985. bsd.dep.mk adds to SRCS for dtrace probes, yacc grammars and some others. The code that is moving is planned to be removed once FAST_DEPEND is default (and the only option) though since FAST_DEPEND doesn't use this. Pointyhat to: bdrewery Sponsored by: EMC / Isilon Storage Division --- share/mk/bsd.lib.mk | 29 +++++++++++++++++------------ share/mk/bsd.prog.mk | 6 +++++- sys/conf/kmod.mk | 4 +++- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 0f8be4588a9d..2b7eef999bb9 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -417,30 +417,35 @@ lint: ${SRCS:M*.c} .if defined(LIB) && !empty(LIB) 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]} 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 ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) -${SOBJS}: ${OBJS_DEPEND_GUESS} -.endif .for _S in ${SRCS:N*.[hly]} 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 + +.if defined(LIB) && !empty(LIB) +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${OBJS} ${STATICOBJS} ${POBJS}: ${OBJS_DEPEND_GUESS} +.for _S in ${SRCS:N*.[hly]} +${_S:R}.po: ${OBJS_DEPEND_GUESS.${_S:R}.po} +.endfor +.if defined(SHLIB_NAME) || \ + defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) +${SOBJS}: ${OBJS_DEPEND_GUESS} +.for _S in ${SRCS:N*.[hly]} +${_S:R}.So: ${OBJS_DEPEND_GUESS.${_S:R}.So} +.endfor +.endif +.endif +.endif + .include .include .include diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index f45e39970c43..44b7e9d376ee 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -277,12 +277,16 @@ lint: ${SRCS:M*.c} .if defined(PROG) OBJS_DEPEND_GUESS+= ${SRCS:M*.h} +.endif + +.include + +.if defined(PROG) .if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) ${OBJS}: ${OBJS_DEPEND_GUESS} .endif .endif -.include .include .include .include diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 2afdd8a60701..ddfc981026a3 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -456,11 +456,13 @@ cleanilinks: rm -f ${_ILINKS} OBJS_DEPEND_GUESS+= ${SRCS:M*.h} + +.include + .if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) ${OBJS}: ${OBJS_DEPEND_GUESS} .endif -.include .include .include .include "kern.mk"