fix re-install
This commit is contained in:
parent
5504805f1b
commit
14681708d1
18
giteapc.make
18
giteapc.make
|
@ -7,19 +7,21 @@ VERSION_GCC := 11.2.0
|
|||
-include giteapc-config.make
|
||||
|
||||
configure:
|
||||
@ cd ./scripts/binutils && ./configure.sh --version=$(VERSION_BINUTILS)
|
||||
@ cd ./scripts/gcc && ./configure.sh --version=$(VERSION_GCC)
|
||||
@ cd ./scripts/binutils \
|
||||
&& ./configure.sh --version="$(VERSION_BINUTILS)" \
|
||||
&& cd ../gcc && ./configure.sh --version="$(VERSION_GCC)"
|
||||
|
||||
build:
|
||||
@ cd ./scripts/binutils && ./build.sh
|
||||
@ cd ./scripts/gcc && ./build.sh
|
||||
@ cd ./scripts/binutils && ./build.sh && cd ../gcc && ./build.sh
|
||||
|
||||
install:
|
||||
@ cd ./scripts/binutils && ./install.sh --prefix="$(PREFIX)"
|
||||
@ cd ./scripts/gcc && ./install.sh --prefix="$(PREFIX)"
|
||||
@ cd ./scripts/binutils \
|
||||
&& ./install.sh --prefix="$(PREFIX)" \
|
||||
&& cd ../gcc && ./install.sh --prefix="$(PREFIX)"
|
||||
|
||||
uninstall:
|
||||
@ cd ./scripts/binutils && ./uninstall.sh --prefix="$(PREFIX)"
|
||||
@ cd ./scripts/gcc && ./uninstall.sh --prefix="$(PREFIX)"
|
||||
@ cd ./scripts/binutils \
|
||||
&& ./uninstall.sh --prefix="$(PREFIX)" \
|
||||
&& cd ../gcc && ./uninstall.sh --prefix="$(PREFIX)"
|
||||
|
||||
.PHONY: configure build install uninstall
|
||||
|
|
|
@ -40,13 +40,19 @@ esac; done
|
|||
|
||||
TAG='<sh-elf-vhex-binutils>'
|
||||
|
||||
# Check that the configuration step has been effectuated
|
||||
# Avoid rebuilds and error
|
||||
|
||||
if [[ -f ../../build/binutils/.fini ]]; then
|
||||
echo "$TAG already build, skipping rebuild"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ ! -d ../../build/binutils/build ]]; then
|
||||
echo "error: Are you sure to have configured binutils ? it seems that" >&2
|
||||
echo " the build directory is missing..." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ../../build/binutils/build
|
||||
|
||||
|
||||
|
@ -64,4 +70,8 @@ $quiet $make_cmd -j"$cores"
|
|||
echo "$TAG Installing to local folder..."
|
||||
|
||||
$quiet $make_cmd install-strip
|
||||
|
||||
# Indicate that the build is finished
|
||||
|
||||
touch ../.fini
|
||||
exit 0
|
||||
|
|
|
@ -50,8 +50,6 @@ esac; done
|
|||
|
||||
# check version
|
||||
|
||||
echo "$(pwd)"
|
||||
|
||||
list_version=$(basename $(ls -d ../../patchs/binutils/*))
|
||||
if [[ "$version" == '?' ]]; then
|
||||
echo "$list_version"
|
||||
|
@ -82,11 +80,10 @@ 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"
|
||||
if [[ -e build ]]; then
|
||||
rm -rf build
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
[[ -d ../../build/binutils/build ]] && rm -rf ../../build/binutils/build
|
||||
[[ -f ../../build/binutils/.fini ]] && rm -f ../../build/binutils/.fini
|
||||
fi
|
||||
|
||||
# Check dependencies for binutils and GCC
|
||||
|
|
|
@ -49,11 +49,13 @@ esac; done
|
|||
TAG='<sh-elf-vhex-binutils>'
|
||||
PREFIX="$prefix"
|
||||
|
||||
# Check that the configuration step has been effectuated
|
||||
# Check that all tools has been generated
|
||||
|
||||
if [[ ! -d ../../build/binutils/build ]]; then
|
||||
echo "error: Are you sure to have configured binutils ? it seems that" >&2
|
||||
echo " the build directory is missing..." >&2
|
||||
existing_as="../../build/binutils/bin/sh-elf-vhex-as"
|
||||
|
||||
if [[ ! -f "$existing_as" ]]; then
|
||||
echo "error: Are you sure to have built binutils ? it seems that" >&2
|
||||
echo " the 'as' tool is missing..." >&2
|
||||
exit 1
|
||||
fi
|
||||
cd ../../build/binutils
|
||||
|
|
|
@ -54,6 +54,22 @@ TAG='<sh-elf-vhex-gcc>'
|
|||
|
||||
source ../utils.sh
|
||||
|
||||
|
||||
# Avoid rebuilds and error
|
||||
|
||||
if [[ -f ../../build/gcc/.fini ]]; then
|
||||
echo "$TAG already build, skipping rebuild"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ ! -d ../../build/gcc/build ]]; then
|
||||
echo "error: Are you sure to have built GCC ? it seems that" >&2
|
||||
echo " the build directory is missing..." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ../../build/gcc/build
|
||||
|
||||
# OpenBSD apparently installs these in /usr/local
|
||||
|
||||
extra_args=
|
||||
|
@ -61,10 +77,7 @@ if [[ $(uname) == "OpenBSD" ]]; then
|
|||
extra_args='--with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local'
|
||||
fi
|
||||
|
||||
# Create the build directory
|
||||
|
||||
mkdir -p ../../build/gcc/build
|
||||
cd ../../build/gcc/build
|
||||
|
||||
|
||||
|
||||
|
@ -146,9 +159,8 @@ cd ..
|
|||
# Build Vhex custom C standard library
|
||||
|
||||
rm -rf fxlibc
|
||||
$quiet git clone https://gitea.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
|
||||
$quiet git clone https://gitea.planet-casio.com/Vhex-Kernel-Core/fxlibc.git --branch dev
|
||||
cd fxlibc
|
||||
$quiet git checkout dev
|
||||
|
||||
$quiet cmake -DFXLIBC_TARGET=vhex-sh -B build-vhex \
|
||||
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-vhex.cmake \
|
||||
|
@ -230,4 +242,8 @@ $quiet $make_cmd -j"$cores" all-target-libgcc
|
|||
echo "$TAG Install libgcc (stage 2)..."
|
||||
|
||||
$quiet $make_cmd -j"$cores" install-strip-target-libgcc
|
||||
|
||||
# Indicate that the build is finished
|
||||
|
||||
touch ../.fini
|
||||
exit 0
|
||||
|
|
|
@ -79,11 +79,10 @@ if [[ -f "$existing_gcc" ]]; then
|
|||
existing_version=$($existing_gcc --version | head -n 1 | grep -Eo '[0-9.]+$')
|
||||
if [[ $existing_version == $VERSION ]]; then
|
||||
echo "$TAG Version $VERSION already installed, skipping rebuild"
|
||||
if [[ -e ../../build/gcc/build ]]; then
|
||||
rm -rf ../../build/gcc/build
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
[[ -d ../../build/gcc/build ]] && rm -rf ../../build/gcc/build
|
||||
[[ -f ../../build/gcc/.fini ]] && rm -f ../../build/gcc/.fini
|
||||
fi
|
||||
|
||||
# Download archive
|
||||
|
@ -106,7 +105,7 @@ fi
|
|||
|
||||
echo "$TAG Extracting $ARCHIVE..."
|
||||
|
||||
mkdir -p ../../build/gcc/
|
||||
mkdir -p ../../build/gcc/build
|
||||
cd ../../build/gcc
|
||||
|
||||
unxz -c < $ARCHIVE | tar -xf -
|
||||
|
|
|
@ -49,11 +49,13 @@ esac; done
|
|||
TAG='<sh-elf-vhex-gcc>'
|
||||
PREFIX="$prefix"
|
||||
|
||||
# Check that the configuration step has been effectuated
|
||||
# Check that all tools has been generated
|
||||
|
||||
if [[ ! -d ../../build/gcc/build ]]; then
|
||||
echo "error: Are you sure to have configured GCC ? it seems that" >&2
|
||||
echo " the build directory is missing..." >&2
|
||||
existing_gcc="../../build/gcc/bin/sh-elf-vhex-gcc"
|
||||
|
||||
if [[ ! -f "$existing_gcc" ]]; then
|
||||
echo "error: Are you sure to have built GCC ? it seems that" >&2
|
||||
echo " the tool is missing..." >&2
|
||||
exit 1
|
||||
fi
|
||||
cd ../../build/gcc
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
[package]
|
||||
name = 'sh-elf-vhex'
|
||||
version = '1.0.1'
|
||||
type = 'app'
|
||||
|
||||
[build]
|
||||
configure = 'make -f giteapc.make configure'
|
||||
build = 'make -f giteapc.make build'
|
||||
install = 'PREFIX=$VXSDK_INSTALL_PREFIX make -f giteapc.make install'
|
||||
uninstall = 'PREFIX=$VXSDK_INSTALL_PREFIX make -f giteapc.make uninstall'
|
Loading…
Reference in New Issue