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
|
2021-01-02 10:37:48 +01:00
|
|
|
PREFIX="$1"
|
2021-01-01 23:22:19 +01:00
|
|
|
|
|
|
|
cd build
|
2022-08-19 15:03:06 +02:00
|
|
|
echo "$TAG Installing binutils to the SuperH sysroot..."
|
2021-01-01 23:22:19 +01:00
|
|
|
run_quietly giteapc-install.log \
|
2022-08-19 15:03:06 +02:00
|
|
|
$MAKE_COMMAND install-strip
|
2021-01-01 23:22:19 +01:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
# Symbolic link executables to $PREFIX/bin
|
2022-08-19 15:03:06 +02:00
|
|
|
echo "$TAG Symlinking sysroot binaries to $PREFIX/bin..."
|
|
|
|
mkdir -p "$PREFIX/bin"
|
|
|
|
for f in "$SYSROOT/bin"/*; do
|
|
|
|
ln -sf "$f" "$PREFIX/${f#$SYSROOT/}"
|
2021-01-01 23:22:19 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
# Cleanup build files
|
2022-08-19 15:03:06 +02:00
|
|
|
if [[ ! -z "$CONFIG_CLEAN" ]]; then
|
|
|
|
echo "$TAG Cleaning up build files..."
|
|
|
|
rm -rf binutils-*/ binutils-*.tar.* build/
|
|
|
|
fi
|