[Top][All Lists]

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

Re: export vs $(origin )

From: Jan Beulich
Subject: Re: export vs $(origin )
Date: Thu, 2 Jul 2020 17:16:44 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 02.07.2020 17:01, Dmitry Goncharov wrote:
> On Thu, Jul 2, 2020 at 8:49 AM Jan Beulich <jbeulich@suse.com> wrote:
>> is it really intended for "export"
>> without any assignment done at the same time to change the origin of a
>> previously undefined variable from "undefined" to "file"?
> "export" without any assignment done at the same time sets the origin
> to "environment".
> export wom
> introduces the variable to the env and set origin to environment.

Not according to my observations.

> export wom=
> also assigns the value of the variable and sets the origin to "file".
>> It doesn't
>> change "default" to "file" for a variable with a default value, for
>> comparison.
> export CC=
> sets origin to "file" because a new value from the file is assigned.
> export CC
> keeps origin intact because the value does not change.
>> As to the use case - to be able to determine whether a variable has
>> been given a non-default value, and for such a check to be independent
>> of whether
>> - -R was passed to make
>> - export lives ahead or after the check
>> a change in behavior would seem to be needed, as such a check can,
>> afaict, only sensibly check for "undefined" and "default".
> Can you post a sample makefile which demonstrates what you want to achieve?

I can try to; will take a little bit of time though.


reply via email to

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