help-make
[Top][All Lists]
Advanced

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

Re: AW: Exported vs command line variables


From: Pietro
Subject: Re: AW: Exported vs command line variables
Date: Tue, 20 Sep 2016 12:59:04 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

"Warlich, Christof" <address@hidden> writes:

>> There is no difference between the two. They both declare environment 
>> variables for make.
>
> That's not entirely true, at least not for (admittedly rather ancient) GNU 
> Make V3.81.
> E.g., consider this Makefile:
>
> var := $(shell echo "echo hi" >say_hi.sh; chmod +x say_hi.sh; say_hi.sh)
> all: ; @echo $(var)
>
> Calling make with the PATH environment variable either way yiedls:
>
> $ make PATH=$PATH:.
> /bin/sh: 1: say_hi.sh: not found
>
> $ PATH=$PATH:. make
> hi
>
> I'm not sure though if this is intended behavior or just a bug and if
> a more recent version of GNU Make does the same. But considering that
> GNU Make V3.81 is the standard in e.g. Ubuntu LTS 14.04, it may still
> matter.
>
> Cheers,
>
> Chris
>

Well, actually I am using version 4.1 and I do see the difference, are
you sure it is not working as intended ? I can't find anything on the
manual but I am quite curious.





reply via email to

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