help-make
[Top][All Lists]
Advanced

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

Re: Disambiguating # within commands


From: Trevor Jenkins
Subject: Re: Disambiguating # within commands
Date: Fri, 12 Apr 2002 23:21:39 +0000 (GMT)

On Fri, 12 Apr 2002, Paul D. Smith <address@hidden> wrote:

> %% Trevor Jenkins <address@hidden> writes:
>
>   tj> I'm trying to understand the use of # in makefiles.
>
> Any occurance of a literal "#" in the makefile is considered a comment
> except in the following situations:

> Using backslash to escape the comment character is the official method.
> This is even required by the POSIX standard for make.  If the docs don't
> make this clear, there's a bug there.

Here's all I could find the docs to say:

|* `#' in a line of a makefile starts a "comment".  It and the rest of
|     the line are ignored, except that a trailing backslash not escaped
|     by another backslash will continue the comment across multiple
|     lines.  Comments may appear on any of the lines in the makefile,
|     except within a `define' directive, and perhaps within commands
|     (where the shell decides what is a comment).  A line containing
|     just a comment (with perhaps spaces before it) is effectively
|     blank, and is ignored.

No mention of a backslash there as an escape for the #.  And just to be
certain, in case my version of make is older, I checked the text at
http://www.fsf.org/manual/make/html_node/make_14.html#SEC13 it too does
not mention the escape route either.

Regards, Trevor

British Sign Language is not inarticulate handwaving; it's a living language.
Support the campaign for formal recognition by the British government now!
Details at http://www.fdp.org.uk/ or http://www.bsl-march.co.uk/

-- 

<>< Re: deemed!




reply via email to

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