On Thursday, 30 May 2013 at 07:50:11 UTC, Timothee Cour wrote:
We should move to a D-based build system to build
dmd/druntime/phobos/d-programming-language/tools.

Reasons, in case it's not obvious:

1) DRY: makefile is full of repetitions
2) cross platform: different makefiles for different architectures are
needed (even win32 vs win64!)
3) safety: makefile happily ignores that $VAR variables are not set, and can create havoc; likewise tools/update.sh is a bash script and may not
stop on 1st error.
4) tools/update.sh doesn't work out of the box on OSX last i checked (I
made a pull request for that some time back:
https://github.com/timotheecour/d-programming-language.org/commit/557a2befa74ddfe99ee5c0e12e7c3d028f27d276)

Even a bad D-based build system will be better than a makefile, but it's not hard to write a reasonable one at least for the particular task of building dmd/druntime/phobos/d-programming-language/tools. It'll lower the entry point for people to contribute to dmd/phobos by making rebuilding
trivial.

Here's how it'd work:

1) a mixed D-based/makefile build that'll work 'from scratch' via
bootstrapping:
1a) dmd: first uses a makefile to build dmd+druntime
1b) rdmd built from a D file using dmd
1c) phobos, d-programming-language, tools built from a D file using rdmd

2) a pure D-based build that'll work using an existing dmd binary (eg
distributed binary)
that's the one most will use.

You may want take a look at Qbs, it will the next build system of Qt in replacement of QMake.
http://qt-project.org/wiki/Qbs-Quick-Reference

Using a full featured language is good cause, there is no restriction and build aren't just build, it's also packaging/testing issues. Doing something that just have to call compiler binaries is finaly the simple thing, and provide more control to users.

Reply via email to