Or on Windows I guess I could use a batch script?
3 Answers
Make is language agnostic: it works equally well (or bad depending on your point of view) with any programming language.
-
To still clarify: make is language/compiler/toolchain/whatever independent. You have to explicitly tell it how to call the compiler, which flags to use, etc. Thus, it works with any compiler made by anyone anywhere for any language.– pafcuApr 3, 2011 at 14:20
-
4This is almost correct.
make
has some assumptions built into it. For example, it assumes that every rule produces a single file. Its' support for tools that produces more then one target from a single source with a single command (such as yacc), is awkward at best. Also GNU make has some automatic rules for some languages, but not others. Apr 3, 2011 at 14:37 -
1I think the question may stem from the fact that GNU make comes with a whole bunch of predefined rules; many are for C or C++, and I don't think there are any for D. Apr 4, 2011 at 8:22
I suggest you check the rdmd utility, which is part of the standard dmd distribution. rdmd takes your main module and infers all transitive dependencies from it.
The Digital Mars D compiler (which you can find here) should have a make
program that does what you need, in the DMD2\Windows\Bin
folder.
If it doesn't, take a look at the C compiler -- I'm sure that at least one of them has one that works with DMD.