mirror of
https://git.planet-casio.com/Lephenixnoir/sh-elf-binutils.git
synced 2025-01-05 08:23:37 +01:00
avoid rebuilds during updates
This commit is contained in:
parent
c07032e949
commit
3f985b1557
4 changed files with 20 additions and 1 deletions
3
build.sh
3
build.sh
|
@ -1,5 +1,8 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
# Avoid rebuilds of the same version
|
||||
[[ ! -d build ]] && exit 0
|
||||
|
||||
source util.sh
|
||||
cd build
|
||||
|
||||
|
|
13
configure.sh
13
configure.sh
|
@ -3,9 +3,22 @@
|
|||
source util.sh
|
||||
|
||||
VERSION=$1
|
||||
PREFIX="$2"
|
||||
URL="https://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.xz"
|
||||
ARCHIVE=$(basename "$URL")
|
||||
|
||||
# Avoid rebuilds of the same version
|
||||
|
||||
existing_as="$PREFIX/bin/sh-elf-as"
|
||||
|
||||
if [[ -f "$existing_as" ]]; then
|
||||
existing_version=$($existing_as --version | head -n 1 | grep -Eo '[0-9.]+$')
|
||||
if [[ $existing_version == $VERSION ]]; then
|
||||
echo "$TAG Version $VERSION already installed, skipping rebuild"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check dependencies for binutils and GCC
|
||||
|
||||
if command -v apt >/dev/null 2>&1; then
|
||||
|
|
|
@ -8,7 +8,7 @@ include giteapc-config-$(GITEAPC_CONFIG).make
|
|||
endif
|
||||
|
||||
configure:
|
||||
@ ./configure.sh $(VERSION)
|
||||
@ ./configure.sh $(VERSION) "$(PREFIX)"
|
||||
|
||||
build:
|
||||
@ ./build.sh
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
# Avoid rebuilds of the same version
|
||||
[[ ! -d build ]] && exit 0
|
||||
|
||||
source util.sh
|
||||
PREFIX="$1"
|
||||
|
||||
|
|
Loading…
Reference in a new issue