mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-27 20:25:12 +00:00
make_tarball: use Ninja over Make where possible
This commit is contained in:
parent
dab4b21a50
commit
7213102942
1 changed files with 10 additions and 2 deletions
|
@ -14,6 +14,14 @@ set -e
|
||||||
# but to get the documentation in, we need to make a symlink called "fish-VERSION"
|
# but to get the documentation in, we need to make a symlink called "fish-VERSION"
|
||||||
# and tar from that, so that the documentation gets the right prefix
|
# and tar from that, so that the documentation gets the right prefix
|
||||||
|
|
||||||
|
# Use Ninja if available, as it automatically paralellises
|
||||||
|
BUILD_TOOL="make"
|
||||||
|
BUILD_GENERATOR="Unix Makefiles"
|
||||||
|
if command -v ninja >/dev/null; then
|
||||||
|
BUILD_TOOL="ninja"
|
||||||
|
BUILD_GENERATOR="Ninja"
|
||||||
|
fi
|
||||||
|
|
||||||
# We need GNU tar as that supports the --mtime and --transform options
|
# We need GNU tar as that supports the --mtime and --transform options
|
||||||
TAR=notfound
|
TAR=notfound
|
||||||
for try in tar gtar gnutar; do
|
for try in tar gtar gnutar; do
|
||||||
|
@ -51,8 +59,8 @@ git archive --format=tar --prefix="$prefix"/ HEAD > "$path"
|
||||||
PREFIX_TMPDIR=$(mktemp -d)
|
PREFIX_TMPDIR=$(mktemp -d)
|
||||||
cd "$PREFIX_TMPDIR"
|
cd "$PREFIX_TMPDIR"
|
||||||
echo "$VERSION" > version
|
echo "$VERSION" > version
|
||||||
cmake "$wd"
|
cmake -G "$BUILD_GENERATOR" "$wd"
|
||||||
make doc
|
$BUILD_TOOL doc
|
||||||
|
|
||||||
TAR_APPEND="$TAR --append --file=$path --mtime=now --owner=0 --group=0 \
|
TAR_APPEND="$TAR --append --file=$path --mtime=now --owner=0 --group=0 \
|
||||||
--mode=g+w,a+rX --transform s/^/$prefix\//"
|
--mode=g+w,a+rX --transform s/^/$prefix\//"
|
||||||
|
|
Loading…
Reference in a new issue