mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 03:38:31 +00:00
mmake: -j$(nproc), passthrough o//
Now `mmake o/ape/ape.elf` works.
This commit is contained in:
parent
2b315626f3
commit
b08b92248b
2 changed files with 24 additions and 3 deletions
|
@ -23,14 +23,17 @@ esac
|
|||
}
|
||||
local -a targs
|
||||
local -a flags
|
||||
local j=-j$(autoload -Uz nproc >/dev/null 2>&1 ; nproc)
|
||||
while (( $# > 0 )); do
|
||||
case $1 in
|
||||
-*|*=*) flags+=($1); shift ;;
|
||||
*) targs+=($1); shift ;;
|
||||
-j*) j=$1; shift ;;
|
||||
-*|*=*) flags+=($1); shift ;;
|
||||
o/*) flags+=($1); shift ;; # cheat; passthru
|
||||
*) targs+=($1); shift ;;
|
||||
esac
|
||||
done
|
||||
local make
|
||||
[[ -x /opt/cosmocc/bin/make ]] && make=/opt/cosmocc/bin/make
|
||||
[[ -z $make ]] && make=build/bootstrap/make.com
|
||||
( set -x
|
||||
exec $make $flags MODE=$mode ${(@)targs/#/o/$mode/} )
|
||||
exec $make $j $flags MODE=$mode ${(@)targs/#/o/$mode/} )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue