Running Ninja builds with Shake

Shake supports the .ninja file format used by the Ninja tool. This document describes how to use Shake instead of Ninja, and why you might want to do so.

Installing Shake

  1. Install the Haskell Platform, which provides a Haskell compiler and standard libraries.
  2. Type cabal update, to download information about the latest versions of all Haskell packages.
  3. Type cabal install shake --global, to build and install Shake and all its dependencies.
  4. Type shake --help, to verify that Shake was successfully installed.

Running Shake

Change to the directory you usually run Ninja from (where there is a file) and instead of typing ninja type shake. Ninja defaults to guessing how many processors to use, while Shake defaults to only 1 processor, so you will probably want to run something like shake -j to use all processors or -j4 to use 4 processors (with a number appropriate for your computer).

The following Ninja options are available in Shake:

Additional features of Shake

For people who are set up to run an existing .ninja build file, there are two features of Shake that may appeal: