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/gnulib | |
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/gnulib')
-rw-r--r-- | gdb/gnulib/aclocal.m4 | 27 | ||||
-rw-r--r-- | gdb/gnulib/configure | 18 | ||||
-rw-r--r-- | gdb/gnulib/configure.ac | 2 | ||||
-rw-r--r-- | gdb/gnulib/import/Makefile.in | 32 |
4 files changed, 72 insertions, 7 deletions
diff --git a/gdb/gnulib/aclocal.m4 b/gdb/gnulib/aclocal.m4 index 0b4aa1b..f551841 100644 --- a/gdb/gnulib/aclocal.m4 +++ b/gdb/gnulib/aclocal.m4 @@ -869,6 +869,33 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) +# Copyright (C) 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# (`yes' being less verbose, `no' or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], +[ --enable-silent-rules less verbose build output (undo: `make V=1') + --disable-silent-rules verbose build output (undo: `make V=0')]) +case $enable_silent_rules in +yes) AM_DEFAULT_VERBOSITY=0;; +no) AM_DEFAULT_VERBOSITY=1;; +*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation diff --git a/gdb/gnulib/configure b/gdb/gnulib/configure index 893f942..d5bf01e 100644 --- a/gdb/gnulib/configure +++ b/gdb/gnulib/configure @@ -600,6 +600,8 @@ gl_LIBOBJS LTLIBOBJS LIBOBJS LN_S +AM_BACKSLASH +AM_DEFAULT_VERBOSITY am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -1694,6 +1696,7 @@ enable_option_checking enable_maintainer_mode enable_largefile enable_dependency_tracking +enable_silent_rules ' ac_precious_vars='build_alias host_alias @@ -2327,6 +2330,8 @@ Optional Features: --disable-largefile omit support for large files --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: `make V=1') + --disable-silent-rules verbose build output (undo: `make V=0') Some influential environment variables: CC C compiler command @@ -23980,6 +23985,19 @@ fi +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in +yes) AM_DEFAULT_VERBOSITY=0;; +no) AM_DEFAULT_VERBOSITY=1;; +*) AM_DEFAULT_VERBOSITY=0;; +esac +AM_BACKSLASH='\' + + # --------------------- # # Checks for programs. # # --------------------- # diff --git a/gdb/gnulib/configure.ac b/gdb/gnulib/configure.ac index 1be2152..3d70b23 100644 --- a/gdb/gnulib/configure.ac +++ b/gdb/gnulib/configure.ac @@ -37,6 +37,8 @@ gl_INIT # its Makefile.in. AM_INIT_AUTOMAKE(libgnu, UNUSED-VERSION, [no-define]) +AM_SILENT_RULES([yes]) + # --------------------- # # Checks for programs. # # --------------------- # diff --git a/gdb/gnulib/import/Makefile.in b/gdb/gnulib/import/Makefile.in index fbaa140..7706e8b 100644 --- a/gdb/gnulib/import/Makefile.in +++ b/gdb/gnulib/import/Makefile.in @@ -193,6 +193,12 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ libgnu_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am_libgnu_a_OBJECTS = cloexec.$(OBJEXT) dirname-lgpl.$(OBJEXT) \ @@ -212,8 +218,17 @@ am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) DIST_SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -263,6 +278,7 @@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ @@ -1484,9 +1500,9 @@ $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) - -rm -f libgnu.a - $(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD) - $(RANLIB) libgnu.a + $(AM_V_at)-rm -f libgnu.a + $(AM_V_AR)$(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD) + $(AM_V_at)$(RANLIB) libgnu.a clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @@ -1591,15 +1607,17 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` |