Wednesday, July 2, 2008

A replacement for Make

Bzr and Hg interesting but client wants Perforce so am moving client's repository from Clearcase to Perforce. Code base (mostly) written in C++ to run on various platforms including **nx and Win.

I'm taking this opportunity to see if build system could be improved.

First requirement is to replace Clearmake. Looked very closely at SCons and was about to make (pun!) it the build tool for new repository when I discovered an article about Makepp (awful name, sounds like a pre-schooler discussing urination), i.e. Make++ => MakePlusPlus => Makepp. My one major misgiving about SCons is that it is written in Python and although I like Python I don't have the years of experience in Python that I have in Perl. Makepp is written in Perl!. SCons even uses (a limited selection of) Python commands as its scripting language. Makepp OTOH uses GNU Make syntax for most of its scripting language but with the ability to insert Perl code when needed. Not sure if Make syntax is of much benefit to me. I haven't used anything but the simplest Make scripts for years. That's what is for! But, like SCons, Makepp has some pretty intelligent default behaviour. It works out what language the source is in, looks for any required include files, knows the useful options for a host of compilers etc. etc. And, doesn't suffer from Make's recursion problem.

Makepp, again like SCons, has another very useful feature: the ability to correctly track intermediate files. One of the urgent problems, to me at least, with our existing build system is that it does a "clean" build every time. Nothing is kept from previous builds. I suspect this was not intended initially but is a consequence of how Clearmake/Make are being used. No wonder faulty branches are being checked in. I wouldn't wait 5 hours to confirm a build either if I were a developer. I'd much rather leave it to the overnight run and clean up the mess in the morning. So, hopefully, with quicker builds there will be less faulty code checked in.

Anyway, from my initial investigations, it looks like Makepp is the way to go.

No comments: