digitalmars.D - Recommendation for a D build system
- =?UTF-8?B?Ikx1w61z?= Marques" (10/10) Jul 24 2013 I have some old D code and I wanted to improve its build system:
- Dicebot (5/16) Jul 24 2013 If code amount is relatively small (and building does not involve
- Jacob Carlborg (23/27) Jul 24 2013 I use rdmd as well. I'm using two shell script, one to build the
- Rob T (8/19) Jul 24 2013 This may be more than you need if your code base is very small,
I have some old D code and I wanted to improve its build system: that code was using a .bat and shell script with dmd, manually listing all the .d files to be linked! Don't ask me why I didn't use at least a Makefile, I don't recall, this is quite old code. What would you currently recommend to build a not very big D codebase? (if you use just dmd / rdmd, to not depend on another tool, *how* do you use it?) -- Luís
Jul 24 2013
On Wednesday, 24 July 2013 at 12:24:26 UTC, Luís Marques wrote:I have some old D code and I wanted to improve its build system: that code was using a .bat and shell script with dmd, manually listing all the .d files to be linked! Don't ask me why I didn't use at least a Makefile, I don't recall, this is quite old code. What would you currently recommend to build a not very big D codebase? (if you use just dmd / rdmd, to not depend on another tool, *how* do you use it?) -- LuísIf code amount is relatively small (and building does not involve calling any external tools), I'd stick with rdmd. `rdmd --build-only <any dmd flags here> main.d` and let it figure out all imports.
Jul 24 2013
On 2013-07-24 14:34, Dicebot wrote:If code amount is relatively small (and building does not involve calling any external tools), I'd stick with rdmd. `rdmd --build-only <any dmd flags here> main.d` and let it figure out all imports.I use rdmd as well. I'm using two shell script, one to build the application and one to run it. Looking something like this: if [ -s "$HOME/.dvm/scripts/dvm" ] ; then . "$HOME/.dvm/scripts/dvm" ; dvm use 2.063.2 fi rdmd --build-only -ofbin/main "$ " main.d And then the script for running: ./build.sh if [ "$?" = 0 ] ; then ./bin/main "$ " fi The "$ " allows to pass in arguments to the compiler when building and arguments to the application when running. -- /Jacob Carlborg
Jul 24 2013
On Wednesday, 24 July 2013 at 12:24:26 UTC, Luís Marques wrote:I have some old D code and I wanted to improve its build system: that code was using a .bat and shell script with dmd, manually listing all the .d files to be linked! Don't ask me why I didn't use at least a Makefile, I don't recall, this is quite old code. What would you currently recommend to build a not very big D codebase? (if you use just dmd / rdmd, to not depend on another tool, *how* do you use it?) -- LuísThis may be more than you need if your code base is very small, but this build system looks promising for medium sized and up code base. Worth a look if you plan to expand, or have mixed in C/C++ code. Bottom-up-build (bub) http://forum.dlang.org/thread/kqfvts$2ut8$1 digitalmars.com --rt
Jul 24 2013