[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Confusion over documentation wording, variable usage, and scope
From: |
Philip Guenther |
Subject: |
Re: Confusion over documentation wording, variable usage, and scope |
Date: |
Wed, 21 May 2008 00:07:11 -0600 |
On Tue, May 20, 2008 at 11:39 PM, Paul Smith <address@hidden> 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
- Confusion over documentation wording, variable usage, and scope, Garrett Cooper, 2008/05/19
- Re: Confusion over documentation wording, variable usage, and scope, Paul Smith, 2008/05/19
- Re: Confusion over documentation wording, variable usage, and scope, Garrett Cooper, 2008/05/19
- Re: Confusion over documentation wording, variable usage, and scope, Paul Smith, 2008/05/21
- Re: Confusion over documentation wording, variable usage, and scope,
Philip Guenther <=
- Re: Confusion over documentation wording, variable usage, and scope, Garrett Cooper, 2008/05/21
- Re: Confusion over documentation wording, variable usage, and scope, Garrett Cooper, 2008/05/21
- Re: Confusion over documentation wording, variable usage, and scope, Garrett Cooper, 2008/05/21