bug-make
[Top][All Lists]
Advanced

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

Re: GNU make troubleshooting


From: Alejandro Colomar
Subject: Re: GNU make troubleshooting
Date: Sun, 27 Aug 2023 15:21:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1

Hi Paul,

On 2023-08-27 15:16, Paul Smith wrote:
> On Sun, 2023-08-27 at 08:51 +0300, Eli Zaretskii wrote:> 
>> Removing @ is not always enough.  Many makefiles nowadays need you to
>> say "make V=1" to override the default verbosity level.  I suggest to
>> mention that.
> 
> What does "V=1" do, that removing the "@" doesn't do?  I'm not familiar
> with any makefile where "V=1" enables "extra" debugging: normally it
> just disables "@".  I would prefer to avoid adding descriptions that
> depend on how specific makefiles are implemented, unless that is also
> described in the GNU Make manual.  Maybe I will add this trick to the
> new "tips" section then that can be discussed here too.
> 

Removing the '@' is not enough.  Consider that someone might be using
.SILENT.  Maybe mention that removing .SILENT: would be necessary, if
it is defined.  Here's what the Linux man-pages makefiles do.

Cheers,
Alex


$ cat share/mk/verbose.mk 
########################################################################
# Copyright 2022, Alejandro Colomar <alx@kernel.org>
# SPDX-License-Identifier: GPL-3.0-or-later
########################################################################


ifndef MAKEFILE_VERBOSE_INCLUDED
MAKEFILE_VERBOSE_INCLUDED := 1


ifdef V
HIDE_ERR :=
else
HIDE_ERR := 2>/dev/null
.SILENT:
endif


endif  # include guard


-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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