GNU bug report logs - #32868
Check if make supports nested variables is done twice when using silent rules

Previous Next

Package: automake;

Reported by: bug-automake <at> gnu.org, Jacob Kroon <jacob.kroon <at> gmail.com>

Date: Fri, 28 Sep 2018 20:37:02 UTC

Severity: minor

Tags: confirmed

Done: Mike Frysinger <vapier <at> gentoo.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32868 in the body.
You can then email your comments to 32868 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#32868; Package automake. (Fri, 28 Sep 2018 20:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to bug-automake <at> gnu.org, Jacob Kroon <jacob.kroon <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Fri, 28 Sep 2018 20:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Jacob Kroon <jacob.kroon <at> gmail.com>, bug-autoconf <at> gnu.org,
 bug-automake <at> gnu.org
Subject: Re: Check if make supports nested variables is done twice when using
 silent rules
Date: Fri, 28 Sep 2018 15:36:40 -0500
On 9/28/18 1:47 PM, Jacob Kroon wrote:
> Hi,
> 
> If I use AM_SILENT_RULES([yes]) in my configure.ac, when I run the
> configure scripts I see this:
> ...
> checking whether make supports nested variables... yes
> checking whether make supports nested variables... (cached) yes
> ...
> 
> If I remove AM_SILENT_RULES, the test is only done once.
> 
> Is this intended behaviour ?

I don't know. But AM_SILENT_RULES is supplied by automake, not autoconf, 
so it's better to ask your question on the correct list.  I've gone 
ahead and updated the CC's accordingly.

> 
> I'm on an updated Debian Stretch system using (Debian version syntax):
> autoconf 2.69-10
> automake 1:1.15-6
> 
> Regards Jacob
> 
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




