help-make
[Top][All Lists]
Advanced

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

Re: shell function and $PATH


From: Cristian Morales Vega
Subject: Re: shell function and $PATH
Date: Thu, 17 Dec 2015 13:16:47 +0000

On 17 December 2015 at 12:52, Paul Smith <address@hidden> wrote:
> On Thu, 2015-12-17 at 09:17 +0000, Cristian Morales Vega wrote:
>> When using this Makefile
>>
>> ------------
>> export PATH:=la:$(PATH)
>>
>> $(info $(shell echo $$PATH))
>>
>> all:
>>     @echo $$PATH
>> ------------
>
>> The PATH is not being exported to the shell from $(shell), but it is
>> to the shell used to run the rules.
>
>> I am using make 4.0, from Fedora 23. Is this a bug, or expected? If
>> it's expected... any suggestion about how to solve my pkg-config
>> problem?
>
> I believe there's already a bug in Savannah about this.

You are right -> http://savannah.gnu.org/bugs/?func=detailitem&item_id=35323

> However the workaround is straightforward:
>
>     $(info $(shell PATH=$(PATH); echo $$PATH))

Didn't want to pollute the Makefile. Usually when I find this kind of
problems it's my mistake, not a bug... But since this time it's
actually a bug I will go for it.

Thanks.



reply via email to

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