blob: 8503932d749f3f553d93c0e9ab967509b0af78cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh -e
export LDFLAGS="$LDFLAGS -static"
# Samurai is faster than make, so we prefer using it instead if available
if cpt l -q samurai; then
cat - ninja.in <<EOF> build.ninja
destdir = $1
cc = ${CC:-cc}
cflags = -std=c99 -Wall -Wextra -Wpedantic -Wno-unused-parameter $CFLAGS
ldflags = -static $LDFLAGS
EOF
ninja
ninja install
else
make PREFIX=/usr LDFLAGS="$LDFLAGS"
make PREFIX=/usr DESTDIR="$1" install
fi
ln -s samu "$1/usr/bin/ninja"
ln -s samu.1 "$1/usr/share/man/man1/ninja.1"
|