The developer tool ninja-build can be installed from the official Ubuntu repositories. If you have installed the ninja-build package, you can see it's in version 1.3.4:
But sometimes developers require (or want) a newer version. With ninja-build that's very easy to do because pre-compiled binaries are ready to download and use.
In this case I installed the current version of ninja-build 1.8.2 on an Ubuntu 14.04 Trusty machine.
Download the current release:
This file contains the ninja binary. I unzipped it into /usr/local/bin:
sudo unzip ninja-linux.zip -d /usr/local/bin/
Tell Ubuntu to use this new path for the "ninja" command:
sudo update-alternatives --install /usr/bin/ninja ninja /usr/local/bin/ninja 1 --force
update-alternatives: using /usr/local/bin/ninja to provide /usr/bin/ninja (ninja) in auto mode
Test version output:
No need to compile from source in this case. Quick and efficient.