On Tue, May 20, 2008 at 11:39 PM, Paul Smith <[EMAIL PROTECTED]> wrote: > On Mon, 2008-05-19 at 09:53 -0700, Garrett Cooper wrote: ... >> This would mean that I'm looking for dynamic targets and target- >> specific variables, if I'm not incorrect. > > There are lots of ways in make to get dynamic targets without using > $(eval ...). For example, pattern rules etc. $(eval ...) is > unquestionably the most powerful one, but it's also the trickiest to > understand and use.
I'll second this. I actually suspect that the presence of $(eval) has had a net *negative* effect on the readability of the makefiles out there, because people use it when it's not necessary and in ways that are *more* complicated than the alternative(s). People aren't as familiar and comfortable with the declarative style of programming as they are with the procedural style, so $(eval) gets used to micromanage make. The second error (IMO) is when $(eval) is used to solve some icky naming or matching-up problem that could be more cleanly solved by simply renaming files or making the source tree better reflect the relationships. Using $(eval) to simplify by abstracting a set of rules or assignments is a Good Thing. Using it to perpetuate complexity or work against the language is a Bad Thing. ...or at least that's the impression I get from my personal experiences and helping people on this list... Philip Guenther _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
