2021-01-01 23:22:19 +01:00
|
|
|
#! /usr/bin/env bash
|
|
|
|
|
2021-01-07 18:31:52 +01:00
|
|
|
# Avoid rebuilds of the same version
|
2022-08-19 15:03:06 +02:00
|
|
|
[[ -e "build/giteapc-skip-rebuild.txt" ]] && exit 0
|
2021-01-07 18:31:52 +01:00
|
|
|
|
2021-01-01 23:22:19 +01:00
|
|
|
source util.sh
|
|
|
|
cd build
|
|
|
|
|
2021-03-18 10:25:51 +01:00
|
|
|
# Number of processor cores
|
2022-02-18 08:56:31 +01:00
|
|
|
if [[ $(uname) == "OpenBSD" || $(uname) == "Darwin" ]]; then
|
2021-03-18 09:51:47 +01:00
|
|
|
cores=$(sysctl -n hw.ncpu)
|
|
|
|
else
|
|
|
|
cores=$(nproc)
|
|
|
|
fi
|
|
|
|
|
2021-01-01 23:22:19 +01:00
|
|
|
echo "$TAG Compiling binutils (usually 5-10 minutes)..."
|
2021-03-18 14:00:59 +01:00
|
|
|
|
2021-01-01 23:22:19 +01:00
|
|
|
run_quietly giteapc-build.log \
|
2022-08-19 15:03:06 +02:00
|
|
|
$MAKE_COMMAND -j"$cores"
|