[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exporting variable to $(shell).
From: |
Sergey Organov |
Subject: |
Re: Exporting variable to $(shell). |
Date: |
Wed, 11 Jan 2017 20:13:33 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Paul Smith <address@hidden> writes:
> On Wed, 2017-01-11 at 19:10 +0300, Sergey Organov wrote:
>> > Some sort of loop detection on variable expansion needs to be
>> > implemented.
>>
>> Can't it rather be solved by exporting variables to the $(shell)
>> unexpanded?
>
> Well, that would be a major difference in the way make works, and
> probably even more off-putting than the current behavior:
>
> FOO = bar
> export BAR = $(FOO)
>
> xx := $(shell echo $$BAR)
>
> would give $(FOO), not bar... confusing, and very un-make-like.
Yeah, sure, but IMHO it's:
- still less confusing than what we have now
- not that confusing if documented from the beginning, as it's local to
$(shell)
- could even be useful, not to care about unneeded expansions
> I don't think I want it to work that way.
Well, then
$(setenv TEST,something else)
(suggested in the bug-tracker) looks good on multiple points,
provided it neither defines nor changes 'TEST' make variable.
-- Sergey