Idea: MAKE_SILENCEWARNINGS variable silences make warnings

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Idea: MAKE_SILENCEWARNINGS variable silences make warnings

David A. Wheeler
Problem:

Make warnings are generally useful, but in special cases they can be spurious.
It'd be nice to be able to control them.

Solution:

Create a new make special variable "MAKE_SILENCEWARNINGS".
By default it is not set (empty). If it's non-empty (true),
then make does not print make warnings.  Make errors are still printed, and
commands (which can generate messages) are unaffected.

It's expected that MAKE_SILENCEWARNINGS would typically be used
as a target-specific or pattern-specific private special variable. E.g.,

weird-thing: MAKE_SILENCEWARNINGS = true

--- David A. Wheeler

_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

Re: Idea: MAKE_SILENCEWARNINGS variable silences make warnings

Paul Smith-20
On Tue, 2019-06-11 at 14:37 -0400, David A. Wheeler wrote:
> Create a new make special variable "MAKE_SILENCEWARNINGS".

I have toyed with an idea like this in my mind.  When I think about it,
I wanted to create a warning infrastructure like the one GCC has, with
command line -W... options, allowing -Wno-... to disable them, and also
a -Werror / -Wno-error option to turn them into fatal errors instead of
warnings.

I was just thinking to use MAKEFLAGS += -W... rather than creating a
new variable.  However maybe there are reasons that's less desirable
(passing these options to recursive invocations?)


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

Re: Idea: MAKE_SILENCEWARNINGS variable silences make warnings

Tim Murphy-4
Wouldn't it be safer to disable specific warnings for specific target(s),  or specific sections of a makefile?


On Tue, 11 Jun 2019 at 19:42, Paul Smith <[hidden email]> wrote:
On Tue, 2019-06-11 at 14:37 -0400, David A. Wheeler wrote:
> Create a new make special variable "MAKE_SILENCEWARNINGS".

I have toyed with an idea like this in my mind.  When I think about it,
I wanted to create a warning infrastructure like the one GCC has, with
command line -W... options, allowing -Wno-... to disable them, and also
a -Werror / -Wno-error option to turn them into fatal errors instead of
warnings.

I was just thinking to use MAKEFLAGS += -W... rather than creating a
new variable.  However maybe there are reasons that's less desirable
(passing these options to recursive invocations?)


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make

_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make