[Cmake] Non recursive makefiles

Vivek Rajan vrajan at magic-earth.com
Fri, 30 Jan 2004 15:42:22 -0600


Hi Bill,

Thanks very much for the reply.

The paper doesn't give suggestions for handling large projects using 
non-recursive makefiles. But I've written non-recursive makefiles for 
very large projects and it does scale pretty well (at least on the 
platforms  that I've used - Linux, IRIX, OS X and Sun). Non-recursive 
makefiles are not necessarily one large file - it can be implemented as 
a file that recursively includes other files. It's also possible to 
build individual subdirectories. I'm more than willing to share the 
information on how this is done.

Thanks for pointing me to the right place in the code. I'll take a look 
and see if I can put one together.

-- Vivek

On Jan 30, 2004, at 2:44 PM, William A. Hoffman wrote:

> Right now there is no way to create non-recursive makefiles.
> We have some plans to create non-recursive makefiles.  However,
> I am not sure one large makefile will scale for larger projects.
> We have had problems with make on various systems and large files, or
> too many dependencies.  We have seen that problem even with the
> recursive make that we use.  So, I don't really agree with the paper
> on that point.   If you are interested in trying a non-recursive
> generator, I could point you at the right places in the code.
> It would involve creating new class like 
> cmLocalUnixMakefileGenerator.cxx.
>
> However, since cmake is creating the makefiles for you, many of the 
> disadvantages
> of recursive make are avoided, for example you should not have to debug
> the makefiles or even think about how they work.   There are other 
> examples
> of things in that paper that cmake fixes for you as well.
>
> -Bill
>
>
> At 02:24 PM 1/30/2004, Vivek Rajan wrote:
>
>> Hi Cmake users,
>>
>> I currently use GNU makefiles for my projects and they port easily to 
>> most unix platforms. But that's not the case with Visual Studio / 
>> Windows. So I'm looking at moving my projects over to use CMake.
>>
>> I've started looking at CMake and the makefiles generated by it are 
>> recursive makefiles. Now, non-recursive makefiles are considered to 
>> better than recursive ones. And the reasons why they are better is 
>> explained in the paper "Recursive Make Considered Harmful".
>> http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html
>>
>> So my question is, is there a way to generate non-recursive makefiles 
>> using CMake or is there a way to extended CMake to do this?
>>
>> Thanks,
>> -- Vivek
>>
>> _______________________________________________
>> Cmake mailing list
>> Cmake at www.cmake.org
>> http://www.cmake.org/mailman/listinfo/cmake
>