help-make
[Top][All Lists]
Advanced

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

Re: Multiple expansion works in rules, but not in actions


From: Greg Chicares
Subject: Re: Multiple expansion works in rules, but not in actions
Date: Mon, 29 Oct 2007 19:08:44 +0000
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)

On 2007-10-29 17:00Z, Alexander Kriegisch wrote:
> 
> FOO:=bla
> 
> $(FOO):
>       @echo "## $(FOO) ##"
> 
> FOO:=
> 
> The target name $(FOO) is expanded to "bla", but $(FOO) is expanded to
> nothing inside the action. I studied the manual of GNU make 3.81, but
> found no explanation for this effect. Can you point me to the section I
> should read in order to unserstand how changing values affect actions?

This section may help, especially the "Rule Definition" part
at the bottom:

http://www.gnu.org/software/make/manual/html_node/Reading-Makefiles.html#Reading-Makefiles

but probably a more useful answer is to suggest

$(FOO):
        @echo "## $@ ##"

which does what I suspect you want.




reply via email to

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