bug-make
[Top][All Lists]
Advanced

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

Re: GNU Make bug exporting environment variables to the "shell" command


From: David Highley
Subject: Re: GNU Make bug exporting environment variables to the "shell" command
Date: Tue, 10 Feb 2015 13:53:46 -0800 (PST)

"Erich Boleyn wrote:"

With a Bourne style shell you can pass what you want to the environment
as done below.

> 
> Summary:
>       Environment variables set in the Makefile do not get inherited
>       into anything run via the "shell" subcommand.
> 
> Tested on GNU Make versions:
>       3.81 (on Ubuntu)
>       4.1 (on FreeBSD)
> 
> Example Makefile contents which can show the bug:
>       export FOO=foo
>       main:
>               echo "$(shell env)"
                FOO=foo echo "$(shell env)"
>               env
> 
> If exporting to the environment functioned properly, you'd expect
> to see 2 "FOO=foo" outputs (one from the "echo", one from the bare
> "env"), but what we observed was that the env printed out as part
> of the "echo" did not contain the "FOO=foo".
> 
> Environment variables from outside the Makefile seem to be inherited
> just fine.
> 
> 
> --
>     Erich Stefan Boleyn   <address@hidden>    http://www.duckytech.com/
> 
> _______________________________________________
> Bug-make mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-make
> 



reply via email to

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