Skip to content

Commit

Permalink
update handling of [g]make
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 authored Feb 8, 2025
1 parent ae1aea0 commit 161ec3f
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions tool/cosmocc/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,20 @@ _nproc() {
esac
}

which_make() {
case $(uname -s) in
Darwin) echo gmake ;;
*) echo make ;;
esac
}

TMPDIR=${TMPDIR:-/tmp}

OUTDIR=${1:-cosmocc}
APELINK=o/$(mode)/tool/build/apelink
AMD64=${2:-x86_64}
ARM64=${3:-aarch64}
NPROC=$(($(_nproc)/2))
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= \
$APELINK
Expand Down

0 comments on commit 161ec3f

Please sign in to comment.