Subject: Re: make readme (pkgsrc)
To: Georges Heinesch <>
From: Frederick Bruckman <>
List: tech-pkg
Date: 05/10/2001 14:03:06
[I'm cc'ing this to tech-pkg, a more appropriate forum. Please
follow-up to tech-pkg.]

On 10 May 2001, Georges Heinesch wrote:

> Is it "normal" that "make readme" inside /usr/pkgsrc takes days (!)
> with a m68 (68060) 50 MHz? I let it run now for than 2 days and
> interrupted it at /usr/pkgsrc/games.

Yes. It's really awful.

> What's so difficult in making README.html files?

If you look in, you'll see that the README.html target,
among other things, invokes the "build-depends-list" and
"run-depends-list" targets, each of which, in turn, is liable to spawn
dozens of "make" processes as it recurses down through the tree.

Consider the case of "gnome-libs", which depends on four other
packages, each of which depends on other packages, and which fulfills
dependencies for many other packages (some indirectly). Everytime a
target makes it way down to "gnome-libs", it has to walk to the roots
of the "gnome-libs" graph, _again_. With "make", that means forking
another process at each turn, which adds up. I don't mean to single
out "gnome-libs", or "gnome" either -- there are lots of packages with
interlocking dependencies.

> How can I make this faster?

Rewrite the whole thing in "awk"? Once you read the dependencies graph
into an associative array, the time it takes to operate on it is very
small, relative to the time it takes to read the Makefiles and
contents of the packages directories and write the output, so besides
the obvious advantage (speed!), we'd be free to put more information
in the pages (perhaps a list of dependencies and build information for
each binary package?). Plus if we lose "make", we'll be free to put
the HTML somewhere else besides the source tree.