Subject: Re: make readme (pkgsrc)
To: Georges Heinesch <firstname.lastname@example.org>
From: Frederick Bruckman <email@example.com>
Date: 05/12/2001 05:55:15
On 12 May 2001, Georges Heinesch wrote:
> Quoting Frederick Bruckman (10-May-01 20:03:06):
> >> What's so difficult in making README.html files?
> > If you look in bsd.pkg.mk, 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.
> If for instance package A forks down to X, Y and Z and package B forks
> down to X and Q, is the readme in X build twice (first by A, then by B
No, the README.html isn't built twice. "build-depends-list" and
"run-depends-list" are run twice.
> If yes, can't this behaviour be disabled?
Easily. Just don't run "make readme". No, really... we want that
information on the web pages. Another way to get it, besides recursing
"makes", would be slurp it all into an array, churn it up, and print
out the whole site at once (with an awk script).
> In other words ... are readmes, which do exist already, created twice
> if the packages structure (forking down) requires so?
I think I answered that. Another thing that makes "make" unsuitable
for this task, is that a package's monolithic README.html file doesn't
only depend on the files in the package -- it depends on the
"Makefiles" in all the (recursive) dependencies. Therefore, "make
readme" must always rebuild the file, even if none of the files in the
package has changed. It checks if the generated file is different from
the old one, and if not, leaves the old one alone, so as not to change
the date stamp unnecessarily. This means that if you run "make
readmes" in a tree that already has README.html's, it takes _longer_
than it does to run it on a clean tree.