SCons support for D
Andrew Gough
andrew at goughy.org
Thu Dec 8 01:13:29 PST 2011
On Wed, 7 Dec 2011 20:56:17 +0100
Jens Mueller <jens.k.mueller at gmx.de> wrote:
> Andrew Gough wrote:
> > On Tue, 06 Dec 2011 18:14:25 +0000
> > Russel Winder <russel at russel.org.uk> wrote:
> >
> > > SCons is a Python-based build tool to replace Make and much of the
> > > Autotools functionality. It has D support as part of the core.
> > > This support is though in need of development.
> > >
> > > The new Mercurial/BitBucket infrastructure for developing SCons
> > > (replacing the old Subversion/Tigris set up) is now in place, a
> > > new release 2.1.0 has been declared and everything is open for
> > > business leading to a 2.2.0 release.
> > >
> > > I got my changes to support DMD 2 into this release :-)
> > >
> > > However, support for GDC, LDC, etc. is almost certainly still
> > > sadly lacking, and indeed the support for DMD almost certainly
> > > needs a severe refactoring and most likely a rewrite.
> > >
> > > Rather than people having to work on a clone of SCons in order to
> > > work on the tool, I have created a separate Mercurial repository
> > > (https://bitbucket.org/russel/scons_dmd_new) as a development
> > > version of just the tool. When a new version of this separate
> > > tool is declared I create a pull request for the SCons mainline
> > > to get the new version in the next version of SCons.
> > >
> > > Is anyone else other than me interested in using SCons as a build
> > > tool with D code? If there is, perhaps we can collaborate in
> > > some way to progress SCons support for all the various
> > > realizations of D?
> > >
> >
> > I think the build tool question is in need of the same level of high
> > level design and support that Steve Teale is working on for
> > std.database/std.sql.
> >
> > It seems there is SCons support (python), CMake, Orbit (Ruby), DSSS
> > (D1 only?), xfbuild, dake, rdmd options - I've added preliminary D
> > support to premake.
>
> Where do I find your changes for premake?
https://bitbucket.org/goughy/premake-dev-d
>
> > Would it be a good idea to thrash out the arguments for/against a
> > particular tool, and build/support just one? The community doesn't
> > seem big enough to be so fragmented. Java has Ant, Scala has sbt -
> > surely D should have a canonical build tool?
>
> I'm unsure whether D needs its own configuration/build tool. It
> definitely needs a package manager.
>
> For building there are different options but usually it's make. Most
> people (at least for sure on Unix variants) are using it. I think
> Scons does both building and configuring. Just want to say that you
> can have different tools for these jobs or single one.
> Jacob's build tool looks good but I wonder what are the major
> improvements over e.g. make (portability is an issue with make; maybe
> simplicity).
>
> For configuring there are some options and so far none of them is
> preferred by a majority. Different people weigh different aspects
> differently. But it seems people are moving away from configure
> scripts.
>
> As Russell already said, several build/configuration tools are used
> and there is no clear winner in general. So I think it's very nice
> that you have added support for D to premake. So we then have SCons
> (build and configuration), CMake (configuration and several build
> tools via generators), rdmd (can generate dependencies for Makefile),
> Jacob as a build tool and there are several others specifically for D
> and premake.
>
> I'm not sure about the state of each of these. But SCons and CMake
> work with dmd (both do configuration). premake is also configuration.
> Regarding build tools I wonder how important they are. make works
> fairly well.
>
> Jens
The reasons I chose premake were primarily:
1. No external dependencies (lua embedded in an executable)
2. Simple configuration
3. Cross platform
4. Generates native build scripts: make, VS, Code::Blocks etc etc
I have to point out that I have only added DMD+make support as that is
all I needed at the time, but have plans (who doesn't :-D) to add
support for LDC, GDC, and other build chains.
--
Andrew Gough
M: 0408 596 656
andrew at goughy.org
More information about the Digitalmars-d
mailing list