> From: Simon Kitching [mailto:[EMAIL PROTECTED] > > On Fri, 2005-07-15 at 08:19 +0200, Juergen Hermann wrote: > > On Thu, 14 Jul 2005 17:45:13 -0700, Alexey N. Solofnenko wrote: > > > > >It is quite possible. With make it is usually one file at a time > > >compilation. ANT is smart enough to request a build for several files > > >ata time. > > > > BTW, it sounds as if ccache and/or distributed compiling (ccdist I > > think) is a better solution for hiren's problem. > > Agreed. Building large c/c++ systems is a problem that has been solved > many times before Ant was invented. > > In fact, the major improvements are to be found by correctly structuring > the source code to avoid unnecessary dependencies rather than applying > any special "silver bullet" build tool. In the end, any build tool like > make/ant is simply invoking the same underlying compiler. That's where > the bottleneck generally is rather than in the build tool, and the fix > is by reducing unnecessary includes, using opaque types, etc. > > Or by brute force using distributed builds to build on multiple machines > concurrently as Juergen mentions. > > Or via a bigger build machine :). > > [NB: I hadn't heard of ccache - thanks for the info.]
I can't disagree with what's been said so far, but using an intelligent build tool is a lot easier than to restructure a large body of code to have better compartmentalization, with narrower interfaces between its sub-system. Ant-Contrib's <cc> task (a.k.a. CppTasks), but doing accurate dependency analysis and caching it, can provide a significant boost for incremental compilation. The only complaint I have with <cc> is that it takes over too much to generate the command line, so some things can't easily be done, and it difficult to use pre-processing commands like lint or purify, etc... But beside this it's excellent, if you understand its bid process to know which compiler compiles which file. In this regard, it's a bit subtle and thus error prone. So it doesn't make a full build faster, it makes possible a reliable and usually quite fast incremental build. Of course, like it was said this problem was solved many times before. Electric Cloud has a nice commercial offering to solve it for example, and ccdist also works fine (we even use it for a particular app), but if you have a mix of Java/C/C++, <cc> makes a lot of sense. For a pure C/C++ project, A-A-P (by the creator of VIM, Python based) or any other project (there are Ruby based ones I think) is probably better. Boost has it's own modified JAM stuff I think. I'd recommend the A-A-P page comparing many many different build tools has a good starting point to investigate build systems. --DD --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]