mmake doesn't even run nproc unless it needs to

This commit is contained in:
Jōshin 2023-12-17 15:09:41 -05:00
parent 3654650c52
commit c11c105270
No known key found for this signature in database

View file

@ -23,8 +23,7 @@ esac
}
local -a targs
local -a flags
whence nproc >/dev/null 2>&1 || autoload -Uz nproc
local j=-j$(nproc)
local j
while (( $# > 0 )); do
case $1 in
-j*) j=$1; shift ;;
@ -33,6 +32,10 @@ while (( $# > 0 )); do
*) targs+=($1); shift ;;
esac
done
[[ -z $j ]] && {
whence nproc >/dev/null 2>&1 || autoload -Uz nproc
j=-j$(nproc)
}
local make
[[ -x /opt/cosmocc/bin/make ]] && make=/opt/cosmocc/bin/make
[[ -z $make ]] && make=build/bootstrap/make.com