bug-make
[Top][All Lists]
Advanced

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

Re: Operators '=' ‘:=’ ‘::=’ in manual


From: DUDZIAK Krzysztof
Subject: Re: Operators '=' ‘:=’ ‘::=’ in manual
Date: Tue, 15 Dec 2020 11:07:43 +0000

THALES GROUP INTERNAL


If variable is expanded recursively or simply this is determined at variable definition time.
Expansion by itself can take place at the same variable definition time or when deferred at
recipe execution time.
Regardless which of the two mentioned times the expansion takes place it can be conducted
in flat or recursive way (depending on operator used in definition).
This is how in my eyes the manual reads.


From: Paul Smith <psmith@gnu.org>
Sent: Friday, December 11, 2020 7:04 PM
To: DUDZIAK Krzysztof <krzysztof.dudziak@thalesgroup.com>; bug-make@gnu.org <bug-make@gnu.org>
Subject: Re: Operators '=' ‘:=’ ‘::=’ in manual
 
On Thu, 2020-12-10 at 18:40 +0000, DUDZIAK Krzysztof wrote:
> I don't actually dare to use terms "recursive variable" and "simple
> variable" as myself didn't find such in manual. Terms which I found
> read variable expanded recursively variable expanded simply

I still believe these are poor terms.

All variables are "recursively expanded" when they are expanded: that
is, all references to all variables inside the value are expanded, and
all references to all variables inside any of those values are
expanded, etc. recursively.  Expansion happens identically in all
cases.

The difference is not in HOW they are expanded, but rather WHEN they
are expanded.

The term probably was used to refer to one specific difference which is
that recursively expanded variables don't allow you to have self-
referencing; you can't do this:

    FOO = bar $(FOO)

because you'd get "infinite recursion".  That is certainly one
legitimate difference but I don't think it deserves to drive the naming
.  But as I say, these terms have been in the docs since forever so
changing them would need to be done carefully.


THALES GROUP INTERNAL


reply via email to

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