On Tue, 13 Aug 2013 09:03:12 +0200 Jacob Carlborg <[email protected]> wrote:
> On 2013-08-12 00:38, 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. > > If it's written in D it will have the same bootstrap problem. Sort of, but...no, not really. Since this tool would be cable of generating any platform-specific makefile or script or whatever, and there's no reason to restrict it to *only* generate a makefile/script for the current platform, that means it can function much like a cross-compiler: Suppose there's some computer DMD isn't installed on. Maybe it's even a new platform that DMD hasn't been ported to. H.S. Teoh's tool could be run on *any existing* D-capable system to generate the makefile/script for the intended target computer. Maybe that might even require adding a new shell/makefile output to the tool, but it would *not* require running H.S. Teoh's tool (or anything else) on the actual intended target platform. Then, that makefile/script which was generated on...windows or whatever...is then transferred (email, ftp, floppy, whatever) to the new system and DONE - a working buildscript, ready to attempt compiling DMD, without *anything* having been run yet. > But perhaps that's ok since we're moving DMD to D anyway. >
