freebsd-skq/share
bdrewery ff421684e7 FAST_DEPEND: Fix building of wrong source files in some cases.
Similar to the original reason for these dependency hints to be added,
in r124637, the missing-dependency file case can lead to building of the
wrong source.

A clear example of this is in gnu/lib/libstdc++ where the .PATH contains
both contrib/gcc and contrib/libstdc++/src.

  contrib/gcc has a debug.c.
  contrib/libstdc++/src has a debug.cc.

  When building for the objects of debug.o, debug.So, and debug.po, it is
  ambiguous for which src file to use due to the suffix transformation
  rules, even though the proper one is listed first in .PATH.

  This was normally avoided due to these dependency hints for the initial
  build, and then mkdep would add an explicit 'debug.o: debug.cc'
  dependency into the .depend file.  WITH_FAST_DEPEND does not generate
  the .depend file with these, but puts them into .depend.debug.o instead.

Rather than extending the exists() check to each object's .depend.*
file, just enable the hint when when using WITH_FAST_DEPEND.  It fixes
the problem and seems to be safe enough to use since it is mapping SRCS
back to OBJS, rather than letting make make assumptions from OBJS to
SRCS.

A similar check mapping objects to headers is present in some mk files
but was not extended here for FAST_DEPEND since it has not yet been
found to be a problem.

X-MFC-With:	r290433
MFC after:	3 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-11-09 23:37:04 +00:00
..
colldef Merge from head 2015-11-01 21:17:38 +00:00
ctypedef Merge from head 2015-11-01 21:17:38 +00:00
dict Add META_MODE support. 2015-06-13 19:20:56 +00:00
doc Rename the /usr/share/doc/legal files to driver.LICENSE to work around 2015-10-16 00:38:05 +00:00
dtrace Add a little, but very useful script for use with programs that work using an 2015-10-04 00:40:12 +00:00
examples Use more appropriate ${SHAREDIR} rather than /usr/share. 2015-10-27 23:35:02 +00:00
i18n Add more SUBDIR_PARALLEL. 2015-10-15 22:55:08 +00:00
keys Use more appropriate ${SHAREDIR} rather than /usr/share. 2015-10-27 23:35:02 +00:00
locale-links Readd LOCALEDIR definition removed by accident 2015-11-07 11:26:14 +00:00
man Add a manual page for PHOLD() and friends. 2015-11-08 01:41:44 +00:00
me Add META_MODE support. 2015-06-13 19:20:56 +00:00
misc Install myself as src committer. 2015-11-01 16:54:55 +00:00
mk FAST_DEPEND: Fix building of wrong source files in some cases. 2015-11-09 23:37:04 +00:00
monetdef Merge from head 2015-11-01 21:17:38 +00:00
msgdef Merge from head 2015-11-01 21:17:38 +00:00
numericdef Merge from head 2015-11-01 21:17:38 +00:00
security META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
sendmail Use more appropriate ${SHAREDIR} rather than /usr/share. 2015-10-27 23:35:02 +00:00
skel Use more appropriate ${SHAREDIR} rather than /usr/share. 2015-10-27 23:35:02 +00:00
snmp Add META_MODE support. 2015-06-13 19:20:56 +00:00
syscons Add more SUBDIR_PARALLEL. 2015-10-15 22:55:08 +00:00
tabset Add META_MODE support. 2015-06-13 19:20:56 +00:00
termcap Add META_MODE support. 2015-06-13 19:20:56 +00:00
tests Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
timedef Regenerate timedef now that the tools pad CJK correctly 2015-11-09 22:09:38 +00:00
vt Add double size 16x32 VGA ROM font 2015-09-25 02:52:54 +00:00
zoneinfo Install share/zoneinfo in a deterministic way by sorting the results from find 2015-10-17 09:26:16 +00:00
Makefile Merge from head 2015-10-19 11:51:10 +00:00
Makefile.inc