In Coreutils, which uses --enable-silent-rules by default, I see:

    $ make
      GEN      .version
      GEN      lib/alloca.h
      GEN      lib/arpa/inet.h
      GEN      lib/configmake.h
    if test -n 'gcc'; then \
      /usr/bin/mkdir -p 'lib/crc-tmp' \
      && abs_srcdir=`cd ./lib/. && pwd` \
      && (cd 'lib/crc-tmp' \
          && gcc  -g -O2  -o crc-generate-table 
$abs_srcdir/crc-generate-table.c) \
      && 'lib/crc-tmp/crc-generate-table' ./lib/crc-sliceby8.h-t \
      && rm -rf 'lib/crc-tmp' \
      && mv ./lib/crc-sliceby8.h-t ./lib/crc-sliceby8.h; \
    fi
    GEN      lib/ctype.h

I've applied the attached patch which uses $(AM_V_GEN) like we do for
the header substitutes.

    $ make
      GEN      .version
      GEN      lib/alloca.h
      GEN      lib/arpa/inet.h
      GEN      lib/configmake.h
      GEN      lib/crc-sliceby8.h
      GEN      lib/ctype.h

Collin

>From 539fa8c1d705c63d4e034def4719b0977d8a72a2 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Sun, 12 Jan 2025 22:28:44 -0800
Subject: [PATCH] crc: Respect Automake's silent-rules.

* modules/crc (Makefile.am): Add the $(AM_V_GEN) prefix before the
command.
---
 ChangeLog   | 6 ++++++
 modules/crc | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index b52a2799b9..b884aa202c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-01-12  Collin Funk  <collin.fu...@gmail.com>
+
+	crc: Respect Automake's silent-rules.
+	* modules/crc (Makefile.am): Add the $(AM_V_GEN) prefix before the
+	command.
+
 2025-01-12  Pádraig Brady  <p...@draigbrady.com>
 
 	progname: also set program_invocation_short_name
diff --git a/modules/crc b/modules/crc
index a50fb2051f..9950b8b0b4 100644
--- a/modules/crc
+++ b/modules/crc
@@ -28,7 +28,7 @@ lib_SOURCES += crc.c
 # $(AM_LDFLAGS).  And do the compilation in a temporary directory, where
 # gnulib-generated stdio.h and stdlib.h files are not visible.
 $(srcdir)/crc-sliceby8.h: $(srcdir)/crc-generate-table.c
-	if test -n '$(BUILD_CC)'; then \
+	$(AM_V_GEN)if test -n '$(BUILD_CC)'; then \
 	  $(MKDIR_P) '%reldir%/crc-tmp' \
 	  && abs_srcdir=`cd $(srcdir)/. && pwd` \
 	  && (cd '%reldir%/crc-tmp' \
-- 
2.47.1

Reply via email to