Skip to content
aostruszka edited this page Oct 29, 2010 · 6 revisions

This is my attempt to implement a non-recursive make build system. For the motivation Google for the paper "Recursive make considered harmful" by Peter Miller.

I've seen couple of other proposals and decided to have something that will be a blend of nice ideas I have seen plus some improvements. If you actually use this I'd like to hear from you :) - is it useful, does it perform well, do you have any suggestions for the improvements ... and so on. This implementation is based on GNU make and its new features introduced in 3.80. But don't use that version - these features had bugs in that version. Use version 3.81 where everything works OK.

As for the license - I'm not a lawyer, I want you to be able to use this for any purpose as long as you pay the credits due :) - if you modify this it suffice for me to state who is the original author. I guess "MIT Licencse" fits this well.

This skeleton is most useful for larger projects e.g. where your code is split into set of directories/libraries (for simple projects it might be an overkill - I mean it will work fine, with no performance or other problems - you just won't make use of all its features :)).

Before you continue reading you may consider taking a look at the "example" in the repository. I've tried to come up with something that is simple to use for the end user (pay attention to the Rules.{top,mk} files - these are "user makefiles"). There is also fair amount of comments in the makefiles and rather comprehensive Readme.txt. In fact I'm starting to worry that the amount of description might indicate that this system is not that simple after all ... nnnnoooo it is :D. Just bear with me, I'll try to be brief.

Table of Contents

If you decide to give this makefile system a try please let me know. I'm interested in any kind of feedback :) (OK, not any, flames will go to /dev/null).

Known limitations

I've decided to make use of the GNU make features - and only make, there's no need for external scripting that will generate proper makefiles. That means that not only include directive is used (which is supported in other make versions) but also advanced features that come with GNU make 3.80 (like eval). Unfortunately these features are buggy in this version of GNU make so you should use at least version 3.81 (as of writing this there's nothing newer but hopefully the functionality won't get broken :)).

The other limitation has been mentioned in Usage Examples (see Warning section at the end).