help-make
[Top][All Lists]
Advanced

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

Disambiguating # within commands


From: Trevor Jenkins
Subject: Disambiguating # within commands
Date: Fri, 12 Apr 2002 17:14:09 +0000 (GMT)

I'm trying to understand the use of # in makefiles. The commands I'm need
to manage my project include a literal # as part of the program option.
However, it isn't clear to me when make sees a number sign as a comment
start and when it doesm't.

The info for make says this:

   * `#' in a line of a makefile starts a "comment".  It and the rest of
     the line are ignored, ... Comments may appear ... within commands
     (where the shell decides what is a comment).  ...

The Makefile I'm trying to write is for a Docbook/SGML/DSSSL documentation
project. Thought this would be simple until I came across an option where
I need to use an option like this:

    -d projdir/project-driver.dsl#print

Where a # mark found right about ^ there is vital to the correct operation
of (open)jade. It forms part of the option string.

Whilst trying to understand this I found other confusing examples in the
Makefile for SP where there are variable assignments like this:

INCLUDEFILE = #include <stdio.h>

Where again the # symbol is clearly data rather than introducing a
comment.

In both these anecdotal cases the # sign can't be swapped for something
else. So how can I be certain that make won't see these characters as
commentary and screw up my Makefile? I could follow an empiricist line
and test the current behaviour of make but I require something I rely
upon.

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]