automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[automake-commit] branch master updated: automake: silent make output fo


From: Karl Berry
Subject: [automake-commit] branch master updated: automake: silent make output for custom link commands.
Date: Thu, 15 Jul 2021 21:37:18 -0400

This is an automated email from the git hooks/post-receive script.

karl pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=57688bd5efd21b8a1f9de8f534798dc2cc8894ac

The following commit(s) were added to refs/heads/master by this push:
     new 57688bd  automake: silent make output for custom link commands.
57688bd is described below

commit 57688bd5efd21b8a1f9de8f534798dc2cc8894ac
Author: Nick Gasson <nick@nickg.me.uk>
AuthorDate: Thu Jul 15 18:37:09 2021 -0700

    automake: silent make output for custom link commands.
    
    Patch posted:
    https://lists.gnu.org/archive/html/automake-patches/2021-07/msg00010.html
    
    * bin/automake.in (define_per_target_linker_variable): Use
    AM_V_${target}_LINK if defined as the verbose variable name for
    custom link commands.
    * doc/automake.texi (Program and Library Variables): Document the new
    variable.
    * t/link_override.sh: Add extra checks for silent make rules.
    * NEWS: Mention this.
    * THANKS: new contributor.
---
 NEWS               | 4 +++-
 THANKS             | 1 +
 bin/automake.in    | 8 ++++++--
 doc/automake.texi  | 3 +++
 t/link_override.sh | 7 +++++++
 5 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 09ade1c..d67cbe9 100644
--- a/NEWS
+++ b/NEWS
@@ -18,7 +18,9 @@ New in ?.?.?:
 
   - CTAGS, ETAGS, SCOPE variables can be set via configure.
 
-  - new option "no-dist-built-sources" skips generating $(BUILT_SOURCES)
+  - Silent make output for custom link commands.
+
+  - New option "no-dist-built-sources" skips generating $(BUILT_SOURCES)
   before building the tarball as part of "make dist", that is,
   omits the dependency of $(distdir): $(BUILT_SOURCES).
 
diff --git a/THANKS b/THANKS
index 25222f6..3aa9902 100644
--- a/THANKS
+++ b/THANKS
@@ -300,6 +300,7 @@ Nelson H. F. Beebe              beebe@math.utah.edu
 Nicholas Wourms                 nwourms@netscape.net
 Nick Bowler                     nbowler@elliptictech.com
 Nick Brown                      brownn@brocade.com
+Nick Gasson                     nick@nickg.me.uk
 Nicola Fontana                  ntd@entidi.it
 Nicolas Joly                    njoly@pasteur.fr
 Nicolas Thiery                  nthiery@Icare.mines.edu
diff --git a/bin/automake.in b/bin/automake.in
index f6ebe30..f04f5d5 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -6360,8 +6360,12 @@ sub define_per_target_linker_variable
   my ($linker, $target) = @_;
 
   # If the user wrote a custom link command, we don't define ours.
-  return "${target}_LINK"
-    if set_seen "${target}_LINK";
+  my $custom_link = "${target}_LINK";
+  if (set_seen ($custom_link))
+    {
+      my $verbose = $custom_link if var (verbose_var ($custom_link));
+      return ($custom_link, $verbose);
+    }
 
   my $xlink = $linker ? $linker : 'LINK';
 
diff --git a/doc/automake.texi b/doc/automake.texi
index dd932dd..0a0da61 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -5903,6 +5903,9 @@ and used by Automake due to the use of per-target link 
flags such as
 @code{_CFLAGS}, @code{_LDFLAGS} or @code{_LIBTOOLFLAGS}, in cases where
 they apply.
 
+If the variable @code{AM_V_*_LINK} exists, it is used to output a
+status line in silent mode; otherwise, @code{AM_V_GEN} is used.
+
 @item maude_CCASFLAGS
 @itemx maude_CFLAGS
 @itemx maude_CPPFLAGS
diff --git a/t/link_override.sh b/t/link_override.sh
index 1ac45fc..81787af 100644
--- a/t/link_override.sh
+++ b/t/link_override.sh
@@ -27,6 +27,8 @@ bin_PROGRAMS = foo bar baz boo
 foo_LINK = $(LINK)
 bar_LINK = $(LINK)
 bar_LDFLAGS = $(AM_LDFLAGS)
+baz_LINK = $(LINK)
+AM_V_baz_LINK = xyz
 END
 
 $ACLOCAL
@@ -41,4 +43,9 @@ grep '.\$(LINK).*foo' Makefile.in && exit 1
 grep '^ *bar_LINK *=.*bar_LDFLAGS' Makefile.in && exit 1
 grep '.\$(bar_LINK).*bar' Makefile.in
 
+# Silent make rules should use AM_V_GEN unless overriden.
+grep '.\$(AM_V_GEN)\$(foo_LINK)' Makefile.in
+grep '.\$(AM_V_baz_LINK)\$(baz_LINK)' Makefile.in
+grep '.\$(AM_V_GEN)\$(baz_LINK)' Makefile.in && exit 1
+
 exit 0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]