From e7188a63117df3ad65c764be89cabd504fe793c6 Mon Sep 17 00:00:00 2001 From: YannMagnin Date: Mon, 4 Dec 2023 10:28:48 +0100 Subject: [PATCH] vxOpenLibm - v1.0.0-rc0 : fix typo *update* > [script] | [uninstall] check `sysroot.txt` instead of `install_manifest.txt` | [uninstall] display sysroot information during validation step | [update] check `sysroot.txt` instead of `install_manifest.txt` | [update] display sysroot information during validation step *fix* > [project] | [README] fix typo > [scripts] | [install] fix typo | [uninstall] fix typo | [update] fix typo --- .gitignore | 2 +- README.md | 25 ++++++++++++++++--------- scripts/_utils.sh | 4 ++-- scripts/install.sh | 14 +++++++------- scripts/uninstall.sh | 15 ++++++++------- scripts/update.sh | 12 ++++++------ 6 files changed, 40 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index 1dc7374..615c60e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -openlibm +_openlibm commit.txt diff --git a/README.md b/README.md index a67a2cd..6a7c639 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,30 @@ # vxOpenLibM -This is a fork of OpenLibm with the support of the sh3eb architecture, intended -for the Vhex kernel project. +This is a wrapper around the `OpenLibm` with the support of the `sh3eb` +architecture (written by [Lephenixnoir](https://silent-tower.net/projects/)), +intended for the Vhex kernel project. -This work will directly patch the current openlibm sources code and use a -custom build system based on CMake instead of the Makefile mess used in the -original project. +This project will directly patch the current `openlibm` source files and use a +custom build system based on CMake instead of the "Makefile mess" used in the +original project to handle properly the install/uninstall process. ## Installing You can use the `scripts/install.sh --help` to see manual installation of the -project. But, since the compiler used for this repository is "sh-elf-vhex" -which automatically install this project as a own dependency you theorically do -not need to install this project. +project. But, since the compiler needed to build the `vxOpenLibm` is +`sh-elf-vhex` which automatically installs this project, you theoretically do +not need to do so. ## README and Licensing See the original [REAME file](https://github.com/JuliaMath/openlibm/blob/master/README.md) of -the openlibm project for futher information. +the openlibm project for further information. Note that Openlibm contains code covered by various licenses, see [LICENSE.md](https://github.com/JuliaMath/openlibm/blob/master/LICENSE.md) + +## Special thanks + +A big thanks to +[Lephenixnoir](https://silent-tower.net/projects/) who ported the `sh3eb` +support to `openlibm`! diff --git a/scripts/_utils.sh b/scripts/_utils.sh index 3d1799b..adfcaae 100644 --- a/scripts/_utils.sh +++ b/scripts/_utils.sh @@ -1,4 +1,4 @@ -# module used to provide common variable / functions +# module used to provide common variables / functions # this file must not be manually invoked #--- @@ -22,7 +22,7 @@ function callcmd() { then echo "$@" if ! "$@"; then - echo "$TAG error: command failed, abord" + echo "$TAG error: command failed, abort" kill -s TERM $TOP_PID fi else diff --git a/scripts/install.sh b/scripts/install.sh index dd9595b..fb7b20b 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -6,7 +6,7 @@ function help() { cat << EOF -Installation script for vxOpenLibm project (fork of OpenLibm) +Installation script for the vxOpenLibm project (fork of OpenLibm) Usage: $0 [options...] @@ -18,7 +18,7 @@ Options: --overwrite remove the cloned OpenLibm repo if already exists Notes: - This project is mainly automatically installed as a dependency of the + This project is mainly installed automatically as a dependency of the sh-elf-vhex (Vhex's compiler) project. EOF exit 0 @@ -40,7 +40,7 @@ for arg; do --prefix-sysroot=*) prefix=${arg#*=};; --overwrite) overwrite=true;; *) - echo "error: unreconized argument '$arg', giving up." >&2 + echo "error: unrecognized argument '$arg', giving up." >&2 exit 1 esac done @@ -51,16 +51,16 @@ done if test -z "$prefix" then - echo 'You need to specify the sysroot prefix, abord' >&2 + echo 'You need to specify the sysroot prefix, abort' >&2 exit 1 fi if [[ ! $(sh-elf-vhex-gcc --version) ]] then echo -e \ - 'You need to install the sh-elf-vhex compiler to install this ' \ + 'You need to install the "sh-elf-vhex" compiler to install this ' \ 'project.\n' \ - 'Also note that the installation if the compiler will automatically ' \ + 'Also note that the installation of the compiler will automatically ' \ 'install this project' exit 1 fi @@ -83,7 +83,7 @@ then echo " - overwrite = $overwrite" read -p 'Perform operations [Yn] ? ' -r valid if [[ "$valid" == 'n' ]]; then - echo 'Operation aborted' >&2 + echo 'Operations aborted' >&2 exit 1 fi fi diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh index c51c4e9..e2197e5 100755 --- a/scripts/uninstall.sh +++ b/scripts/uninstall.sh @@ -6,7 +6,7 @@ function help() { cat << EOF -Uninstallation script for vxOpenLibm project (fork of OpenLibm) +Uninstallation script for the vxOpenLibm project (fork of OpenLibm) Usage: $0 [options...] @@ -16,7 +16,7 @@ Options: --quiet do not display information during operations Notes: - This project is a dependency of "sh-elf-vhex" compiler, manual + This project is a dependency of the "sh-elf-vhex" compiler, manual uninstallation can break all the toolchain. EOF exit 0 @@ -34,7 +34,7 @@ for arg; do -y | --yes) skip_input=true;; --quiet) verbose=false;; *) - echo "error: unreconized argument '$arg', giving up." >&2 + echo "error: unrecognized argument '$arg', giving up." >&2 exit 1 esac done @@ -47,19 +47,20 @@ _src=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) cd "$_src" || exit 1 source ./_utils.sh -if ! test -f '../_openlibm/_build-vhex/install_manifest.txt' +if ! test -f '../_openlibm/_build-vhex/sysroot.txt' then echo 'vxOpenLibm not installed, nothing to do' exit 0 fi +prefix=$(cat '../_openlibm/_build-vhex/sysroot.txt') if [[ "$skip_input" != 'true' ]] then - echo 'This script will remove the vxOpenLibm from the builded sysroot' - read -p 'Perform operation [yN] ? ' -r valid + echo "This script will remove the vxOpenLibm from the sysroot '$prefix'" + read -p 'Perform operations [yN] ? ' -r valid if [[ "$valid" != 'y' ]] then - echo 'Operation aborded' >&2 + echo 'Operations aborted' >&2 exit 1 fi fi diff --git a/scripts/update.sh b/scripts/update.sh index a162946..6d52fe9 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -6,7 +6,7 @@ function help() { cat << EOF -Update script the for vxOpenLibm script (fork of OpenLibm) +Update script for the vxOpenLibm project (fork of OpenLibm) Usage: $0 [options...] @@ -16,8 +16,8 @@ Options: -v, --verbose display more information during operations Notes: - This project is a dependency of "sh-elf-vhex" compiler, manual - uninstallation can break all the toolchain. + This project is mainly installed automatically as a dependency of the + sh-elf-vhex (Vhex's compiler) project. EOF exit 0 } @@ -34,7 +34,7 @@ for arg; do -y | --yes) skip_input=true;; -v | --verbose) verbose=true;; *) - echo "error: unreconized argument '$arg', giving up." >&2 + echo "error: unrecognized argument '$arg', giving up." >&2 exit 1 esac done @@ -57,10 +57,10 @@ prefix=$(cat '../_openlibm/_build-vhex/sysroot.txt') if [[ "$skip_input" != 'true' ]] then echo "This script will update the vxOpenLibm for the sysroot '$prefix'" - read -p 'Perform operation [Yn] ? ' -r valid + read -p 'Perform operations [Yn] ? ' -r valid if [[ "$valid" == 'n' ]] then - echo 'Operation aborded' >&2 + echo 'Operations aborted' >&2 exit 1 fi fi