diff --git a/build_tools/make_tarball.sh b/build_tools/make_tarball.sh index 663078e06..9bed4cda9 100755 --- a/build_tools/make_tarball.sh +++ b/build_tools/make_tarball.sh @@ -14,6 +14,14 @@ set -e # 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 +# 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 TAR=notfound for try in tar gtar gnutar; do @@ -51,8 +59,8 @@ git archive --format=tar --prefix="$prefix"/ HEAD > "$path" PREFIX_TMPDIR=$(mktemp -d) cd "$PREFIX_TMPDIR" echo "$VERSION" > version -cmake "$wd" -make doc +cmake -G "$BUILD_GENERATOR" "$wd" +$BUILD_TOOL doc TAR_APPEND="$TAR --append --file=$path --mtime=now --owner=0 --group=0 \ --mode=g+w,a+rX --transform s/^/$prefix\//"