help-make
[Top][All Lists]
Advanced

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

Re: commenting a *make* directive that is a *shell* command


From: Robert P. J. Day
Subject: Re: commenting a *make* directive that is a *shell* command
Date: Mon, 13 Feb 2006 10:54:29 -0500 (EST)

On Mon, 13 Feb 2006, Greg Chicares wrote:

> On 2006-2-13 13:50 UTC, Robert P. J. Day wrote:
> >
> > all:
> >     # $(warning whatever)
> >
> >   that command above has a leading tab so, according to the docs, it
> > should be treated as a shell command.  but it's clearly the make
> > warning built-in and, even with that "#", it's processed by make as a
> > warning.  why?
>
> The manual says this of $(error):
> | Note that the error is generated whenever this function is evaluated.
> | So, if you put it inside a command script or on the right side of a
> | recursive variable assignment, it won't be evaluated until later.
> | The text will be expanded before the error is generated.
> and $(warning) works the same way.
>
> Make needs to pass the command
>   # $(warning whatever)
> to the shell; when it does so, it evaluates '$(warning whatever)'.

ah, now i get it.  thanks.

rday




reply via email to

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