I'm compiling an autotools C based project and I'm getting some warnings and errors. They are displayed like this:
foo.c:123: warning: some message
I would like them to be displayed like this:
/full/path/to/foo.c:123: warning: some message
I know this is not configurable through gcc except by passing to it the full file path itself, so I guess that this must be configurable through autoconf/automake.
Is this possible? If so, how?
I don't know how to do that and suspect that it cannot be done. BUT if your higher goal is to find the files referenced by the warnings it may be enough to use Emacs:
Open a file in the top source directory, like C-x C-f configure.ac RET
, run the compilation: M-x compile RET
(possibly edit the make
command) RET
. When you see a warning in the compilation buffer, use C-x backtick
(C-x `) to display the source location.
Emacs manages this by parsing the "Entering directory /foo" and "Leaving directory /foo" messages from make
so you may want to emulate that.