tags:

views:

76

answers:

1

Is there a way to have make display the line number where it declares an error? The -d switch doesn't seem to cut it.

Updated: Example output:

Reaping winning child 0x08aa8648 PID 9381  
/bin/sh: Syntax error: "then" unexpected (expecting "fi")
+3  A: 

It gives you the line number by default:

$ make
Makefile:11: *** missing separator.  Stop.

If you are redirecting output into the file, do not forget to redirect stderr then.

Ahh, It's not a make, but sh error. Try to use set -x command to switch the shell in debug mode.

[ctpython]$ set -x
++ pwd
++ kill -STOP 7136
[ctpython]$ make
+ make
Makefile:11: *** missing separator.  Stop.
++ pwd
++ kill -STOP 7136
Elalfer
not it doesn't... could it be because I am executing "shell" commands?
jldupont
Yeah, it's shell. I've updated my post after you added the output.
Elalfer
your update is most helpful... thanks!
jldupont