Describe your Nimrod builds as tasks. Example
nakefile.nim
:
import nake
const
ExeName = "my_app"
BleedingEdgeFeatures = "-d:testFeature1 -d:testFeature2"
task "debug-build", "Build with unproven features":
if shell("nimrod c", BleedingEdgeFeatures, "-d:debug", ExeName):
## zip up files or do something useful here?
task "run-tests":
# ...
Now you can compile this nakefile.nim
file into a binary and run it:
nimrod c -r nakefile test-build
## or if you already compiled the nakefile
./nakefile test-build
Use Nimrod's babel package manager to
install the package and nake
binary:
$ babel update
$ babel install nake
Use Nimrod's babel package manager to install locally the github checkout:
$ git clone https://github.com/fowlmouth/nake
$ cd nake
$ babel install
Nake has its own nakefile, it will build nake as a binary is just a shortcut
for nimrod c -r nakefile $ARGS
```sh
cd ~/.babel/libs/nake
nimrod c -r nakefile install
cd ~/my-project nake debug-build
Once the nakefile is built you can run it manually with ``./nakefile``, but you
can also run ``nake`` again. If nake detects that the source file is newer than
the binary, the nakefile will be rebuilt again, otherwise it just runs the
nakefile binary directly. You can always remove the ``nakefile`` and the
``nimcache`` directories if you need to force a rebuild.
Documentation
=============
Run the `docs` task of the included [nakefile](nakefile.nim) to generate the
user API HTML documentation. This documentation explains what symbols you can
use other than the obvious `task` to define tasks. If you installed from babel
you first need to go to your babel directory. Unix example:
```sh
$ cd ~/.babel/pkgs/nake-x.y
$ nimrod c -r nake docs
$ open nake.html
Generated by Midnight dynamite: 2015-05-02 20:55:35 UTC