summaryrefslogtreecommitdiff
path: root/build-ninja.sh
blob: e5ac2bf5780dae02054bca5f29db426c1f53d8de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash -ex
# Download & build ninja on the local machine
# works on Linux, OSX, and Windows (Cygwin)
# leaves output in /tmp/prebuilts/ninja/$OS-x86/

PROJ=ninja
VER=1.5.3
MSVS=2013

source $(dirname "$0")/build-common.sh build-common.sh

# needed for cygwin
export PATH="$PATH":.

# ninja specific steps
cd $RD
git clone https://github.com/martine/ninja.git src
cd src
git checkout v$VER
if [[ "$OS" == "windows" ]] ; then
     PLATFORM="--platform=msvc"
fi
./configure.py --bootstrap $PLATFORM

# install
cp $RD/src/ninja $INSTALL

commit_and_push