%% Robert Mecklenburg <[EMAIL PROTECTED]> writes: PDS> So. The question is, would it be a good idea for an invocation PDS> of call to "blank out" all the variables (by declaring that PDS> variable with the empty value in the innermost scope before PDS> expanding the function)?
rm> If you're asking my opinion, then "yes". Heh :). Yes, I agree that on the surface it seems reasonable. I was really asking (myself, mostly) whether or not there are hidden gotchas that might cause problems. It turns out that due to make's highly recursive method of expanding variables you can get some surprising results. For example, people wanted to be able to use conditionals within functions, but right now all arguments to the call are expanded up-front so the conditional doesn't work correctly (the arguments in the false branch are always expanded anyway). That seemed easy enough to fix: just change the assignment of $1 et. al. from simple to recursive assignment--but after implementing it I discovered that caused even more problems due to the scoping of variables--you couldn't reliably nest call invocations! Offhand I don't see similar problems with this suggestion, but sometimes you don't notice them until after you try it out :). -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
