mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
tool/zsh/mmake cleanup
- collects all flags into their own array to support `mmake $target -j8` - prints out the raw make invocation to be run
This commit is contained in:
parent
c0bbc45268
commit
60813003a3
1 changed files with 4 additions and 2 deletions
|
@ -21,14 +21,16 @@ esac
|
||||||
arm64|aarch64) mode=aarch64 ;;
|
arm64|aarch64) mode=aarch64 ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
local -a targs
|
||||||
local -a flags
|
local -a flags
|
||||||
while (( $# > 0 )); do
|
while (( $# > 0 )); do
|
||||||
case $1 in
|
case $1 in
|
||||||
-*|*=*) flags+=($1); shift ;;
|
-*|*=*) flags+=($1); shift ;;
|
||||||
*) break ;;
|
*) targs+=($1); shift ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
local make
|
local make
|
||||||
[[ -x /opt/cosmocc/bin/make ]] && make=/opt/cosmocc/bin/make
|
[[ -x /opt/cosmocc/bin/make ]] && make=/opt/cosmocc/bin/make
|
||||||
[[ -z $make ]] && make=build/bootstrap/make.com
|
[[ -z $make ]] && make=build/bootstrap/make.com
|
||||||
$make $flags MODE=$mode ${(@)@/#/o/$mode/}
|
( set -x
|
||||||
|
exec $make $flags MODE=$mode ${(@)targs/#/o/$mode/} )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue