summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-01-29 17:33:37 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-01-29 17:33:37 +0000
commit9b4453d2d4d3836301708de1081548850a944d07 (patch)
treed5e5d5084e95c9debc5be608048494324800f13b /share
parent906b78d2d0fb0b3206e3a91a63102fc424288318 (diff)
Notes
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.dep.mk11
1 files changed, 6 insertions, 5 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 3e49a6e926c2..5dc79a8b87c2 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -165,12 +165,13 @@ depend: beforedepend ${DEPENDFILE} afterdepend
_CFLAGS_INCLUDES= ${CFLAGS:Q:S/\\ /,/g:C/-include,/-include%/g:C/,/ /g:M-include*:C/%/ /g}
_CXXFLAGS_INCLUDES= ${CXXFLAGS:Q:S/\\ /,/g:C/-include,/-include%/g:C/,/ /g:M-include*:C/%/ /g}
# XXX: Temporary hack to workaround .depend files not tracking -include
-.if !empty(_CFLAGS_INCLUDES)
-${OBJS} ${POBJS} ${SOBJS}: ${_CFLAGS_INCLUDES:M*.h}
-.endif
-.if !empty(_CXXFLAGS_INCLUDES)
-${OBJS} ${POBJS} ${SOBJS}: ${_CXXFLAGS_INCLUDES:M*.h}
+_hdrincludes=${_CFLAGS_INCLUDES:M*.h} ${_CXXFLAGS_INCLUDES:M*.h}
+.for _hdr in ${_hdrincludes:O:u}
+.if exists(${_hdr})
+${OBJS} ${POBJS} ${SOBJS}: ${_hdr}
.endif
+.endfor
+.undef _hdrincludes
# Different types of sources are compiled with slightly different flags.
# Split up the sources, and filter out headers and non-applicable flags.