File indexing completed on 2024-04-28 05:50:05
0001 #!/bin/sh 0002 # 0003 # SPDX-License-Identifier: BSD-2-Clause 0004 # SPDX-FileCopyrightText: 2020 Johan Ouwerkerk <jm.ouwerkerk@gmail.com> 0005 # 0006 0007 set -e 0008 0009 # 0010 # Try to speed up builds by using parallel make. Assume that if MAKEFLAGS 0011 # is set, someone is trying to control make behaviour explicitly and do not 0012 # second-guess that. 0013 # 0014 if [ -z "$MAKEFLAGS" ] 0015 then 0016 cores="$(nproc --all)" 0017 jobs="$(($cores * 5 / 4))" 0018 set -x 0019 make -j "$jobs" "$@" 0020 else 0021 set -x 0022 make "$@" 0023 fi