summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kerberos5/lib/libasn1/Makefile5
-rw-r--r--kerberos5/lib/libhdb/Makefile5
-rw-r--r--kerberos5/lib/libheimntlm/Makefile2
-rw-r--r--kerberos5/lib/libhx509/Makefile5
-rw-r--r--lib/clang/clang.build.mk4
-rw-r--r--share/mk/bsd.dep.mk9
-rw-r--r--sys/conf/kern.post.mk6
7 files changed, 16 insertions, 20 deletions
diff --git a/kerberos5/lib/libasn1/Makefile b/kerberos5/lib/libasn1/Makefile
index 177de85..349a8f7 100644
--- a/kerberos5/lib/libasn1/Makefile
+++ b/kerberos5/lib/libasn1/Makefile
@@ -116,11 +116,6 @@ ${GEN_KX509}: kx509.asn1
.hx.h:
${CP} ${.IMPSRC} ${.TARGET}
-# This makefile generates a lot of its headers
-# so tell bsd.sys.mk not to try and stage them before they are built.
-# Note: this is rare
-NO_BEFOREBUILD_INCLUDES=
-
.include <bsd.lib.mk>
.SUFFIXES: .h .c .x .hx
diff --git a/kerberos5/lib/libhdb/Makefile b/kerberos5/lib/libhdb/Makefile
index 2c5ffe4..5f60c60 100644
--- a/kerberos5/lib/libhdb/Makefile
+++ b/kerberos5/lib/libhdb/Makefile
@@ -97,11 +97,6 @@ ${GEN}: hdb.asn1
.hx.h:
${CP} ${.IMPSRC} ${.TARGET}
-# This makefile generates a lot of its headers
-# so tell bsd.sys.mk not to try and stage them before they are built.
-# Note: this is rare
-NO_BEFOREBUILD_INCLUDES=
-
.include <bsd.lib.mk>
.SUFFIXES: .h .c .x .hx
diff --git a/kerberos5/lib/libheimntlm/Makefile b/kerberos5/lib/libheimntlm/Makefile
index d35fc38..bcb45f3 100644
--- a/kerberos5/lib/libheimntlm/Makefile
+++ b/kerberos5/lib/libheimntlm/Makefile
@@ -3,7 +3,7 @@
LIB= heimntlm
LDFLAGS= -Wl,--no-undefined
LIBADD= crypto com_err krb5 roken
-SRCS= ntlm.c ntlm_err.c
+SRCS= ntlm.c ntlm_err.c ntlm_err.h
INCS= heimntlm.h heimntlm-protos.h ntlm_err.h
CFLAGS+=-I${KRB5DIR}/lib/ntlm -I${KRB5DIR}/lib/roken
VERSION_MAP= ${KRB5DIR}/lib/ntlm/version-script.map
diff --git a/kerberos5/lib/libhx509/Makefile b/kerberos5/lib/libhx509/Makefile
index d7bedfc..2e8564b 100644
--- a/kerberos5/lib/libhx509/Makefile
+++ b/kerberos5/lib/libhx509/Makefile
@@ -290,11 +290,6 @@ ${GEN_CRMF}: crmf.asn1
.hx.h:
${CP} ${.IMPSRC} ${.TARGET}
-# This makefile generates a lot of its headers
-# so tell bsd.sys.mk not to try and stage them before they are built.
-# Note: this is rare
-NO_BEFOREBUILD_INCLUDES=
-
.include <bsd.lib.mk>
.SUFFIXES: .h .c .x .hx
diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk
index e90bd3f..62cdb81 100644
--- a/lib/clang/clang.build.mk
+++ b/lib/clang/clang.build.mk
@@ -237,7 +237,3 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td
SRCS+= ${TGHDRS:C/$/.inc.h/}
CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/}
-
-# if we are not doing explicit 'make depend', there is
-# nothing to cause these to be generated.
-beforebuild: ${SRCS:M*.inc.h}
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 78b2efb..770ef68 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)
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index 082007a..ff8fad0 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -251,6 +251,12 @@ CFLAGS+= ${DEPEND_CFLAGS}
.endfor
.endif # !defined(_SKIP_READ_DEPEND)
.endif # !defined(_meta_filemon)
+
+# Always run 'make depend' to generate dependencies early and to avoid the
+# need for manually running it. For the kernel this is mostly a NOP since
+# all dependencies are correctly added or accounted for. This is mostly to
+# ensure downstream uses of kernel-depend are handled.
+beforebuild: kernel-depend
.endif # ${MK_FAST_DEPEND} == "yes"
# Guess some dependencies for when no ${DEPENDFILE}.OBJ is generated yet.
OpenPOWER on IntegriCloud