ninja - Build system ChangeLog


# Ninja
# =====
# Slackware 15.0: ninja 1.10.2

# Prerequisites:
# Python 3.x
# Git (if using git below)
# asciidoc (Slackware package linuxdoc-tools)
# docbook (if you want to create an HTML, PDF, etc. manual)

# Ninja manual
# ninja-build mailing list

# When I originally created this very brief (read: half-ass) HOWTO, there
# was no Slackware package.  Slackware 15.0 now includes a 'ninja' package.
# Below I leave the instructions for installing it from Git, and I add a
# section for installing 1.11.1 from a GitHub release tarball.

# Ninja 1.11.1
# ============
# Call for 1.11 testing...
# 1.11.1 Hotfix Release
# GitHub 1.11.1 release

# This tarball-installed Ninja will match the prefix used by Slackware's
# package.  If you have a ninja binary in /usr/local/bin, remove that
# before you install this one.

# Get the tarball
test -f installed/ninja-1.11.1.tar.gz &&
mv -f installed/ninja-1.11.1.tar.gz .
test ! -f ninja-1.11.1.tar.gz &&
wget -O ninja-1.11.1.tar.gz\

# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "ninja-*" -exec rm -r {} \;
tar xzvf ~/ninja-1.11.1.tar.gz
cd ninja-1.11.1
test $UID = 0 && chown -R root:root .

## Build it
# This will run it with 'python', if you have a 'python' and it is a symlink
# to Python 2.x, run this as 'python3 --bootstrap'
# If 'python' is a link (or a copy of) 'python3', then that is not necessary
./ --bootstrap

# Build manual.html, or just read the docs online at
( cd doc
  asciidoc -b docbook -o manual.docbook manual.asciidoc
  docbook2html -u manual.docbook )

# Become root to install it

# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg ninja

# If you have an old Ninja in /usr/local/bin, remove it
rm -f /usr/local/bin/ninja

# Remove old docs if this is an upgrade, in case a file is no longer
# included
test -d /usr/doc/ninja && rm -r /usr/doc/ninja

# Install it
# [ If you use Emacs, see misc/ninja-mode.el ]
install -s -m 755 ninja /usr/bin/
install -d /usr/doc/ninja
install -m 644 *.md COPYING RELEASING /usr/doc/ninja/
test -f doc/manual.html && install -m 644 doc/manual.html /usr/doc/ninja/
test -d /usr/share/bash-completion/completions &&
install -m 644 misc/bash-completion \
test -d /usr/share/vim/vimfiles/syntax &&
install -m 644 misc/ninja.vim /usr/share/vim/vimfiles/syntax/ninja.vim
test -d /usr/share/zsh/site-functions &&
install -m 644 misc/zsh-completion /usr/share/zsh/site-functions/_ninja
# If you use Emacs, see misc/ninja-mode.el

# Become your non-root user again

# Save the source for later
mkdir -p -m 0700 installed
rm -f installed/ninja-*.tar.*
mv ninja-1.11.1.tar.gz installed/

# Ninja from Git
# ==============
mkdir -p -m 0700 ~/src
cd ~/src
test -d ./ninja &&
( cd ninja ; git pull )
test ! -d ninja &&
git clone git://
cd ninja
git checkout release

# Build it
./ --bootstrap

# You can view the documentation at
# or generate documentation
# (you may want to put manual.html in /usr/local/doc/ninja)
( cd doc
  asciidoc -b docbook -o manual.docbook manual.asciidoc
  docbook2html -u manual.docbook )

# Install the ninja binary
su -c "install -m 755 ninja /usr/local/bin/"

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2024-04-27 2:34pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.