help-make
[Top][All Lists]
Advanced

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

Re: Confusion over documentation wording, variable usage, and scope


From: Garrett Cooper
Subject: Re: Confusion over documentation wording, variable usage, and scope
Date: Wed, 21 May 2008 09:15:14 -0700

On Tue, May 20, 2008 at 11:07 PM, Philip Guenther <address@hidden> wrote:
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

Yes, which I understand. What I can't see is another way around solving this issue though with pattern rules (I'm aiming for the former, not the latter)... I am hoping (crosses fingers) that a recursive include will solve a lot of the complexity and make things more understandable / manageable.

I'll snip out the sections of code and apply them simply to help illustrate what I need.

-Garrett

reply via email to

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