help-make
[Top][All Lists]
Advanced

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

Re: Silently ignored command line options when assigned (not overrided)


From: Paul Smith
Subject: Re: Silently ignored command line options when assigned (not overrided) in makefile
Date: Tue, 24 Jun 2014 12:53:11 -0400

On Tue, 2014-06-24 at 12:14 +0200, Dawid Gosławski wrote:
> It's not a bug, it's planned and documented. However I want to know how to
> give users some warning about that assignment ? Of course we can declare
> something like that:
> 
> ifdef CFLAGS
> $(warning "CAN NOT OVERRIDE CFLAGS BY COMMAND LINE")
> endif
> 
> on the beginning of the makefile but is there any better option for that ?
> With multilevel structure and a lot of variables that potentially coult be
> overrided make should give any warning when not assigning values as uses
> assumes.

Hi Dawid.  I'm afraid I'm not quite able to follow the situation.

A command-line setting of a variable will always take precedence over an
assignment of that variable in the makefile, unless the makefile
assignment uses the "override" directive.

Are you saying that this is not working for you?

Or are you saying you do not want to allow variables to be overridden in
your environment?

Or do you want to warn users if they do override these variables when
they shouldn't?

Or warn them if they do not override them when they should?




reply via email to

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