%% Philip Guenther <[EMAIL PROTECTED]> writes: pg> Unfortunately, the restriction on recursive macros not referencing pg> themselves includes references via $(call). I would argue that pg> GNU make should not try to protect someone from themself if the pg> write a recursive $(call). Yes, you can trivially write infinite pg> loops if it's allowed, but the increase in expressiveness is pg> substantial.
>> OK, I buy this argument. As a test I removed the restriction on >> recursive variable definitions and (with the above fix) your example >> did work as you intended. Neat. >> However, I think the restriction is valid for normal variable >> expansions, and most if not all builtin functions. Are there any >> other builtins you think would benefit from loosening this >> restriction? 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 release. 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. Thanks. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://www.paulandlesley.org/gmake/ "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make