httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: Passing ENV vars to sub-configures
Date Mon, 10 Apr 2000 23:41:16 GMT
pg@sweng.stortek.com wrote:
> 
> In a recent note, Jim Jagielski said:
> 
> > Date: Mon, 10 Apr 2000 17:43:01 -0400 (EDT)
> > 
> > > > One problem with the current configure setup is that env. variables
> > > > used at the top level aren't passed to the lower level configures.
> > > > For example,
> > > > 
> > > >     CC="c89" CFLAGS="-O5" LIBS="-lflurbl" ./configure
> > > > 
> > > This puzzles me.  The construct above places the variables in the
> > > environment.  As environment variables, they should be inherited
> > > by all child processes.
> > 
> > They are placed in the environment but not _exported_.
> > 
> An experiment:
> 
>     pg@sanitas:332$ unset LOCAL GLOBAL
>     pg@sanitas:333$ LOCAL=Local           
>     pg@sanitas:334$ GLOBAL=Global /bin/ksh
>     pg@sanitas:335$ echo $LOCAL $GLOBAL
>     Global
>     pg@sanitas:336$ exit
>     pg@sanitas:337$ echo $LOCAL $GLOBAL   
>     Local
> 
> Looks to me as if they're exported.  Behavior of various shells may
> vary, of course, but I believe exporting in this context is both
> traditional Bourne Shell and POSIX.
> 

You're looking at it wrong.

Do this:

    $ sh
    $ FOOBAR='test'
    $ set
    $ sh
    $ set

you will note that FOOBAR is not around in the 2nd shell. Otherwise,
what is the need for export???

-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
                "Are you suggesting coconuts migrate??"

Mime
View raw message