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

Re: autoconf help?

Christian Reiniger wrote:

> >Do they use recursive Makefiles? With Quadra, a not-so-big project,
> You mean having many makefiles in many subdirectories, called recursively
> (instead of having everything in one toplevel makefile)?
> Yes. LibGGI consists of tons of little sublibs, each in its own
> sub(sub-)directory.
> Managing all this via a single makefile would be a nightmare.

No, it is surprisingly easier than it seems. But it *is* different and
it *is* harder than simple recursive Makefiles. But it pays off a
million times!

> >using non-recursive Makefiles cut the compile time in half easily. On an
> >even bigger project (particularly if you have many subdirectories), the
> >payoff should be even worthier (it make 5 minutes into a bit over 2
> >minutes for me, if it turns 60 minutes into 25-30 minutes, pretty
> >interesting pay off).
> Interesting indeed. But I wonder why this is the case - make itself doesn't
> do that much compared to the compiler...

Parse, parse, parse the makefiles! And again! Compile your project with
"make -d" once and take a look at how many stat() make has to do. And it
has to do them many times very often, because of the recursive

Not to mention the time spend going into directories where there is
nothing to be done (with no less parsing or stat()ing required, of

I heard of a project to change the Makefiles of Mozilla to non-recursive
ones, and they were compiling the lizard in something like 30% of the
time on the same machine! 70% savings!

Of course, if you have plentiful free time, don't bother... ;-)

Pierre Phaneuf
Systems Exorcist

To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk