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 #8 received at 8665 <at> debbugs.gnu.org (full text, mbox):

From: Jack Kelly <jack <at> jackkelly.name>
To: 8665 <at> debbugs.gnu.org
Subject: Re: bug#8665: automake should offer APIs to honour silent-rules
	verbosity from shell code in Makefiles
Date: Fri, 13 May 2011 08:59:35 +1000
Comments inline, after some snipping.

On Fri, May 13, 2011 at 6:27 AM, Stefano Lattarini
<stefano.lattarini <at> gmail.com> wrote:
> -snip intro-
>
> I thus propose we add an API of this kind.  At first, this might be as
> simple as just defining two proper `AM_V_ECHO' and `AM_Q_ECHO' variables;
> `AM_V_ECHO' should be `echo' when silent rules are in effect, and `:'
> when they are not; viceversa for `AM_Q_ECHO'.
>
> To give a simplified example of what I'm proposing:
>
>  $ cat > Makefile.am <<'END'
>  headers:
>    @... [commands defining a shell variable `$headers']; \
>     $(AM_V_ECHO) "cd somedir && generate-header --flag $$headers"; \
>     $(AM_Q_ECHO) "GEN headers"; \
>     cd somedir && generate-header --flag $$headers

If you're just echoing "GEN headers", is there any reason you can't
use $(AM_V_GEN) here? Maybe we should have a more general method of
declaring silencing variables (like the $(AM_V_GEN), but also the
others that echo 'CC' and friends. Then users who have unconventional
setups can silence things without echoing 'GEN' everywhere.

>  END
>  $ autoreconf ...
>  $ ./configure --disable-silent-rules
>  ...
>  $ make headers
>  cd somedir && generate-header --flag foo.h bar.h baz.h
>  $ make headers V=0
>  GEN headers
>  $ ./configure --enable-silent-rules
>  ...
>  $ make headers
>  GEN headers
>  $ make headers V=1
>  cd somedir && generate-header --flag foo.h bar.h baz.h
>
> Or maybe we could start being more general from the beginning, and define
> a variable `AM_IS_SILENT' (say) that is defined to "yes" when silent rules
> are in effect, and to "no" otherwise.

If you are going to do this, is it sufficient for it to be a variable,
or does it need to be an AM_CONDITIONAL? I'm thinking a variable is
fine.

-- Jack




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

Previous Next


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