Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ninja is a small build system with a focus on speed.
C++ Python C Objective-C Perl Shell Other
Pull request Compare This branch is 127 commits ahead, 904 commits behind martine:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
doc
misc
src
.Makefile
.gitignore
CMakeLists.txt
COPYING
GNUmakefile
HACKING.rst
License.txt
README.rst
bootstrap.py
configure.py
index.html

README.rst

Ninja

Based on original version from http://martine.github.com/ninja/

Ninja is a small build system with a focus on speed. It differs from other build systems in two major respects:

  • it is designed to have its input files generated by a higher-level build system,
  • it is designed to run builds as fast as possible.

Note

I have forked the orignal version to support MINGW, MSYS, and CYGWIN builds too.

Ninja should be usable on most platforms as cmake do!

Claus Klein

See the manual -- http://ClausKlein.github.com/ninja/doc/manual.html or doc/manual.asciidoc included in the distribution -- for background and more details.

Download the current Ninja source code as zip file from https://github.com/ClausKlein/ninja/zipball/develop

Getting a source code version of Ninja with git to work with:

git clone git://github.com/ClausKlein/ninja.git
cd ninja
make ninja

Building

To bootstrap Ninja and you have python istalled, run python ./bootstrap.py. It first blindly compiles all non-test source files together, then re-builds Ninja using itself and ./build.ninja. You should end up with a Ninja binary in the source root. Run ./ninja -h for help.

If you like to use cmake and make to bootstrap Ninja create a build dir and generate your build project:

mkdir -p build && cd build
cmake  .. && make
# or you have already ninja installed
cmake -G Ninja .. && ninja

You may also create a Mac OSX Package Maker installer with cpack:

cpack -C CPackConfig.cmake -G PackageMaker

On Windows you may want to create "Null Soft Installer":

cpack -C CPackConfig.cmake -G NSIS

The only file of interest to a user is the resulting Ninja binary.

You may install it yourself with:

sudo install ninja /usr/local/bin
# or
sudo make install

Contributing

If you want to work with code, you should use git-flow . Fork my git repository. Then, run:

git clone --recursive git@github.com:<username>/ninja.git
git branch develop origin/develop
git flow init -d
git flow feature start <your feature>

Then, after develop and testing your work, commit your changes:

git flow feature publish <your feature>

When done, open a pull request to your feature branch.

HACKING :)


License

Something went wrong with that request. Please try again.