Is there a way to get Make to be silent when it does nothing, but have its normal verbosity when something is made? I want to use Make in a frequent cron job (every 1/2 hour, perhaps 10 minutes) but I don't want to get a bunch of emails telling me nothing was done (which will be most of the time). I just want to know when it found something to do.
On Sun, Sep 19, 2010 at 6:58 PM, Kenneth Porter <shiva at sewingwitch.com> wrote:> Is there a way to get Make to be silent when it does nothing, but have its > normal verbosity when something is made?You can write a wrapper script and run it in a subshell to capture the output. Pretend echo is make: a=$(echo 'made something') # no output if echo $a | grep 'made something' > /dev/null; then echo $a fi HTH, -- Chad
On 09/19/10 6:58 PM, Kenneth Porter wrote:> Is there a way to get Make to be silent when it does nothing, but have its > normal verbosity when something is made? > > I want to use Make in a frequent cron job (every 1/2 hour, perhaps 10 > minutes) but I don't want to get a bunch of emails telling me nothing was > done (which will be most of the time). I just want to know when it found > something to do.you could run `make -q`, then if it returns a non-zero status, run `make` like... make -q || make