Replacing Make for the DMD build

Joakim via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 17 13:25:07 PDT 2017


On Saturday, 17 June 2017 at 19:20:54 UTC, Walter Bright wrote:
> On 6/15/2017 11:30 PM, Russel Winder via Digitalmars-d wrote:
>> A direct question to Walter and Andrei really.
>> 
>> If someone, let us say Russel Winder, create a CMake/Ninja 
>> and/or
>> Meson/Ninja build for DMD, is there any chance of it being 
>> allowed to
>> replace the Make system?
>> 
>> If the answer is no, then Russel will obviously not waste his 
>> time
>> doing something that will not be accepted.
>
> It's highly unlikely it would be accepted:
>
> 1. make is ubiquitous. It's not something we have to scrounge 
> to find on platform X, it's already there. People already are 
> familiar with it (even if they hate it).
>
> 2. we're in the D business, not the project build business. 
> It's easier to get past that "first 5 minutes" if everything 
> about D other than D itself is familiar and conventional.
>
> 3. to steal from Churchill, `make` is the worst form of build 
> system except for all the others
>
> 4. much as I dislike make, the time spent wrestling with it is 
> a vanishingly tiny slice of time compared to what spent on the 
> rest of D. Getting that time slice to zero will have no effect 
> on productivity, and I'm not convinced that a newer build 
> system will even reduce that time slice at all (see point 5).
>
> 5. D has a more complex build process than it should. Using 
> another build system won't make that complexity go away.
>
> 6. unlike the choice to use github, there is no clear winner in 
> the `make` category of build tools. If the industry has moved 
> on from make to X, then we should, too. But it has not.
>
> 7. the current makefiles for DMD suffer from over-engineering, 
> i.e. making simple things complicated and excessively using 
> obscure features of make. This isn't really the fault of make.

A lot of this is simply saying Make is popular so we should just 
stick with it: I hate that mindset.  It is the same mindset D has 
to combat with C or C++, and that was exhibited when you spoke 
against the SDL format for dub.

I understand what you're saying, that D should pick its battles, 
but it's possible to do that and not just go with the status quo 
for everything other than D.  It is often necessary to get rid of 
defaults in many other categories, like Make or XML, and where 
possible D should try to make the best choices, without getting 
too far out there in NIH-land or its own D island.

I don't think choosing an outside Python build system that GNOME 
is in the process of switching to qualifies as either of those, 
as Python is almost as ubiquitous as make.  If we were to use 
Meson, we'd gain a lot in ease of use and lose almost nothing in 
platform availability.

All that said, I'll reiterate what I said earlier to Russel, and 
what I'd say to Atila too: don't aim to replace Make, just aim to 
provide an alternative in the dmd/phobos repos.  If we find that 
everybody is using that instead of Make, we'll just switch over 
to it naturally someday.


More information about the Digitalmars-d mailing list