From 711019f70dc02be72b88f5babedd7a150631dcc4 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Mon, 24 Jul 2017 23:32:36 +0000 Subject: [PATCH] Slightly simplify logic for which depend file is expected. This is a NOP. MFC after: 2 weeks Sponsored by: Dell EMC Isilon --- share/mk/bsd.dep.mk | 10 +++++++--- sys/conf/kern.post.mk | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index de23ac09833d..06262385c57b 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -240,8 +240,12 @@ _meta_obj= ${.OBJDIR:C,/,_,g}_${__obj:C,/,_,g}.meta _meta_obj= ${__obj}.meta .endif _dep_obj= ${DEPENDFILE}.${__obj:${DEPEND_FILTER}} -.if (defined(_meta_filemon) && !exists(${.OBJDIR}/${_meta_obj})) || \ - (!defined(_meta_filemon) && !exists(${.OBJDIR}/${_dep_obj})) +.if defined(_meta_filemon) +_depfile= ${.OBJDIR}/${_meta_obj} +.else +_depfile= ${.OBJDIR}/${_dep_obj} +.endif +.if !exists(${_depfile}) ${__obj}: ${OBJS_DEPEND_GUESS} ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .elif defined(_meta_filemon) @@ -252,7 +256,7 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} # guesses do include headers though since they may not be in SRCS. ${__obj}: ${OBJS_DEPEND_GUESS:N*.h} ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} -.endif +.endif # !exists(${_depfile}) .endfor # Always run 'make depend' to generate dependencies early and to avoid the diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 95b94fb2dda2..c81bafc0684b 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -259,8 +259,12 @@ beforebuild: kernel-depend # For meta+filemon the .meta file is checked for since it is the dependency # file used. .for __obj in ${DEPENDOBJS:O:u} -.if (defined(_meta_filemon) && !exists(${.OBJDIR}/${__obj}.meta)) || \ - (!defined(_meta_filemon) && !exists(${.OBJDIR}/.depend.${__obj})) +.if defined(_meta_filemon) +_depfile= ${.OBJDIR}/${__obj}.meta +.else +_depfile= ${.OBJDIR}/.depend.${__obj} +.endif +.if !exists(${_depfile}) .if ${SYSTEM_OBJS:M${__obj}} ${__obj}: ${OBJS_DEPEND_GUESS} .endif @@ -275,7 +279,7 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} ${__obj}: ${OBJS_DEPEND_GUESS:N*.h} .endif ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} -.endif +.endif # !exists(${_depfile}) .endfor .NOPATH: .depend ${DEPENDFILES_OBJS}