[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Enhancing automake support for silent-rules
From: |
Darren Garvey |
Subject: |
Enhancing automake support for silent-rules |
Date: |
Fri, 7 Jun 2013 14:55:37 +0100 |
Hi all,
I've been trying to make a large automake-generated project I work on build
quieter. While there is some support for "silent-rules", there are several
places where automake templates* don't silence themselves, which I'd like
to rectify.
I have made several changes locally which helps a lot and I'd like to
prepare a patch. Since I've not hacked on automake before I may need some
guidance on conventions as not all of them are obvious to me.
To make a rule conditionally silent, I use $(AM_V_at) in _my_ projects, but
automake sources itself have %SILENT% which seems to be equivalent, IIUC.
Is %SILENT% preferred?
The HACKING file says:
> * For install and uninstall rules, if a loop is required, it should be
> silent. Then the body of the loop itself should print each "important"
> command it runs. The printed commands should be preceded by a single
> space.
This means there are several places in the templates that have a long
multi-line rule that is itself silent, but includes one or more "echo"s.
One idea was to define a local function such as:
am_echo() { echo "$@" >/dev/null; }
and then define $(AM_V_echo) that conditionally used either "echo" or
"am_echo". This feels a bit ugly but it should be minimally intrusive.
Perhaps there's a more canonical way to do this using some existing
automake feature. I imagine anyone working on the silent-rules support may
have already thought about this and may have a superior alternative
suggestion....
Cheers,
Darren
* I'm calling the files under lib/am/ templates.
- Enhancing automake support for silent-rules,
Darren Garvey <=