mirror of
https://git.planet-casio.com/Lephenixnoir/sh-elf-gcc.git
synced 2024-12-28 04:23:39 +01:00
32 lines
634 B
Bash
Executable file
32 lines
634 B
Bash
Executable file
#! /usr/bin/env bash
|
|
|
|
# Avoid rebuilds of the same version
|
|
[[ ! -d build ]] && exit 0
|
|
|
|
source util.sh
|
|
PREFIX="$1"
|
|
|
|
if command -v gmake >/dev/null 2>&1; then
|
|
make_command=gmake
|
|
else
|
|
make_command=make
|
|
fi
|
|
|
|
cd build
|
|
echo "$TAG Installing to local folder..."
|
|
run_quietly giteapc-install.log \
|
|
$make_command install-strip-gcc install-strip-target-libgcc
|
|
cd ..
|
|
|
|
# Symbolic link executables to $PREFIX/bin
|
|
echo "$TAG Symlinking binaries..."
|
|
for x in bin/*; do
|
|
ln -sf "$(pwd)/$x" "$PREFIX/$x"
|
|
done
|
|
|
|
# Cleanup build files
|
|
if [[ -z $NO_CLEAN ]]; then
|
|
echo "$TAG Cleaning up build files..."
|
|
rm -rf gcc-*/ gcc-*.tar.*
|
|
rm -rf build/
|
|
fi
|