[PATCH] gprof: enable silent build rules

Mike Frysinger vapier@gentoo.org
Fri Nov 26 04:31:17 GMT 2021


Also add $(AM_V_xxx) to various manual rules in here.
---
 gprof/Makefile.am  | 16 ++++++++--------
 gprof/Makefile.in  | 16 ++++++++--------
 gprof/configure    | 43 +++++++++++++++++++++++++++++++++++++++++--
 gprof/configure.ac |  1 +
 4 files changed, 58 insertions(+), 18 deletions(-)

diff --git a/gprof/Makefile.am b/gprof/Makefile.am
index 5a2670753832..c0acf7e4e733 100644
--- a/gprof/Makefile.am
+++ b/gprof/Makefile.am
@@ -65,7 +65,7 @@ CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
 %.o:%.m
 
 .m.c:
-	awk -f $(srcdir)/gen-c-prog.awk > $@ \
+	$(AM_V_GEN)awk -f $(srcdir)/gen-c-prog.awk > $@ \
 	    FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
 	    FILE=$*.m $<
 
@@ -89,24 +89,24 @@ AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc \
 TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc
 
 config.texi:
-	echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
+	$(AM_V_GEN)echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
 
 # Build the man page from the texinfo file
 # The sed command removes the no-adjust Nroff command so that
 # the man output looks standard.
 gprof.1: $(srcdir)/gprof.texi config.texi
-	touch $@
-	-$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
-	-($(POD2MAN) gprof.pod | \
+	$(AM_V_GEN)touch $@
+	$(AM_V_at)-$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
+	$(AM_V_at)-($(POD2MAN) gprof.pod | \
 	       sed -e '/^.if n .na/d' > $@.T$$$$ && \
 	       mv -f $@.T$$$$ $@) || \
 	       (rm -f $@.T$$$$ && exit 1)
-	rm -f gprof.pod
+	$(AM_V_at)rm -f gprof.pod
 
 html-local: doc/gprof/index.html
 doc/gprof/index.html: gprof.texi $(gprof_TEXINFOS)
-	$(MKDIR_P) doc
-	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+	$(AM_V_at)$(MKDIR_P) doc
+	$(AM_V_GEN)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
 	  --split=node -I$(srcdir) $(srcdir)/gprof.texi -o doc/gprof
 
 MAINTAINERCLEANFILES = gprof.info
diff --git a/gprof/Makefile.in b/gprof/Makefile.in
index 0f766a3660c6..0ad695853e5e 100644
--- a/gprof/Makefile.in
+++ b/gprof/Makefile.in
@@ -1176,7 +1176,7 @@ diststuff: $(BUILT_SOURCES) info $(man_MANS)
 %.o:%.m
 
 .m.c:
-	awk -f $(srcdir)/gen-c-prog.awk > $@ \
+	$(AM_V_GEN)awk -f $(srcdir)/gen-c-prog.awk > $@ \
 	    FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
 	    FILE=$*.m $<
 po/POTFILES.in: @MAINT@ Makefile
@@ -1184,24 +1184,24 @@ po/POTFILES.in: @MAINT@ Makefile
 	  && mv tmp $(srcdir)/po/POTFILES.in
 
 config.texi:
-	echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
+	$(AM_V_GEN)echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
 
 # Build the man page from the texinfo file
 # The sed command removes the no-adjust Nroff command so that
 # the man output looks standard.
 gprof.1: $(srcdir)/gprof.texi config.texi
-	touch $@
-	-$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
-	-($(POD2MAN) gprof.pod | \
+	$(AM_V_GEN)touch $@
+	$(AM_V_at)-$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
+	$(AM_V_at)-($(POD2MAN) gprof.pod | \
 	       sed -e '/^.if n .na/d' > $@.T$$$$ && \
 	       mv -f $@.T$$$$ $@) || \
 	       (rm -f $@.T$$$$ && exit 1)
-	rm -f gprof.pod
+	$(AM_V_at)rm -f gprof.pod
 
 html-local: doc/gprof/index.html
 doc/gprof/index.html: gprof.texi $(gprof_TEXINFOS)
-	$(MKDIR_P) doc
-	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+	$(AM_V_at)$(MKDIR_P) doc
+	$(AM_V_GEN)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
 	  --split=node -I$(srcdir) $(srcdir)/gprof.texi -o doc/gprof
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/gprof/configure b/gprof/configure
index a27f5111144f..8d74f9b22a53 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -2957,6 +2957,45 @@ END
   fi
 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_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
 
 ac_config_headers="$ac_config_headers gconfig.h:gconfig.in"
 
@@ -10559,7 +10598,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10562 "configure"
+#line 10601 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10665,7 +10704,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10668 "configure"
+#line 10707 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/gprof/configure.ac b/gprof/configure.ac
index 25aa108ecf64..af07244e733e 100644
--- a/gprof/configure.ac
+++ b/gprof/configure.ac
@@ -23,6 +23,7 @@ AC_CONFIG_SRCDIR([gprof.c])
 AC_CANONICAL_TARGET([])
 
 AM_INIT_AUTOMAKE
+AM_SILENT_RULES([yes])
 
 dnl For simplicity, we use the BFD configuration file for most
 dnl things.  However, we also need our own configuration file for
-- 
2.33.0



More information about the Binutils mailing list