[Top][All Lists]

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

Re: Recursive $(call)

From: Philip Guenther
Subject: Re: Recursive $(call)
Date: Sun, 28 Apr 2002 00:50:22 -0700

"Paul D. Smith" <address@hidden> writes:
>%% Philip Guenther <address@hidden> writes:
>  pg> The only other one which could legitimately benefit would be $(foreach),
>I made a change for $(call ...) which allows the function variable
>(only) to be recursively expanded a large number of times before it
>decides the recursion is infinite, and only when used as the
>user-defined function in a $(call ...) function.  It will be in the next

Sweet!  This should let me simplify the Makefile pieces that build the
project I'm working on.  Now if only GNU make had a tail recursive
'include' directive...

>However, when I went to look at foreach, doing the same there was very
>difficult (with $(call ...) you want to just special-case the
>user-defined function variable, which must be a single variable; with
>$(foreach ...) you want to special-case the body of the loop, which may
>be very complex and consist of a number of variables).
>So, I'm going to leave it as just $(call ...) allowing this.

That's fine.  $(foreach) may be the only other function for which
recursive expansion _could_ sense, but such code would be contrived
compared to the recursive $(call) version, so restricting it to $(call)
seems quite reasonable.

Philip Guenther

reply via email to

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