help-make
[Top][All Lists]
Advanced

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

Re: Quoting when passing variables via $(MAKE)


From: Ken Smith
Subject: Re: Quoting when passing variables via $(MAKE)
Date: Tue, 31 Jan 2006 14:14:36 -0500
User-agent: mutt-ng/devel-r569 (Linux)

On Tue, Jan 31, 2006 at 05:14:23PM +0000, Greg Chicares wrote:
> In the example below, shouldn't
>   foo='$(foo)'
> with single quotes pass the string
>   $(foo)
> itself, instead of its value?
> 
> $cat pass_options.make
> foo = xyz
> 
> .PHONY: all
> all:
>         $(MAKE) -f receive_options.make foo=$(foo)
>         $(MAKE) -f receive_options.make foo='$(foo)'

Try '$$(foo)'

  Ken Smith

>         $(MAKE) -f receive_options.make foo="$(foo)"
> 
> $cat receive_options.make
> .PHONY: all
> all:
>         echo foo is $(foo)
> 
> $/tmp/make-3.81beta4/make -s -f pass_options.make
> foo is xyz
> foo is xyz
> foo is xyz
> 
> I'm using beta4, but older versions seem to work the same way.
> 
> 
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-make




reply via email to

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