Follow-up Comment #2, bug #46443 (project make): I started to go down the path of changing job_next_command and new_job where allocated_variable_expand_for_file gets called, but quickly came to the conclusion that altering file->fileinfo.lineno wasn't the way to go at all.
The simplest approach I've found for fixing this is to change gmk_floc: typedef struct { const char *filenm; unsigned long lineno; + unsigned long offset; } gmk_floc; ... then make the following modifications: job.c, around line 1899: /* Finally, expand the line. */ + cmds->fileinfo.offset = i; lines[i] = allocated_variable_expand_for_file (cmds->command_lines[i], file ); } + cmds->fileinfo.offset = 0; c->command_lines = lines; job.c, around line 2099: } + child->file->cmds->fileinfo.offset = child->command_line; return 1; } Then at the very least change **some** of the following uses of (...)->lineno to add (...)->offset: * job.c, child_error() * job.c, new_job(), during tracing around line 2052 * commands.c, print_commands() * file.c, line 273 in rehash_file() * function.c, line 1712 * variable.c, line 1629 ... and lastly (I think), in read.c and rule.c: change all initializations of "lineno" to also initialize "offset". _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?46443> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make