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: Greg McGary
Subject: Re: controlled disabling of undefined variable warnings
Date: Mon, 16 Jun 2008 11:18:20 -0700
User-agent: Thunderbird 2.0.0.14 (X11/20080501)

Paul Smith wrote:
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

OK.  I predefined as empty the ones that were really costing me and now the overhead is down to 5% from 200%.  Glad I didn't get involved with ugly hacks to gmake.

G


reply via email to

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