help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: please, provide a way to disable non-echoing of '@'-prefixed recipe


From: David Boyce
Subject: Re: please, provide a way to disable non-echoing of '@'-prefixed recipe lines!
Date: Tue, 27 Mar 2018 09:06:52 -0700

Try running "make -s .SHELLFLAGS=-xc ...". Assuming you have a new enough
make (4.x?) this should turn off make verbosity and turn on shell verbosity
resulting in full echoing. As an advanced topic you can implement V=[123]
verbosity levels by setting .SHELLFLAGS as a target-specific variable.

This is in fact how I tend to do it in my makefiles: use .SILENT: to shut
off traditional make verbosity and then employ macros which add -x to
.SHELLFLAGS per target depending on the value of $V.

There are tradeoffs to shell verbosity vs make verbosity: shell verbosity
shows exactly what each recipe is doing which is good but may be more
detailed than you want for very complex recipes. Also shell verbosity
doesn't show redirections well, but I still prefer it for its reliability
and precision.

With an older make you may also need to set SHELL=//bin/sh (note doubled
slash) to force it to use SHELL for all recipes. In newer makes the
.SHELLFLAGS setting is enough.

David

On Tue, Mar 27, 2018 at 7:48 AM, Jason Vas Dias <address@hidden>
wrote:

> This would be my #1 request for a make 'new-feature' :
>   o provide a way of disabling silent rules / make recipe
>      lines starting with '@'  or listed in '.SILENT:' be
>       echoed normally - ie. a
>      '--disable-silent-rules'  command line option to make .
>
> Is there any hope of make ever providing something like
> this ? If not, I think I'm going to have to develop a local
> patch to the make instances I use.
>
> Due to over-use of silent rules and lack of providing a 'V=1'
> mode, it is getting ever more difficult to diagnose building
> problems. Unfortunately, owing to its use in so many other
> ways, one cannot just do "sed -i 's/@//'" on Makefiles, much
> as I'd like to.
>
> Thanks & Best Regards,
> Jason
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-make
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]