Re: project in multiply directories

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

 



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
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux