GNU bug report logs - #8665
automake should offer APIs to honour silent-rules verbosity from shell code in Makefiles

Previous Next

Package: automake;

Reported by: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Date: Thu, 12 May 2011 20:29:02 UTC

Severity: wishlist

Full log


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

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: 8665 <at> debbugs.gnu.org
Cc: Jack Kelly <jack <at> jackkelly.name>, Automake List <automake <at> gnu.org>
Subject: Re: bug#8665: automake should offer APIs to honour silent-rules
	verbosity from shell code in Makefiles
Date: Sun, 22 Apr 2012 17:05:20 +0200
Reviving and oldish bug report (and CC:ing the Automake list now).

Reference: <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8665>

I wrote:
>
> A relevant excerpt [from the manual]:
>
>  You can add your own variables, so strings of your own choice are shown.
>  The following snippet shows how you would define your own equivalent of
>  AM_V_GEN:
>     pkg_verbose = $(pkg_verbose_$(V))
>     pkg_verbose_ = $(pkg_verbose_$(AM_DEFAULT_VERBOSITY))
>     pkg_verbose_0 = @echo PKG-GEN $@;
>     foo: foo.in
>         (pkg_verbose)cp $(srcdir)/foo.in $@

Jack Kelly replied:
>
> Yes. I think it would be nice to make a Makefile.am declaration or m4
> macro to generate this,

To which I replied:
>
> I agree.  The above idiom seems easy enough to automatize.  I'm not sure
> what the best syntax for this new feature would be, tough.

It could be something as simple as this maybe:

  AM_QUIET_PKG = PKG-GEN

which would output in the generated Makefile.in:

  AM_V_PKG = $(pkg_verbose_ <at> AM_V@)
  am__V_PKG_ = $(pkg_verbose_ <at> AM_DEFAULT_V@)
  am__V_PKG_0 = @echo $(AM_QUIET_PKG) $@;

so that an usage like:

  foo: foo.in
          $(AM_V_PKG)cp $(srcdir)/foo.in $@

in Makefile.am will produce at runtime:

  $ make foo V=0
  PKG-GEN foo

  $ make foo V=1
  cp ./foo.in foo

WDYT?

Regards,
  Stefano




This bug report was last modified 13 years and 66 days ago.

Previous Next


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