Subject: Re: [ANNOUNCEMENT] The pkgsrc-2005Q4 branch
To: None <tech-pkg@pkgsrc.org>
From: None <joerg@britannica.bec.de>
List: tech-pkg
Date: 12/30/2005 23:35:02
On Fri, Dec 30, 2005 at 02:24:36PM -0500, George Georgalis wrote:
>
> I appreciate your allusion to recursion vs self-recursion, which
> is a subtle distinction I'd not considered, that makes the paper's
> applicable focus more clear -- and my understanding of "recursion
> but not self-recursion" less clear.
Well, look at the average BSD makefile in /usr/src, it consists of three
lines (PROG=, SRCS= and .include <bsd.prog.mk>) and are more complicated
if necessary. Now imagine make(1) detects when a recursive instance is
requested and handles that entire internally. It could cache parsed
Makefile under many circumstances, it can schedule jobs more aggressive
(correct dependencies and non-interferences assumed, of course), etc.
It doesn't mean the Makefiles themselves have to be hacked to evil
monster Makefiles with thousands of lines.
The fundamental question is *not* the center of the article (why I
consider it flawed). What differences do you get from a non-recursive
vs. a recursive build infrastructure *especially* for a large scale tree
like a BSD system. We are talking about 90,000 lines of Makefiles, dist
trees not included. If you consider full-tree operations like a world
build, and you have the resources to keep it in memory all the time,
parsing once and building a giantic dependency tree is a perfectly valid
option. It can save a lot of time, esp. if you have interdependencies
and need to run multiple phases in the tree. That's what the article is
aiming at. Now consider the average developer working on a small piece
of the tree, like src/bin/cat. When she starts a build, she certainly
does not want the equivalent of 90,000 lines of Makefiles to be parsed,
a giantic dependency tree to build etc., since she knows which
dependencies she wants to update and when. At least, which *external*
dependencies.
After we have arrived at this two different points of view, the
macroscosmos of the tree build and the microcosmos of the developer, you
naturally start to modularize the tree, either ending up with an
recursive approach (oh wonder why?) or a self-recursive approach where
the tool itself handles the recursion transparently if necessary.
I hope this somewhat longer text explains what I mean. Now consider
pkgsrc as home work :-)
Joerg