diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2018-03-16 16:06:23 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2018-03-16 16:30:25 -0400 |
commit | 39be3c7e98728df57cfddd37fb7747f1339a319b (patch) | |
tree | 4b4e7ecde12deb8986d87a71d37903d3216483cd /gdb/silent-rules.mk | |
parent | 37e136b1684929df204ddd09c38978c705fa7228 (diff) | |
download | gdb-39be3c7e98728df57cfddd37fb7747f1339a319b.zip gdb-39be3c7e98728df57cfddd37fb7747f1339a319b.tar.gz gdb-39be3c7e98728df57cfddd37fb7747f1339a319b.tar.bz2 |
Add silent Makefile rules
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.
gdb/ChangeLog:
* silent-rules.mk: New.
* Makefile.in: Include silent-rules.mk
(srcdir, VPATH, top_srcdir): Move up.
(COMPILE): Add ECHO_CXX.
(test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
(init.c): Add ECHO_INIT_C.
(gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
(version.c): Add ECHO_GEN.
(printcmd.o): Add ECHO_CXX.
(target-float.o): Add ECHO_CXX.
(ada-exp.o): Add ECHO_CXX.
(stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
(insight$(EXEEXT)): Add ECHO_CXXLD.
* gnulib/configure.ac: Add AM_SILENT_RULES.
* gnulib/aclocal.m4: Re-generate.
* gnulib/configure: Re-generate.
* gnulib/import/Makefile.in: Re-generate.
gdb/gdbserver/ChangeLog:
* Makefile.in: Include silent-rules.mk.
(srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
(COMPILE): Add ECHO_CXX.
(gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
(gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
(version-generated.c): Add ECHO_GEN.
(stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
(IPAGENT_COMPILE): Add ECHO_CXX.
(%-generated.c): Add ECHO_REGDAT.
Diffstat (limited to 'gdb/silent-rules.mk')
-rw-r--r-- | gdb/silent-rules.mk | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/silent-rules.mk b/gdb/silent-rules.mk new file mode 100644 index 0000000..803dbda --- /dev/null +++ b/gdb/silent-rules.mk @@ -0,0 +1,14 @@ +# If V is undefined or V=0 is specified, use the silent/verbose/compact mode. +V ?= 0 +ifeq ($(V),0) +ECHO_CXX = @echo " CXX $@"; +ECHO_CXXLD = @echo " CXXLD $@"; +ECHO_REGDAT = @echo " REGDAT $@"; +ECHO_GEN = @echo " GEN $@"; +ECHO_GEN_XML_BUILTIN = \ + @echo " GEN xml-builtin.c"; +ECHO_GEN_XML_BUILTIN_GENERATED = \ + @echo " GEN xml-builtin-generated.c"; +ECHO_INIT_C = echo " GEN init.c" || +SILENCE = @ +endif |