Have Win DMD use gmake instead of a separate DMMake makefile?

Jonathan M Davis jmdavisProg at gmx.com
Sun Aug 11 18:14:18 PDT 2013


On Sunday, August 11, 2013 15:38:09 H. S. Teoh wrote:
> Maybe my previous post didn't get the idea across clearly, so let me try
> again. My underlying thrust was: instead of maintaining 3 different
> makefiles (or more) by hand, have a single source for all of them, and
> write a small D program to generate posix.mak, win32.mak, win64.mak,
> whatever, from that source.
> 
> That way, adding/removing files from the build, etc., involves only
> editing a single file, and regenerating the makefiles/whatever we use.
> If there's a problem with a platform-specific makefile, then it's just a
> matter of fixing the platform-specific output handler in the D program.
> 
> The way we're currently doing it essentially amounts to the same thing
> as copy-n-pasting the same piece of code 3 times and trying to maintain
> all 3 copies separately, instead of writing a template that can be
> specialized 3 times, thus avoiding boilerplate and maintenance
> headaches.

But if you're going that far, why not just do the whole thing with D and ditch 
make entirely? If it's to avoid bootstrapping issues, we're going to have 
those anyway once we move the compiler to D (which is well on is well 
underway), so that really isn't going to matter.

- Jonathan M Davis


More information about the Digitalmars-d mailing list