Wed 02 Dec 2015 12:41:55 AM UTC, comment #3:
A minor correction to my last comment:
The change in job.c around line 2099 should be to add the line:
child->file->cmds->fileinfo.offset = child->command_line - 1;
With the changes I've outlined I see correct line numbers with this makefile:
.RECIPEPREFIX := >
TARGETS := 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
all: ${TARGETS}
> $(warning in $@, line 6)
> @true
> $(warning in $@, line 8)
> @true
> @true
> $(warning in $@, line 11)
> @true
> @true
> @true
> @-false
${TARGETS}:
> @-sleep $$(expr ${@} % 3)
> @-false
> @-false
> @-false
> $(warning in $@, line 22)
> $(warning in $@, line 23)
> $(warning in $@, line 24)
> @-false
> @-false
> @-false
I executed this with various combinations of -jN and didn't see the wrong line number reported:
~ gmake -f /tmp/makefile -j10 |& grep -P 'makefile:(\d+):., line (?!\1)|makefile:(?!15|18|19|20|21|25|26|27).failed'
|