[PATCH] Add silent Makefile rules

Simon Marchi simon.marchi@ericsson.com
Fri Mar 2 20:25:00 GMT 2018


On 2018-03-02 03:20 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
> 
> Many projects (e.g. the Linux kernel) and build systems use "silent"
> rules, which means that they'll only print a summary of what's being
> done instead of printing all the detailed command lines.  While chatting
> on the #gdb IRC channel, I realized a few people (including me) thought
> it would be nice to have it in GDB too.
> 
> The idea is that too much text is not useful, the important information
> gets lost.  If there's only the essential information, it's more likely
> to be useful.  Most of the time, when I look at the build output, it's
> to see how it's progressing.  By just printing a brief summary of each
> operation, I can easily spot what's currently being compiled and
> therefore how the build progresses (with time you know the order in
> which files are compiled almost by heart).
> 
> As with other projects (Linux, automake-based things, probably others),
> it's possible to print the complete command lines by passing V=1 to make
> (or any other non-zero value).
> 
> I had one hesitation about this: when people report build failures, we
> are more likely to miss the full compile command line.  We'll probably
> sometimes need to ask people to include the build log with "make V=1".
> I don't think it's a big downside, if other projects the size of the
> Linux kernel can live with it, I'm sure we can too.

I realized it might be useful to include an example of the resulting
output.  Here's a what a gdb/gdbserver build looks like:

https://pastebin.com/raw/CsqMfi0Q

The gnulib/libiberty builds are still verbose, but we have no control
over that (until we contribute a silent mode to those projects too).

Simon



More information about the Gdb-patches mailing list