logo       

Re: Last patch reviewed.: msg#00015

Subject: Re: Last patch reviewed.
Hi Paul,

A few comments, if I may:

Paul Smith <psmith@xxxxxxx> writes:

> For the former, I think we need to allow the syntax $(::var) which
> returns the global value of the variable "var", for consistency.  This
> could be useful in some situations, as well.  Also, I wonder if it would
> be useful to allow variables to be _SET_ using this syntax.  Then you
> could write something like:
>       somefile::VARIABLE = foo
> which is the same thing, syntactically, as:
>       somefile: VARIABLE = foo
> This would be tricky to add into the parser, though, and maybe it's not
> worth it.

Why not change the "get" syntax to be $(somefile: VARIABLE) instead
of $(somefile::VARIABLE)? This way:

1. The "set" syntax is already there.

2. From the backwards-compatibility standpoint, 'somefile: VARIABLE'
   is a very unlikely existing valiable name, more so than
   'somefile::VARIABLE'.

> The only thing I can think that this would allow is to use
> define/enddef with target-specific variables, which is currently not
> straightforward (you have to define a different variable globally, then
> set the target-specific variable to that value).

Yes, it would be great if this is handled properly, e.g.,

somefile: define foo
        @echo one
        @echo two
endef


>
> For the latter (inheritance inhibition), there are a few things.  First,
> I think the name of the token should be changed from "not-inherit" to
> "local".  Naming things in the negative ("I am not this" instead of "I
> am this") is something we want to avoid.

While I agree "not-inherit" is a bad keyword, "local" has a bit
different connotation, as being opposite to "global". And GNU make
already has an opposite to "global" which is "target specific".
Maybe "private"? In this case we can say that a variable is
private to a particular context (global, or target-specific) and is
not "inherited" by other contexts.

> Second, it should be valid to mark even global variables "local",
> for consistency.

Can't ask for a better illustartion of my previous point ;-).

Boris


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    politics.lenini...    audio.emagic.ex...    tex.texinfo.gen...    handhelds.linux...    ietf.sipping/20...    lang.erlang.gen...    cygwin.talk/200...    yellowdog.gener...    mozilla.devel.l...    xfree86.newbie/...    openbsd.ports/2...    db.oracle.devel...    kde.kalyxo.deve...    user-groups.lin...    bbc.cvs/2003-04...    gnu.libtool.bug...    redhat.k12osn/2...    emulators.wine....    freebsd.devel.d...    search.xapian.g...    java.izpack.use...    network.mrtg.us...    windows.total-c...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe