help-make
[Top][All Lists]
Advanced

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

Re: quirky inconsistency in stripping whitespace from function args?


From: Robert P. J. Day
Subject: Re: quirky inconsistency in stripping whitespace from function args?
Date: Mon, 14 Feb 2005 09:15:05 -0500 (EST)

On Mon, 14 Feb 2005, Robert P. J. Day wrote:

>   in testing the treatment of whitespace in function calls in make
> 3.80, i've noticed that, in user-defined functions, all whitespace
> (that is, both leading and trailing) appears to be preserved on all of
> the arguments.  thus, if i define a function and call it with
>
>   $(call myfunc,  fred ,  barney)
>                 ^^    ^ ^^
>
> the args that are passed are, respectively
>
>   "  fred "
>   "  barney"
>
>   but from page 64 of the 3rd edition of the o'reilly make book, when
> discussing *built-in* functions, i read:
>
>   "Leading whitespace is trimmed from the first argument, but all
> subsequent arguments include any leading (and, of course, embedded and
> following) whitespace."
>
>   so the only difference in behaviour between user-defined and
> built-in functions is the treatment of the leading whitespace of the
> first argument?  isn't this kind of a subtle inconsistency that might
> trap the unwary?  or am i reading this incorrectly?

um, never mind.  dumb question.

rday




reply via email to

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