sh-elf-binutils/install.sh

27 lines
621 B
Bash
Raw Normal View History

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
[[ -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
echo "$TAG Installing binutils to the SuperH sysroot..."
2021-01-01 23:22:19 +01:00
run_quietly giteapc-install.log \
$MAKE_COMMAND install-strip
2021-01-01 23:22:19 +01:00
cd ..
# Symbolic link executables to $PREFIX/bin
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
if [[ ! -z "$CONFIG_CLEAN" ]]; then
echo "$TAG Cleaning up build files..."
rm -rf binutils-*/ binutils-*.tar.* build/
fi