mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 16:58:30 +00:00
Standard make path (#1353)
Modifies download-cosmocc.sh to maintain a .cosmocc/current symlink that always points to the most recently downloaded version of cosmocc. We can use this to point at a canonical make for a bootstrapped repository. For first-time builds, we suggest: https://cosmo.zip/pub/cosmos/bin/make and have updated the docs in a few places to mention this. Fixes the other part of #1346.
This commit is contained in:
parent
98861b23fc
commit
21968acf99
6 changed files with 41 additions and 15 deletions
|
@ -38,8 +38,21 @@ done
|
|||
whence nproc >/dev/null || autoload -Uz nproc
|
||||
j=-j$(nproc)
|
||||
}
|
||||
local make=${MAKE:-${COSMOCC:-/opt/cosmocc/current}/bin/make}
|
||||
[[ -x $make ]] || make=${COSMO:-$PWD}/build/bootstrap/make
|
||||
local make=$(
|
||||
case $MAKE in
|
||||
*/*) echo $MAKE ;;
|
||||
?*) command -v $MAKE ;;
|
||||
*) echo .cosmocc/current/bin/make
|
||||
esac
|
||||
)
|
||||
if [[ ! -x $make ]]; then
|
||||
{ echo 'please install a suitable make, for example:'
|
||||
echo
|
||||
echo 'https://cosmo.zip/pub/cosmos/bin/make'
|
||||
echo
|
||||
echo 'then either put it on your $PATH or point to it with $MAKE.'
|
||||
} >&2; return 1
|
||||
fi
|
||||
( set -x
|
||||
exec $make $j $flags MODE=$mode $targs )
|
||||
# vim:ft=zsh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue