4

I have been searching stackoverflow, but I failed to find a satisfiable answer to my question.

Miller's paper Recursive Make Considered Harmful is well known in the community. Basically, I have been using the non-recursive make to manage the builds of my projects for many years. So far my experience with non-recursive make has been really positive.

To shed some lights for others, I have been successful building the C++ code base that has about 2 millions lines of code. I was able to manage the dependency correctly. The great thing about non-recursive approach is we can take advantage of the parallel build.

I have proved that the data in this report is consistent with at least 5 large projects. But I have been manually writing/porting the makefiles for the non-recursive make.

As you might imagine, for large projects, this involves a lot of work. Plus, the major challenge has been that it is very hard for new team members to understand/modify/debug the existing makefiles.

So my question is this: does anyone in the community know of any tool/script that can do non-recursive make, but manage the makefiles at higher level of abstraction? I would like to understand if anyone has written some scripts or tools to generate the final non-recursive makefiles from some simple input specs.

Community
  • 1
  • 1
ozox
  • 472
  • 2
  • 11
  • have you looked at cmake? Or does it actually create recursive makefiles? Don't remember, haven't needed to care... – hyde Nov 12 '12 at 14:22
  • I heard cmake many times but haven't looked at it in detail. Now since you mention it, I might just take a look. But given the legacy code we have, I think it's unlikely to move to any other build system but GNU make. Thanks anyways. – ozox Nov 13 '12 at 06:31

1 Answers1

0

I'm just about to read the paper, but it seems that long build times from minor changes are the main issue.

Although build systems in general are awful (I have fantasies of making my own), I have to suggest CMake (as hyde did).

Though not perfect, it is superior to plain make for projects of more than a few files. The scripting language is somewhat ugly, but better than make's. It takes a little getting used to because it abstracts away lots of what you would manually write in make, but I suggest this: http://web.cs.swarthmore.edu/~adanner/tips/cmake.php

Alexander Duchene
  • 1,107
  • 1
  • 11
  • 14