Build Script in D
David
d at dav1d.de
Thu Jan 10 16:41:18 PST 2013
I wrote a build script, mainly for my own project, the last days I
rewrote it be as flexible as possible (It makes make obsolete, at least
in my case):
https://github.com/Dav1dde/BraLa/blob/master/build_brala.d
usage:
rdmd build_brala.d # you can rename it of course!
-j --jobs # like -j for makefiles
-c --cache # path to a cache file, default is .build_cache
--no-cache # disables the build cache
-o --override-cache # doesn't load the cache file, but writes the newer
version
How to actually use the fancy classes:
https://github.com/Dav1dde/BraLa/blob/master/build_brala.d#L303
The Builder class takes 4 arguments, the cache (MD5Cache and NoCache are
implemented), the linker (only dmd implemented), the D-compiler (only
dmd implemented) and the C-Compiler (gcc and dmc implemented)
The rest should get clear when reading main()
TODO:
* documentation
* other compilers (only a few lines for each compiler + a few to
implement Linker functionality)
* provide helpers for the taskpool (maybe)
* add logging options, currently every command is printed to stdout
Any input welcome!
More information about the Digitalmars-d-announce
mailing list