discuss-gnustep
[Top][All Lists]
Advanced

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

Re: non recursive makefiles


From: Richard Frith-Macdonald
Subject: Re: non recursive makefiles
Date: Wed, 12 Jan 2005 14:57:55 +0000


On 12 Jan 2005, at 13:58, MJ Ray wrote:

Nicola Pero <nicola@brainstorm.co.uk> wrote:
Thanks, MJ Ray -- your comments make a good point -- the main problem is that 'make' does not provide you with a full-fledged programming language.

Recursion or not doesn't change that either way. If you have a specific
point about a frequently-necessary feature that requires recursion,
please restate it.

I haven't been paying much attention to this, but I believe subprojects and
modular coding (semi-separate namespaces) were the things mentioned
that recursion is used for.

It's extremely limited and we're already pushing it over the edge. The first obvious objection is that if you remove recursive invocations and
just include everything in the top-level GNUmakefile, then everything
defined in any GNUmakefile included by the top-level execution would be in
the same namespace.

Yes, the subprojects that you use in one project have to be compatible,
but that's already true. Recursion doesn't change that fundamentally
either.  A higher-level makefile can easily pollute the environment
variables in a way that breaks lower levels, can't it? Not isolation
at all. Assuming isolation seems dangerous to me.

Hmm ... my understanding is that during recursion into a directory, certain variables are reset by the makefile system, while the remainder continue to
use their original values.
Seems analagous to a procedure call, where  variables which
are reset can be seen as local to the procedure.
These 'local' variables provide the 'isolation'.

Recursion does allow "dirty" makefile practices to continue longer. Maybe
sometimes recursion would be necessary, but I don't see why it seems to
be the default for so many GNUstep packages. Is it just lack of time to
hack an elegant solution, which is what your message suggests?

I haven't noticed any suggestions as to how one might implement an 'elegant' solution at all. Do you have a description of what an elegant solution might be? My reading of Nicola's postings is that he believes that the current design is the most elegant one possible within the constraints imposed by the 'make' program, and I haven't seen any proposed alternatives which might suggest he's wrong.





reply via email to

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