autoconf
[Top][All Lists]
Advanced

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

Re: project in multiply directories


From: Bob Friesenhahn
Subject: Re: project in multiply directories
Date: Mon, 28 Sep 2009 10:55:27 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Mon, 28 Sep 2009, Alfred M. Szmidt wrote:

  There is an article called "recursive make considered harmful".
  According to it, you should have just one Makefile.am in top level
  with all the rules (all libs etc). By this, make can show its
  strengths best. Often, a Makefile.am "per directory" seems to be
  used, but for a new project today this should be avoided.  It just
  slows things down and leads to unneeded compiler calls.

I'm sorry, but where on earth did you get this terrible information?

A Makefile.am per directory is precisly what should be used, it
doesn't incure any extra compiler calls.  It also makes it easy to
build seperate parts of the tree.

The main advantage of a Makefile per directory is that it makes it easier to request building seperate parts of the tree. Otherwise the approach can waste quite a lot of build performance since each sub-make must stat(2) all off the files required by the Makefile target as well as all of the generated source file dependencies, and there is quite a lot of redundant processing (e.g re-linking) which does not need to occur. A non-recursive build can help avoid depending on archive libraries and "convenience" libraries which often consume quite a bit of the build time.

I have taken a number of large Automake-based projects (C and C++) to non-recursive builds and have not regretted it.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

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