sh-elf-binutils/install.sh

27 lines
621 B
Bash
Executable File

#! /usr/bin/env bash
# Avoid rebuilds of the same version
[[ -e "build/giteapc-skip-rebuild.txt" ]] && exit 0
source util.sh
PREFIX="$1"
cd build
echo "$TAG Installing binutils to the SuperH sysroot..."
run_quietly giteapc-install.log \
$MAKE_COMMAND install-strip
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/}"
done
# Cleanup build files
if [[ ! -z "$CONFIG_CLEAN" ]]; then
echo "$TAG Cleaning up build files..."
rm -rf binutils-*/ binutils-*.tar.* build/
fi