From d90aa96a03f24918072f1fc7fab82fd4cdd7e2cd Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Sun, 27 Nov 2022 23:03:51 +0000 Subject: [PATCH] Set MAKEFLAGS on NetBSD --- fish/config.fish | 2 ++ zshrc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/fish/config.fish b/fish/config.fish index 223e4b6..a04bf39 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -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 diff --git a/zshrc b/zshrc index 812d830..00180d0 100644 --- a/zshrc +++ b/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