<rant> D's makefiles... </rant>

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 14 01:53:05 PDT 2015


On Monday, 13 April 2015 at 20:41:20 UTC, Andrei Alexandrescu 
wrote:
> On 4/13/15 7:34 AM, H. S. Teoh via Digitalmars-d wrote:
>> On Mon, Apr 13, 2015 at 02:24:57PM +0000, Dicebot via 
>> Digitalmars-d wrote:
>>> I want to replace those with D scripts for a reason.
>>
>> Now that dmd is dependent on an existing version of dmd to 
>> build, it
>> should be no problem to replace the makefiles with D code. 
>> Everytime
>> something like this happens I just see all the flaws of 
>> makefiles all
>> over again, but unfortunately some people just refuse the 
>> acknowledge
>> that makefiles are going the way of the dinosaur and it's time 
>> to move
>> on.
>
> A thought: any makefile replacement should make sure there's an 
> equivalent to "-j".

The "-j" option should be there for tweaking only, by default I 
expect a modern tool to just use as many threads as I have cores. 
Which of course is exactly what Ninja does.


> Atila: "make clean" should work. Must have been something weird 
> on your system.

Maybe there was something weird, but said weirdness was caused by 
the existing build system. If "make clean" is ever needed, it's 
proof the build system is broken. CMake doesn't even generate a 
"clean" target. Of course, this is made a lot easier by the fact 
that CMake encourages and enables out-of-tree builds, so if a 
clean is needed just delete the build directory.

Atila


More information about the Digitalmars-d mailing list