Severity set to 'minor' from 'normal' Request was from Mike Frysinger <vapier <at> gentoo.org> to control <at> debbugs.gnu.org. (Sun, 20 Feb 2022 20:17:01 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Mike Frysinger <vapier <at> gentoo.org> to control <at> debbugs.gnu.org. (Sun, 20 Feb 2022 20:17:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#32868; Package automake. (Sun, 20 Feb 2022 20:31:01 GMT) Full text and rfc822 format available.

Message #12 received at 32868 <at> debbugs.gnu.org (full text, mbox):

From: Mike Frysinger <vapier <at> gentoo.org>
To: Jacob Kroon <jacob.kroon <at> gmail.com>
Cc: 32868 <at> debbugs.gnu.org
Subject: Re: Check if make supports nested variables is done twice when using
 silent rules
Date: Sun, 20 Feb 2022 15:30:33 -0500
[Message part 1 (text/plain, inline)]
On 28 Sep 2018 20:47, Jacob Kroon wrote:
> If I use AM_SILENT_RULES([yes]) in my configure.ac, when I run the
> configure scripts I see this:
> ...
> checking whether make supports nested variables... yes
> checking whether make supports nested variables... (cached) yes
> ...
> 
> If I remove AM_SILENT_RULES, the test is only done once.
> 
> Is this intended behaviour ?

it's because of how silent rules are integrated.  AM_INIT_AUTOMAKE has:
	AC_REQUIRE([AM_SILENT_RULES])
which makes the silent rules framework always available.

but if you want to opt-in to silent-by-default, you have to call that
same macro:
	AM_SILENT_RULES([yes])

and then all the logic is expanded twice, not just that autoconf check.

we could refactor AM_SILENT_RULES internally to minimize the amount of
duplicated logic (just setup AM_DEFAULT_VERBOSITY and related vars).

but i've also always found this config interface to be weird.  most
automake options are controlled by AM_INIT_AUTOMAKE, except for this.
the original implementation had a "silent-rules" option, but that set
whether the logic was included, not the default yes/no.  with automake
1.13, this option was turned into a no-op since it's always enabled.
i'm inclined to bring this back as the way to opt-in to silent-rules
by default.  that would address by not needing multiple calls to the
AM_SILENT_RULES macro in the first place.
-mike
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-automake <at> gnu.org:
bug#32868; Package automake. (Sun, 20 Feb 2022 21:29:02 GMT) Full text and rfc822 format available.

Message #15 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Zack Weinberg" <zack <at> owlfolio.org>
To: bug-automake <at> gnu.org
Subject: Re: bug#32868: Check if make supports nested variables is done twice
 when using silent rules
Date: Sun, 20 Feb 2022 16:27:40 -0500
> i'm inclined to bring this back as the way to opt-in to silent-rules
> by default.

And I’m still absolutely opposed to making it even *possible* to have silent rules be on by default. In fact I’d like to see —enable-silent-rules removed, with make V=0 the *only* way to switch to silent mode.




Information forwarded to bug-automake <at> gnu.org:
bug#32868; Package automake. (Mon, 21 Feb 2022 00:15:02 GMT) Full text and rfc822 format available.

Message #18 received at 32868 <at> debbugs.gnu.org (full text, mbox):

From: Mike Frysinger <vapier <at> gentoo.org>
To: 32868 <at> debbugs.gnu.org
Subject: [PATCH] m4: rework silent-rules macros to avoid double expansion
Date: Sun, 20 Feb 2022 19:14:00 -0500
Fixes automake bug https://bugs.gnu.org/32868.

The AM_SILENT_RULES macro defines all the silent-rules related setup.
It's also called by users to change the default verbosity level.  This
leads to a quirk where automake calls it, expands the full context,
and then users call it, and it's fully expanded again.

Instead, let's rename AM_SILENT_RULES to _AM_SILENT_RULES and move the
initialization logic to late in the configure stage.  This allows the
user-centric AM_SILENT_RULES call to expand into a single line to set
the default verbosity.

* m4/init.m4: Switch to _AM_SILENT_RULES.
* m4/silent.m4: Rename AM_SILENT_RULES to _AM_SILENT_RULES.  Delay
evaluation of AM_SILENT_RULES to the end.  Change AM_SILENT_RULES to
only define AM_SILENT_RULES.
---
 m4/init.m4   |  2 +-
 m4/silent.m4 | 48 +++++++++++++++++++++++++++++-------------------
 2 files changed, 30 insertions(+), 20 deletions(-)

diff --git a/m4/init.m4 b/m4/init.m4
index f3abf66c6e96..f3c7845bca70 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -134,7 +134,7 @@ if test -z "$CSCOPE"; then
 fi
 AC_SUBST([CSCOPE])
 
-AC_REQUIRE([AM_SILENT_RULES])dnl
+AC_REQUIRE([_AM_SILENT_RULES])dnl
 dnl The testsuite driver may need to know about EXEEXT, so add the
 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
diff --git a/m4/silent.m4 b/m4/silent.m4
index b1502ed389b6..9b3c7a6a017b 100644
--- a/m4/silent.m4
+++ b/m4/silent.m4
@@ -5,12 +5,12 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# 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], [dnl
+# _AM_SILENT_RULES
+# ----------------
+# Enable less verbose build rules support.
+AC_DEFUN([_AM_SILENT_RULES],
+[AM_DEFAULT_VERBOSITY=0
+AC_ARG_ENABLE([silent-rules], [dnl
 AS_HELP_STRING(
   [--enable-silent-rules],
   [less verbose build output (undo: "make V=1")])
@@ -18,11 +18,6 @@ AS_HELP_STRING(
   [--disable-silent-rules],
   [verbose build output (undo: "make V=0")])dnl
 ])
-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
 dnl
 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
 dnl do not support nested variable expansions.
@@ -41,14 +36,6 @@ am__doit:
 else
   am_cv_make_support_nested_variables=no
 fi])
-if test $am_cv_make_support_nested_variables = yes; then
-  dnl Using '$V' instead of '$(V)' breaks IRIX make.
-  AM_V='$(V)'
-  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
-  AM_V=$AM_DEFAULT_VERBOSITY
-  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
 AC_SUBST([AM_V])dnl
 AM_SUBST_NOTMAKE([AM_V])dnl
 AC_SUBST([AM_DEFAULT_V])dnl
@@ -57,4 +44,27 @@ AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 AM_BACKSLASH='\'
 AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls
+dnl to AM_SILENT_RULES to change the default value.
+AC_CONFIG_COMMANDS_PRE([dnl
+case $enable_silent_rules in @%:@ (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+esac
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using '$V' instead of '$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+])dnl
 ])
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or
+# empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])])
-- 
2.34.1





Information forwarded to bug-automake <at> gnu.org:
bug#32868; Package automake. (Mon, 21 Feb 2022 00:16:01 GMT) Full text and rfc822 format available.

Message #21 received at 32868 <at> debbugs.gnu.org (full text, mbox):

From: Mike Frysinger <vapier <at> gentoo.org>
To: Zack Weinberg <zack <at> owlfolio.org>
Cc: 32868 <at> debbugs.gnu.org
Subject: Re: bug#32868: Check if make supports nested variables is done twice
 when using silent rules
Date: Sun, 20 Feb 2022 19:15:48 -0500
[Message part 1 (text/plain, inline)]
On 20 Feb 2022 16:27, Zack Weinberg wrote:
> > i'm inclined to bring this back as the way to opt-in to silent-rules
> > by default.
> 
> And I’m still absolutely opposed to making it even *possible* to have silent rules be on by default. In fact I’d like to see —enable-silent-rules removed, with make V=0 the *only* way to switch to silent mode.

please don't derail threads
-mike
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-automake <at> gnu.org:
bug#32868; Package automake. (Mon, 21 Feb 2022 00:29:01 GMT) Full text and rfc822 format available.

Message #24 received at 32868 <at> debbugs.gnu.org (full text, mbox):

From: Mike Frysinger <vapier <at> gentoo.org>
To: 32868 <at> debbugs.gnu.org
Subject: Re: bug#32868: [PATCH] m4: rework silent-rules macros to avoid
 double expansion
Date: Sun, 20 Feb 2022 19:28:01 -0500
[Message part 1 (text/plain, inline)]
On 20 Feb 2022 19:14, Mike Frysinger wrote:
> --- a/m4/silent.m4
> +++ b/m4/silent.m4
> @@ -5,12 +5,12 @@
>  # gives unlimited permission to copy and/or distribute it,
>  # with or without modifications, as long as this notice is preserved.
>  
> -# 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], [dnl
> +# _AM_SILENT_RULES
> +# ----------------
> +# Enable less verbose build rules support.
> +AC_DEFUN([_AM_SILENT_RULES],
> +[AM_DEFAULT_VERBOSITY=0

this should be 1 instead of 0.  the silent-vs-verbose is kind of a double
negative, so i flipped it before testing.  i've fix it locally.
-mike
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-automake <at> gnu.org:
bug#32868; Package automake. (Mon, 28 Feb 2022 02:02:01 GMT) Full text and rfc822 format available.

Message #27 received at 32868 <at> debbugs.gnu.org (full text, mbox):

From: Mike Frysinger <vapier <at> gentoo.org>
To: 32868 <at> debbugs.gnu.org
Subject: [PATCH v2] m4: rework silent-rules macros to avoid double expansion
Date: Sun, 27 Feb 2022 21:01:35 -0500
Fixes automake bug https://bugs.gnu.org/32868.

The AM_SILENT_RULES macro defines all the silent-rules related setup.
It's also called by users to change the default verbosity level.  This
leads to a quirk where automake calls it, expands the full context,
and then users call it, and it's fully expanded again.

Instead, let's rename AM_SILENT_RULES to _AM_SILENT_RULES and move the
initialization logic to late in the configure stage.  This allows the
user-centric AM_SILENT_RULES call to expand into a single line to set
the default verbosity.

* m4/init.m4: Switch to _AM_SILENT_RULES.
* m4/silent.m4: Rename AM_SILENT_RULES to _AM_SILENT_RULES.  Delay
evaluation of AM_SILENT_RULES to the end.  Define new AM_SILENT_RULES to
set default rules verbosity.
* t/silent-defaults.sh: New tests.
* t/list-of-tests.mk: Add t/silent-defaults.sh.
---
v2
- fix default handling when AM_SILENT_RULES is called before AM_INIT_AUTOMAKE.

 m4/init.m4           |   2 +-
 m4/silent.m4         |  49 ++++++++-----
 t/list-of-tests.mk   |   1 +
 t/silent-defaults.sh | 164 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 196 insertions(+), 20 deletions(-)
 create mode 100644 t/silent-defaults.sh

diff --git a/m4/init.m4 b/m4/init.m4
index f3abf66c6e96..f3c7845bca70 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -134,7 +134,7 @@ if test -z "$CSCOPE"; then
 fi
 AC_SUBST([CSCOPE])
 
-AC_REQUIRE([AM_SILENT_RULES])dnl
+AC_REQUIRE([_AM_SILENT_RULES])dnl
 dnl The testsuite driver may need to know about EXEEXT, so add the
 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
diff --git a/m4/silent.m4 b/m4/silent.m4
index b1502ed389b6..d19c56e8ac3b 100644
--- a/m4/silent.m4
+++ b/m4/silent.m4
@@ -5,12 +5,12 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# 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], [dnl
+# _AM_SILENT_RULES
+# ----------------
+# Enable less verbose build rules support.
+AC_DEFUN([_AM_SILENT_RULES],
+[AM_DEFAULT_VERBOSITY=1
+AC_ARG_ENABLE([silent-rules], [dnl
 AS_HELP_STRING(
   [--enable-silent-rules],
   [less verbose build output (undo: "make V=1")])
@@ -18,11 +18,6 @@ AS_HELP_STRING(
   [--disable-silent-rules],
   [verbose build output (undo: "make V=0")])dnl
 ])
-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
 dnl
 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
 dnl do not support nested variable expansions.
@@ -41,14 +36,6 @@ am__doit:
 else
   am_cv_make_support_nested_variables=no
 fi])
-if test $am_cv_make_support_nested_variables = yes; then
-  dnl Using '$V' instead of '$(V)' breaks IRIX make.
-  AM_V='$(V)'
-  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
-  AM_V=$AM_DEFAULT_VERBOSITY
-  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
 AC_SUBST([AM_V])dnl
 AM_SUBST_NOTMAKE([AM_V])dnl
 AC_SUBST([AM_DEFAULT_V])dnl
@@ -57,4 +44,28 @@ AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 AM_BACKSLASH='\'
 AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls
+dnl to AM_SILENT_RULES to change the default value.
+AC_CONFIG_COMMANDS_PRE([dnl
+case $enable_silent_rules in @%:@ (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+esac
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using '$V' instead of '$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+])dnl
 ])
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or
+# empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_REQUIRE([_AM_SILENT_RULES])
+AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])])
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index d959b68db47b..dbfd8d6d1145 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -1015,6 +1015,7 @@ t/sanity.sh \
 t/seenc.sh \
 t/silent-c.sh \
 t/silent-cxx.sh \
+t/silent-defaults.sh \
 t/silent-lt.sh \
 t/silent-f77.sh \
 t/silent-f90.sh \
diff --git a/t/silent-defaults.sh b/t/silent-defaults.sh
new file mode 100644
index 000000000000..c4cdee548911
--- /dev/null
+++ b/t/silent-defaults.sh
@@ -0,0 +1,164 @@
+#!/bin/sh
+# Copyright (C) 2022 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+# Check verbose mode defaults and behavior.
+
+. test-init.sh
+
+: > Makefile.am
+
+# Default behavior is currently verbose.
+cat <<EOF >configure.ac
+AC_INIT([silent-defaults], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+EOF
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure -C
+grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
+
+./configure -C --enable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
+
+./configure -C --disable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
+
+# User doesn't pick a silent mode default before AM_INIT_AUTOMAKE.
+cat <<EOF >configure.ac
+AC_INIT([silent-defaults], [1.0])
+AM_SILENT_RULES
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+EOF
+
+$AUTOCONF
+
+./configure -C
+grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
+
+./configure -C --enable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
+
+./configure -C --disable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
+
+# User disables silent mode default before AM_INIT_AUTOMAKE.
+cat <<EOF >configure.ac
+AC_INIT([silent-defaults], [1.0])
+AM_SILENT_RULES([no])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+EOF
+
+$AUTOCONF
+
+./configure -C
+grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
+
+./configure -C --enable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
+
+./configure -C --disable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
+
+# User enables silent mode default before AM_INIT_AUTOMAKE.
+cat <<EOF >configure.ac
+AC_INIT([silent-defaults], [1.0])
+AM_SILENT_RULES([yes])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+EOF
+
+$AUTOCONF
+
+./configure -C
+grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
+
+./configure -C --enable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
+
+./configure -C --disable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
+
+# User doesn't pick a silent mode default after AM_INIT_AUTOMAKE.
+cat <<EOF >configure.ac
+AC_INIT([silent-defaults], [1.0])
+AM_INIT_AUTOMAKE
+AM_SILENT_RULES
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+EOF
+
+$AUTOCONF
+
+./configure -C
+grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
+
+./configure -C --enable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
+
+./configure -C --disable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
+
+# User disables silent mode default after AM_INIT_AUTOMAKE.
+cat <<EOF >configure.ac
+AC_INIT([silent-defaults], [1.0])
+AM_INIT_AUTOMAKE
+AM_SILENT_RULES([no])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+EOF
+
+$AUTOCONF
+
+./configure -C
+grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
+
+./configure -C --enable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
+
+./configure -C --disable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
+
+# User enables silent mode default after AM_INIT_AUTOMAKE.
+cat <<EOF >configure.ac
+AC_INIT([silent-defaults], [1.0])
+AM_INIT_AUTOMAKE
+AM_SILENT_RULES([yes])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+EOF
+
+$AUTOCONF
+
+./configure -C
+grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
+
+./configure -C --enable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
+
+./configure -C --disable-silent-rules
+grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
+
+:
-- 
2.34.1





Information forwarded to bug-automake <at> gnu.org:
bug#32868; Package automake. (Mon, 28 Feb 2022 23:00:02 GMT) Full text and rfc822 format available.

Message #30 received at 32868 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: vapier <at> gentoo.org
Cc: 32868 <at> debbugs.gnu.org
Subject: Re: bug#32868: [PATCH v2] m4: rework silent-rules macros to avoid
 double expansion
Date: Mon, 28 Feb 2022 15:58:48 -0700
    Fixes automake bug https://bugs.gnu.org/32868.

Looks fine to me.

    +./configure -C
    +grep '^AM_DEFAULT_VERBOSITY = 1' Makefile

Good :).

I remain steadfastly opposed to (ever) changing the default to be silent
rules, as we've already discussed ad nauseam :). --thanks, karl.




Reply sent to Mike Frysinger <vapier <at> gentoo.org>:
You have taken responsibility. (Tue, 01 Mar 2022 06:53:02 GMT) Full text and rfc822 format available.

Notification sent to bug-automake <at> gnu.org, Jacob Kroon <jacob.kroon <at> gmail.com>:
bug acknowledged by developer. (Tue, 01 Mar 2022 06:53:02 GMT) Full text and rfc822 format available.

Message #35 received at 32868-done <at> debbugs.gnu.org (full text, mbox):

From: Mike Frysinger <vapier <at> gentoo.org>
To: Karl Berry <karl <at> freefriends.org>
Cc: 32868-done <at> debbugs.gnu.org
Subject: Re: bug#32868: [PATCH v2] m4: rework silent-rules macros to avoid
 double expansion
Date: Tue, 1 Mar 2022 01:52:07 -0500
[Message part 1 (text/plain, inline)]
On 28 Feb 2022 15:58, Karl Berry wrote:
>     Fixes automake bug https://bugs.gnu.org/32868.
> 
> Looks fine to me.
> 
>     +./configure -C
>     +grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
> 
> Good :).
> 
> I remain steadfastly opposed to (ever) changing the default to be silent
> rules, as we've already discussed ad nauseam :).

we shall see :p
-mike
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 29 Mar 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.