Set MAKEFLAGS on NetBSD
This commit is contained in:
parent
fe7f96bb88
commit
d90aa96a03
2 changed files with 4 additions and 0 deletions
|
@ -61,6 +61,8 @@ end
|
|||
|
||||
if test (uname -s) = Darwin
|
||||
set -x MAKEFLAGS -j(math (sysctl -n machdep.cpu.thread_count)'*2')
|
||||
else if test (uname -s) = NetBSD
|
||||
set -x MAKEFLAGS -j(math (sysctl -n hw.ncpu)'*2')
|
||||
else if type -q nproc
|
||||
set -x MAKEFLAGS -j(math (nproc)'*2')
|
||||
end
|
||||
|
|
2
zshrc
2
zshrc
|
@ -223,6 +223,8 @@ __has_command gpg2 && alias gpg=gpg2
|
|||
|
||||
if [ "$(uname -s)" = "Darwin" ]; then
|
||||
export MAKEFLAGS="-j$(($(sysctl -n machdep.cpu.thread_count) * 2))"
|
||||
elif [ "$(uname -s)" = "NetBSD"; then
|
||||
export MAKEFLAGS="-j$(($(sysctl -n hw.ncpu) * 2))"
|
||||
elif __has_command nproc; then
|
||||
export MAKEFLAGS="-j$(($(nproc) * 2))"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue