Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jan 2016 17:33:37 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r295048 - stable/10/share/mk
Message-ID:  <201601291733.u0THXb5T081185@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Fri Jan 29 17:33:37 2016
New Revision: 295048
URL: https://svnweb.freebsd.org/changeset/base/295048

Log:
  MFC r295006:
  
    Fix -include .depend hack from r294370 for headers not in .PATH.
  
  Approved by:	re (gjb)

Modified:
  stable/10/share/mk/bsd.dep.mk
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/mk/bsd.dep.mk
==============================================================================
--- stable/10/share/mk/bsd.dep.mk	Fri Jan 29 17:20:59 2016	(r295047)
+++ stable/10/share/mk/bsd.dep.mk	Fri Jan 29 17:33:37 2016	(r295048)
@@ -165,12 +165,13 @@ depend: beforedepend ${DEPENDFILE} after
 _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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601291733.u0THXb5T081185>