[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug
From: |
Philip Guenther |
Subject: |
Re: Bug |
Date: |
Fri, 21 Aug 2009 10:42:43 -0700 |
On Fri, Aug 21, 2009 at 8:14 AM, Yuri Shtil<address@hidden> wrote:
> Philip Guenther wrote:
>> On Thursday, August 20, 2009, Yuri Shtil <address@hidden> wrote:
>>> It look like the shell function is evaluated even though commented out in
>>> the following code:
>>>
>>> define FUNC
>>> ###FOO := $(shell sleep 10)
>>> endef
...
> What is surprising is that a line segment starting with a hash sign must be
> ignored up to the end of the line, this is the whole purpose of having
> comments in the code.
To quote the info pages:
Within a `define' directive, comments are not ignored during the
definition of the variable, but rather kept intact in the value of
the variable.
So it's not a comment when initially read as part of the 'define'. At
that point you just have a string. When you expand it, make has to
fully expand the contents (including expanding the nested $(shell))
before parsing it. The exception would be if you expanded it using
$(value), but that doesn't work for functions where you want to expand
$1, $2, etc.
Philip Guenther
- Bug, Yuri Shtil, 2009/08/20
- Re: Bug, Philip Guenther, 2009/08/21
- Re: Bug, Yuri Shtil, 2009/08/21
- Re: Bug,
Philip Guenther <=
- Re: Bug, John Calcote, 2009/08/22
- Re: Bug, Philip Guenther, 2009/08/22
- Re: Bug, John Calcote, 2009/08/22
- Re: Bug, Yuri Shtil, 2009/08/23