title: Backtrace for GNU make
body: <p>Is there any way to get GNU make to print a "backtrace" of the targets that led to the command being executed when it fails? I regularly deal with heavily obfuscated makefiles while resolving portability issues building software on a new system, and it seems like this should be an extremely simple thing for make to do that would greatly aid in debugging, but I can't find any way to request it. What I'd like to see is something like:</p>
  
  <pre><code>gcc: error: ...
  make[2]: error: gcc ...
  make[2]: error building target bar
  make[2]: error building dependency bar for target foo
  make[1]: error: make -C subdir
  make[1]: error building target subdir
  make[1]: error building dependency subdir for target all
  ...
  </code></pre>
  
  <p>showing the entire dependency path for how the failed command ended up getting executed.</p>
  
  <p>Is there any way to do this?</p>