help-make
[Top][All Lists]
Advanced

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

Re: Turning warning into errors


From: Duane Griffin
Subject: Re: Turning warning into errors
Date: Fri, 3 May 2019 11:40:35 +1200

Hi Sébastien,

I've not heard of that tool, but it sounds useful.

Unfortunately we now use cmake internally, but a while ago I wrote
some GNU makefile code to perform some checks like this for our rather
complex GNU make-based build system of the time. See the attached
file; it should still work and the undefined variables test is
hopefully relatively straight-forward and self-explanatory. You will
obviously need to adjust the targets in the check_undefined_vars
recipe as may be appropriate for your project. Note also the self-test
code, which should verify that the check actually works.

It also does several other checks which are probably not relevant to
you, but which I can explain if you are interested. Otherwise just
delete all the code unrelated to check_undefined_vars.

Cheers,
Duane.

On Fri, May 3, 2019 at 12:18 AM Sébastien Hinderer
<address@hidden> wrote:
>
> Dear all,
>
> We recently noticed a few undefined variables in our makefiles.
> We would like to use --warn-undefined-variables to track them, e.g. on
> our CI infrastructure, but we find it problematic that the warning can
> not be turned into an error.
>
> Am I correct that there is currently no way to achieve this and, if so,
> am I correct that it is a deliberate choice not to provide this featur?
> In that case I'd be curious about why this has been decided.
>
> Is there any other known approach to deal with this?
>
> In particular, has somebody ever tried
> https://github.com/mrtazz/checkmake
> ?
>
> Many thanks in advance for any help,
>
> Sébastien.
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-make



-- 
"I never could learn to drink that blood and call it wine" - Bob Dylan

Attachment: Check.mk
Description: Text Data


reply via email to

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