bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #46443] $(warning message) line number incorrect if after TAB


From: Brian Vandenberg
Subject: [bug #46443] $(warning message) line number incorrect if after TAB
Date: Wed, 02 Dec 2015 00:03:41 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; Trident/7.0; rv:11.0) like Gecko

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]