help-make
[Top][All Lists]
Advanced

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

Re: .RECIPEPREFIX


From: Paul Smith
Subject: Re: .RECIPEPREFIX
Date: Tue, 12 Apr 2011 13:09:57 -0400

On Tue, 2011-04-12 at 14:31 +0430, ali hagigat wrote:
> I think that the explanation of .RECIPEPREFIX in the make manual misses some
> cases. If I use white spaces before the first letter of the value of that
> variable, what will be our prefix character? Like:
> .RECIPEPREFIX=        n

.RECIPEPREFIX is a variable, and it follows exactly the same rules for
assignment as any other variable.  Like any variable, whitespace between
the "=" and the first non-whitespace character is ignored.

> What happnes if .RECIPEPREFIX is set to some white spaces(like the space
> character). or a <tab> charcter and then some other characters.

The manual says:

.RECIPEPREFIX
        The first character of the value of this variable is used as the
        character make assumes is introducing a recipe line.
        
So, the first character in the value is used; the rest are ignored.

> If .RECIPEPREFIX is set by = behaves the same as :=?

If the value is constant then it doesn't matter.

It looks like there is a bug, though, if you try to set .RECIPEPREFIX to
a variable value.  For example this:

        FOO = >
        .RECIPEPREFIX = $(FOO)

sets the recipe prefix character to "$", not ">".  But if you use this:

        FOO = >
        .RECIPEPREFIX := $(FOO)

it works as expected (setting the prefix to ">").




reply via email to

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