autoconf-patches
[Top][All Lists]
Advanced

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

Re: Why does AS_UNSET export the variable?


From: Ralf Wildenhues
Subject: Re: Why does AS_UNSET export the variable?
Date: Wed, 22 Aug 2007 15:06:21 +0200
User-agent: Mutt/1.5.16 (2007-07-25)

Hi Stepan,

* Stepan Kasal wrote on Wed, Aug 22, 2007 at 02:06:05PM CEST:
>   I noticed that AS_UNSET uses export at the end.  So we have
> 
>       $as_unset ac_configure_args0 ||
>         test "${ac_configure_args0+set}" != set ||
>         { ac_configure_args0=; export ac_configure_args0; }
> 
> I do not think the export makes sense.  When unset is not available
> and the variable is set, it is enough to set the neutralizing value.
> 
> If the variable was not exported, then child processes will not get
> it, which is as good as if it was unset.

Yes.

>  If the variable was exported, the export is redundant.

No, see
<http://www.gnu.org/software/autoconf/manual/html_node/Limitations-of-Builtins.html#index-g_t_0040command_007bexport_007d-1246>
I guess one could run `env' or so to find out whether the variable was
exported before, but its output is not parseable; try
  foo='bar
  baz=bla'; export foo

Cheers,
Ralf




reply via email to

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