mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-02 07:50:31 +00:00
update handling of [g]make
This commit is contained in:
parent
ae1aea0796
commit
161ec3ffb7
1 changed files with 7 additions and 9 deletions
|
@ -22,22 +22,20 @@ _nproc() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
which_make() {
|
|
||||||
case $(uname -s) in
|
|
||||||
Darwin) echo gmake ;;
|
|
||||||
*) echo make ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
TMPDIR=${TMPDIR:-/tmp}
|
TMPDIR=${TMPDIR:-/tmp}
|
||||||
|
|
||||||
OUTDIR=${1:-cosmocc}
|
OUTDIR=${1:-cosmocc}
|
||||||
APELINK=o/$(mode)/tool/build/apelink
|
APELINK=o/$(mode)/tool/build/apelink
|
||||||
AMD64=${2:-x86_64}
|
AMD64=${2:-x86_64}
|
||||||
ARM64=${3:-aarch64}
|
ARM64=${3:-aarch64}
|
||||||
NPROC=$(($(_nproc)/2))
|
NPROC=$(($(_nproc)/2))
|
||||||
GCCVER=14.1.0
|
GCCVER=14.1.0
|
||||||
MAKE=$(which_make)
|
|
||||||
|
if ! MAKE=$(command -v gmake); then
|
||||||
|
if ! MAKE=$(command -v make); then
|
||||||
|
echo please install gnu make >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
$MAKE -j$NPROC m= \
|
$MAKE -j$NPROC m= \
|
||||||
$APELINK
|
$APELINK
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue