Hi Bob, * Bob Rossi wrote on Thu, Apr 10, 2008 at 03:28:56PM CEST: > I currently have my project setup so that each subdirectory has a > Makefile.am. I've noticed that when I do 'make -j4' that it does 1 > directory at a time, then links a little library or makes a program. > > If I moved everything to a single Makefile.am at the top level, would > that improve the speed of things so that it could continue to build > in parallel?
Typically yes, the other Bob already addressed this. > If it is in fact faster, like I'm imagining it might be, is there any > way to make the "Makefile.am in each subdir" approach be just as fast? I've thought of this, in fact just a couple of weeks ago. It is possible to formulate SUBDIRS rules in a way that allows parallel execution of the sub makes (by something like turning each subdir into a target). However, doing so by default will certainly break lots of existing setups. That's why my current thinking is that it may be possible to introduce a new feature, say, PARALLEL_SUBDIRS = ... which would then show automake that these subdirectories really can do work in parallel. Maybe even get this functionality turned on per-project with an automake option, dunno yet. I haven't thought this through yet. There are some quite subtle issues that users need to be aware of for this to work correctly. > I eventually want to spread my build out over N machines using autotools > and dist-gcc. Do you mean distcc? That should work. Cheers, Ralf