Derive MAKEFLAGS on macOS
This commit is contained in:
parent
fa1eb19c36
commit
356e2f2a0b
1 changed files with 5 additions and 1 deletions
6
zshrc
6
zshrc
|
@ -220,7 +220,11 @@ done
|
|||
__has_command vim && alias vi=vim
|
||||
__has_command gpg2 && alias gpg=gpg2
|
||||
|
||||
__has_command nproc && export MAKEFLAGS="-j$(($(nproc) * 2))"
|
||||
if [ "$(uname -s)" = "Darwin" ]; then
|
||||
export MAKEFLAGS="-j$(($(sysctl -n machdep.cpu.thread_count) * 2))"
|
||||
elif __has_command nproc; then
|
||||
export MAKEFLAGS="-j$(($(nproc) * 2))"
|
||||
fi
|
||||
|
||||
make() {
|
||||
case "$PWD" in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue