summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2016-06-15 23:57:50 +0000
committerbdrewery <bdrewery@FreeBSD.org>2016-06-15 23:57:50 +0000
commite36cb3f2ce1e968fdd6b6e538166be1c6f5b0325 (patch)
tree99425951b7c4525b366875be20592ee46f11cf7a
parent6c385704acce5fd89066960afb64c90eaeb73e33 (diff)
downloadFreeBSD-src-e36cb3f2ce1e968fdd6b6e538166be1c6f5b0325.zip
FreeBSD-src-e36cb3f2ce1e968fdd6b6e538166be1c6f5b0325.tar.gz
WITH_META_MODE: Do include headers for specific guessed dependencies
This is a follow-up to r300343. This is important for the OBJS_DEPEND_GUESS usage in gnu/usr.bin/cc/cc_tools. See comments for more details. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division
-rw-r--r--share/mk/bsd.dep.mk6
-rw-r--r--sys/conf/kern.post.mk6
2 files changed, 8 insertions, 4 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 117ea2a..077cc4b 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -221,9 +221,11 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
.elif defined(_meta_filemon)
# For meta mode we still need to know which file to depend on to avoid
# ambiguous suffix transformation rules from .PATH. Meta mode does not
-# use .depend files. We really only need source files, not headers.
+# use .depend files. We really only need source files, not headers since
+# they are typically in SRCS/beforebuild already. For target-specific
+# guesses do include headers though since they may not be in SRCS.
${__obj}: ${OBJS_DEPEND_GUESS:N*.h}
-${__obj}: ${OBJS_DEPEND_GUESS.${__obj}:N*.h}
+${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
.endif
.endfor
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index 8c5a713..bceff8c 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -254,11 +254,13 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
.elif defined(_meta_filemon)
# For meta mode we still need to know which file to depend on to avoid
# ambiguous suffix transformation rules from .PATH. Meta mode does not
-# use .depend files. We really only need source files, not headers.
+# use .depend files. We really only need source files, not headers since
+# they are typically in SRCS/beforebuild already. For target-specific
+# guesses do include headers though since they may not be in SRCS.
.if ${SYSTEM_OBJS:M${__obj}}
${__obj}: ${OBJS_DEPEND_GUESS:N*.h}
.endif
-${__obj}: ${OBJS_DEPEND_GUESS.${__obj}:N*.h}
+${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
.endif
.endfor
OpenPOWER on IntegriCloud