make-alpha
[Top][All Lists]
Advanced

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

Re: controlled disabling of undefined variable warnings


From: Paul Smith
Subject: Re: controlled disabling of undefined variable warnings
Date: Mon, 16 Jun 2008 08:41:29 -0400

On Sat, 2008-06-14 at 12:53 -0700, Greg McGary wrote:
>     $(expand VARNAME)
>         expands as $(VARNAME) if VARNAME is defined
>         expands as the empty string if VARNAME is undefined, but
> without undefined variable warnings.
> 
> "expand" is a rather bland name without distinction, though compact.
> Better might be: $(expand-without-warnings ...) or $(maybe-expand ...)
> 
> What do you think?  If I submitted a patch for this, would you add it
> to the next release?

To be honest, I don't like it much.  If your variables are automatically
generated anyway can't you just have an $(eval ...) that assigns all the
variables you think you need to the empty string, so that they're
defined?

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.us
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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