Best build tool for D projects

Russel Winder russel at russel.org.uk
Sat May 14 00:54:43 PDT 2011


Chris,

On Fri, 2011-05-13 at 18:38 +0100, Chris Molozian wrote:
[ . . . ]
>       * Jam (ftjam), cross-platform and platform independent build
>         language. Lots of variants with the same name, therefore
>         finding it hard to find good tutorials and documentation.

Everyone I know who has used this either loves it (very few people) or
hates it (almost everyone).  The claim is the notation is poor, and you
have to do lots of tweaking even of stuff that should be "out of the
box".

>       * Boost.Build (bjam), not sure how it differs to ftjam.

See above.  From what I can tell an increasing number of Boost projects
are moving away from this build framework.

Based on the above I have never used it myself. 

>       * Cook, can't find whether it can be built for use on Windows.
>         No pre-built Windows binary. Very extensive documentation,
>         although I think the default build file name is silly
>         "Howto.cook" :-) .

I've not come across this one.

> After all this preamble I guess what I'm asking is... what (if any)
> cross-platform build tools does everyone use with their D projects?
> Any feedback on experiences with any of the build tools I've mentioned
> is also greatly appreciated. If you can suggest any alternatives,
> please do.
> 
> If you've read this far, thanks for taking the time to read it  :-)
> and sorry for the long message.

No problem.

> PS: I've seen the CMakeD module, I know a lot of people recommend
> CMake for cross-platform builds and that the KDE guys use it. I have
> tried to like it... but settled on hating it. The procedural language
> is daft and ugly and I loathe the CMakeLists.txt file that goes in
> each directory. I've already ruled it out.

I can't say I blame you, I think there language is outrageously
horrible.

I am sure others will highlight a few other choices but the mainstream
ones remain:

        Make
        Autotools
        CMake
        SCons
        Waf

Personally I have abandoned Make and Autotools as being out of date and
too crufty.  Historically they are massively important systems, and so
deserve praise and honour.  But time has moved on and new lessons
learned.

CMake is out already.

SCons is a Python-based, internal DSL system.  I know the D support
reasonably well as at some point 18 months ago I found myself deemed the
official support for the D tool.  SCons is truly great in some build
situation -- it's really a Make replacement with some very interesting
bells and whistles, and of course all the power of a dynamic language --
but for other situations it can be slow and a bit clunky.  My main use
is its sweet spot, so I use it a lot.

Waf was a system built on SCons, then it was a SCons fork, now it has
evolved to be something different in its own right.  It is Python based
and is intended to be an Autotools replacement.  Its real sweet spot is
"whole-project, ship source, and build locally" or some subset thereof.
I like Waf.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110514/ebee6931/attachment.pgp>


More information about the Digitalmars-d mailing list