Replacing Make for the DMD build
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jun 18 02:31:34 PDT 2017
On 6/17/2017 6:20 PM, Vladimir Panteleev wrote:
> On Saturday, 17 June 2017 at 21:49:29 UTC, Walter Bright wrote:
>> It's not quite the same. I spend 99.99% of my time programming working with
>> code, not makefiles.
>
> Martin and Sebastian can correct me if I'm wrong, but unless I am, Martin,
> Sebastian, and myself spend a scary amount of time wrestling with makefiles.
I spent hours today attempting to figure out why, after I refreshed my copy of
druntime with HEAD, the druntime unittests would no longer run. I am still at a
dead end.
The biggest issue with understanding the makefiles is a near total lack of any
helpful comments. I stepped up a bit with this:
https://github.com/dlang/druntime/pull/1843
but so far I have not been able to figure out what is going on with the
druntime/test directory. I don't even know why it exists.
Makefiles need to be documented just like code. Even simple things like what
variables are inputs to the makefile. What public targets are in the makefile
(rather than private targets). What those internally defined variables are for,
and what are their possible values. What the sed scripts are doing. What's the
difference between SRCS and MANIFEST. Etc.
Make can be a bear to use. But I believe that is mostly due to the convention of
never documenting anything in it (I see this commonly, not just for our
project!). I'm guilty of that myself.
David Held, a while back, did do some work to fix this. You can see the results
at the beginning of:
https://github.com/dlang/phobos/blob/master/posix.mak
though it has suffered from years of neglect, barnacles and bit rot.
We must try and do better with this. We can start by refusing to accept makefile
PRs that add new constructions without documentation, just like we don't accept
new functions without Ddoc comments.
More information about the Digitalmars-d
mailing list