title: How to trace Makefile line numbers for troubleshooting?
body: <p>This is related to <a href="https://stackoverflow.com/q/10935560/608639">How to trace Makefile targets for troubleshooting?</a> I'm working on an old PowerMac G5. It is alive because I use it for testing older compilers and big-endian, PowerPC.</p>
  
  <p>I'm trying to determine which line in a makefile is causing <em><code>unexpected EOF while looking for matching ``'</code></em>. Our <a href="https://github.com/weidai11/cryptopp/blob/master/GNUmakefile" rel="nofollow noreferrer">makefile</a> <strike>does not use the backtick</strike> (we added them for testing this issue); and trial/error and guessing is moving too slow for a makefile with 1000's of lines.</p>
  
  <p>When I run make with <code>--debug</code>, it fails to print line numbers:</p>
  
  <pre><code>$ make --debug=a
  GNU Make 3.82
  Built for powerpc-apple-darwin9.8.0
  ...
  
  Reading makefiles...
  Reading makefile `GNUmakefile'...
  bash: -c: line 0: unexpected EOF while looking for matching ``'
  bash: -c: line 1: syntax error: unexpected end of file
  bash: -c: line 0: unexpected EOF while looking for matching ``'
  bash: -c: line 1: syntax error: unexpected end of file
  bash: -c: line 0: unexpected EOF while looking for matching ``'
  bash: -c: line 1: syntax error: unexpected end of file
  bash: -c: line 0: unexpected EOF while looking for matching ``'
  bash: -c: line 1: syntax error: unexpected end of file
  Updating makefiles...
  ...
  </code></pre>
  
  <p><code>make --help</code> does not appear to discuss it:</p>
  
  <pre><code>$ make --help 2&gt;&amp;1 | grep -i line
  $
  </code></pre>
  
  <p>My first question is, how do I tell GNU make to print line numbers?</p>
  
  <p>My second question is, how is a program that has been around as long as make has so lame with respect to debug support?</p>