Comments inline, after some snipping. On Fri, May 13, 2011 at 6:27 AM, Stefano Lattarini <stefano.lattar...@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