A Make engine for the D Programming Language. Supports configuration via D code or Make code.
The D programming language compiler. It requires that rdmd is in your path.
Create the file make.d, then run dmake.
Create the file "dmake.bat" somewhere in your PATH and copy the following to it:
@rdmd -I<path-to-dmake-library> make.d %*
If <path-to-dmake-library> is in the same location as dmake.bat, you can use:
@rdmd -I%~dp0 make.d %*
Create the file "dmake" somwhere in your PATH and add this to it:
#!/bin/bash
rdmd -I<path-to-dmake-library> make.d $@
also make sure the file is executable, i.e. chmod +x dmake
dmake can also be invoked directly with no installation like this:
> rdmd -I<path-to-dmake-library> make.d <args>...
import dmakelib;
void main(string[] args)
{
declare("DCOMPILER", program("dmd"));
addRule(exe("helloWorld"), file("helloWorld.d"), [
shell("$(DCOMPILER) helloWorld.d")
]);
addRule(target("clean"), null, [
//remove("*.exe", "*.obj"),
shell("del *.exe *.obj"),
]);
run(args);
}Every dmake file imports dmakelib.
Note: you can also create/run multiple make engines using a LocalMakeEngine.
The make features and syntax is based off the Digital Mars MAKE program.
Extra Features:
- supports forward references