|Version 4 (modified by benl, 5 years ago)|
Installation can be avoided by always running DDC from its top-level build directory:
$ cd $DDC_BUILD $ bin/ddc -make /path/to/the/Main.ds
In this case it will still be able to find its libraries and runtime system.
However, it is possible to install it as a regular application. We don't do this very often, so it's still a manual process.
- Copy the compiler binary to your ~/bin directory, where ~/bin is in your $PATH.
$ mkdir ~/bin $ cp $DDC_BUILD/bin/ddc ~/bin/ddc.bin
- For Mac OS X only, also copy the runtime library to your ~/lib directory
$ mkdir ~/lib $ cp $DDC_BUILD/runtime/libddc-runtime.dylib ~/lib
- Create an alias to give ddc the path to its libraries and (static) runtime.
You'll probably want to add the following commands to your .profile, or similaralias ddc='~/bin/ddc.bin -basedir $DDC_BUILD' (for bash) alias ddc '~/bin/ddc.bin -basedir $DDC_BUILD' (for c shells)
- Compile and run your first program
$ echo 'main () = println "Hello world"' > Main.ds $ ddc -make Main.ds -o hello $ ./hello