bug-make
[Top][All Lists]
Advanced

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

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


From: Stephan Beal
Subject: Re: bug? $(warning)/$(error) evaluated from inside a comment in a 'define'?
Date: Wed, 20 Jun 2007 15:17:02 +0200
User-agent: KMail/1.9.7

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 initial read-in of the makefile, regardless of their 
context. The behaviour does make sense once one learns that define is 
parsed as a literal. That also explains why i can't use if/endif inside 
a define.

> to me it seems exactly the way things should 
> work.  Think of a define as kind of like single-quoted strings in the
> shell: no special characters are evaluated.

Agreed - i hadn't considered defines to be literals.

Thanks again for the detailed explanation!

:)

PS: it might interest some list readers to know that i recently forked a 
copy of O'Reilly's "Managing Projects with GNU Make" and am steadily 
updating it:

  http://www.wanderinghorse.net/computing/make/

If anyone out there is interested in contributing to the book, please 
feel free to get in touch.

-- 
----- address@hidden
http://www.wanderinghorse.net

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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