[erlang-questions] Parallel Make in OTP

Martin Scholl ms@REDACTED
Thu Dec 17 16:55:36 CET 2009


Hello all,


Peter-Henry Mander wrote:
> Hi Gentlepeople,
> 
> There's a thread on erlang-bugs list discussing "Recursive Make
> Considered Harmful" [1] Which inspired me while I struggled with
> parallel make in our T-Build system in T-Mobile [2]. Despite the lack
> of activity on Code.Google.Com, I actively maintain T-Build in house.
> 
> I want to put my oar in and respectfully ask not to ditch Gnu Make in
> OTP. It's a much maligned beast with an ugly syntax, but it's a
> phenomenally powerful one. Other build tools just don't cut it. Having
> make --jobs fail on the OTP build is an itch I yearn to scratch for a
> long time.
Actually, I'd like to be a heretic here and proclaim: there is a better
build tool: CMake[1].
I know the pros and cons of having another build-dependency for Erlang,
but I can state, CMake is serving us really well on our Erlang-based
projects so far. It is fast, almost declarative like make,
cross-plattform, etc. -- and it is really easy and straight-forward to
manage a project with a structure like current otp-codebase.
Given a suitable set of macros, building a Erlang application can be
easy as this:

ERL_ADD_PROJECT(AppName Version DEPS <dependent applications>)
ERL_BUILD(AppName <ErlSourceFiles>)

ERL_ADD_PROJECT would then generate the .rel-file for you, ERL_BUILD
would build it and upon installation time, install your app into
<AppName>-<Version>, etc.

Furthermore, CMake would make it really easy, to extend the erlang
code-base with your own custom inhouse applications. You would simply
start coding in otp/lib/<AppName>, and your code gets automagically
included into the build set without writing any line of CMake code.

Given the distributed nature of Git, this could be really helpful.
Testing your code with the latest erlang version, supporting multiple
erlang versions, etc. would be just a `git merge' away and you are done.


Just my 2 cents,
Martin


More information about the erlang-questions mailing list