Get make to show line number on error

I have a makefile in which ldflag is missing. I know how to fix this, but I don’t know which line in the makefile is generated with an error.

+ make
  CCLD   test
test-test.o: In function `write_png':
/home/lenovo/scratch/libass/test/test.c:52: undefined reference to `png_create_write_struct'
...
/home/lenovo/scratch/libass/test/test.c:57: undefined reference to `png_destroy_write_struct'
collect2: ld returned 1 exit status
make: *** [test] Error 1

How do I get make to print the line that contains the error?

(If anyone is interested, this is the makefile from the libass project in the test directory.)

+5
source share
1 answer

Try using remakeit to see if it helps.

http://static.usenix.org/events/lisa11/tech/full_papers/Bernstein.pdf

Here is an example from the link above:

enter image description here

Hope this helps!

+5
source

All Articles