D based build system to replace current makefile

Timothee Cour thelastmammoth at gmail.com
Thu May 30 00:49:57 PDT 2013


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130530/0ddb1fc4/attachment.html>


More information about the Digitalmars-d mailing list