Re: bug? $(warning)/$(error) evaluated from inside a comment in a 'define'?

2007-06-20 Thread Stephan Beal
On Wednesday 20 June 2007, Paul Smith wrote: > the variable being defined. In fact nothing is parsed inside a > define. I'm not sure, from your message, if this is what you feel is > the surprising behavior; Right - that's what surprised me. i assumed that comments were skipped during the init

Re: bug? $(warning)/$(error) evaluated from inside a comment in a 'define'?

2007-06-20 Thread Stephan Beal
On Wednesday 20 June 2007, Philip Guenther wrote: > On 6/19/07, Stephan Beal <[EMAIL PROTECTED]> wrote: > Okay, so you've defined a variable, 'bogo', whose value consists of > two lines, the first of which has a '#' as its first non-whitespace > character. It isn't a comment at that point, it's ju

Re: bug? $(warning)/$(error) evaluated from inside a comment in a 'define'?

2007-06-20 Thread Paul Smith
On Tue, 2007-06-19 at 20:50 +0200, Stephan Beal wrote: > When a $(warning) or $(error) is inside a 'define', it is evaluated > even if it is part of a comment. Others have responded with all the info but I'm not sure everyone understood it. There are two factors at work here. First, note that ma

Re: bug? $(warning)/$(error) evaluated from inside a comment in a 'define'?

2007-06-20 Thread Sam Ravnborg
On Tue, Jun 19, 2007 at 08:50:32PM +0200, Stephan Beal wrote: > Hi, Makers! > > i just discovered a Make behaviour which really surprises me. While that > in itself is nothing new ;), this one certainly violates the principal > of least astonishment: > > When a $(warning) or $(error) is inside

Re: bug? $(warning)/$(error) evaluated from inside a comment in a 'define'?

2007-06-19 Thread Philip Guenther
On 6/19/07, Agent Zhang <[EMAIL PROTECTED]> wrote: ... I think the test case to demonstrate this bug can be simplified as: define bogo # $(warning this should not happen) endef all: $(bogo) And make produces $ make -f a.mk a.mk:5: this should not happen # Yeah, it's really funny.

Re: bug? $(warning)/$(error) evaluated from inside a comment in a 'define'?

2007-06-19 Thread Philip Guenther
On 6/19/07, Stephan Beal <[EMAIL PROTECTED]> wrote: ... When a $(warning) or $(error) is inside a 'define', it is evaluated even if it is part of a comment. The above statement is nonsensical. If something is inside a define, is not inside a comment. define bogo # $(warning this should no

Re: bug? $(warning)/$(error) evaluated from inside a comment in a 'define'?

2007-06-19 Thread Agent Zhang
On 6/20/07, Stephan Beal <[EMAIL PROTECTED]> wrote: When a $(warning) or $(error) is inside a 'define', it is evaluated even if it is part of a comment. A demonstration: I think the test case to demonstrate this bug can be simplified as: define bogo # $(warning this should not happen) endef

bug? $(warning)/$(error) evaluated from inside a comment in a 'define'?

2007-06-19 Thread Stephan Beal
Hi, Makers! i just discovered a Make behaviour which really surprises me. While that in itself is nothing new ;), this one certainly violates the principal of least astonishment: When a $(warning) or $(error) is inside a 'define', it is evaluated even if it is part of a comment. A demonstratio