diff --git a/README.md b/README.md index e69de29..72a7b9e 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,27 @@ +# vxLibc + +This is a wrapper around the +[fxlibc](https://gitea.planet-casio.com/Vhex-Kernel-Core/fxlibc) project +which is the standard system C library implementation for all Casio fx +calculators. + +## Installing + +You can use the `scripts/install.sh --help` to see manual installation of the +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://gitea.planet-casio.com/Vhex-Kernel-Core/fxlibc/src/branch/master/README.md) +of the `fxlibc` project for further information. +Note that `fxlibc` uses the `CC0 1.0 Universal License`, see +[LICENSE](https://gitea.planet-casio.com/Vhex-Kernel-Core/fxlibc/src/branch/master/LICENSE) + +## Special thanks + +A big thanks to +[Lephenixnoir](https://silent-tower.net/projects/) who ported most of the +standard! diff --git a/patches/CMakeLists.txt b/patches/CMakeLists.txt index 157484c..a066f9b 100644 --- a/patches/CMakeLists.txt +++ b/patches/CMakeLists.txt @@ -1,6 +1,6 @@ # This cmake file will be dropped at the root of the openlibm repository -# folder and need to be the more generic as possible to support further -# update of the original project +# folder and need to be as generic as possible to support further update +# of the original project cmake_minimum_required(VERSION 3.5) ## fetch source files diff --git a/scripts/_utils.sh b/scripts/_utils.sh index 5848f2b..172b204 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 446b3de..6e082d4 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -6,7 +6,7 @@ function help() { cat << EOF -Installation script for vxLibc project (own implementation of the Libc) +Installation script for the vxLibc project (own implementation of the Libc) 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 cfffcbc..3ecfec9 100755 --- a/scripts/uninstall.sh +++ b/scripts/uninstall.sh @@ -6,7 +6,7 @@ function help() { cat << EOF -Uninstallation script for vxLibc project (own implementation of the libc) +Uninstallation script for the vxLibc project (own implementation of the libc) 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,21 @@ _src=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) cd "$_src" || exit 1 source ./_utils.sh -if ! test -f '../_fxlibc/_build-vhex/install_manifest.txt' +if ! test -f '../_openlibm/_build-vhex/sysroot.txt' then echo 'vxLibc 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 vxLibc from the builded sysroot' + echo "This script will remove the vxLibc from the sysroot '$prefix'" read -p 'Perform operation [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 e15a603..1086c4f 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -6,7 +6,7 @@ function help() { cat << EOF -Update script the for vxLibc script (own implementation of the libc) +Update script for the vxLibc project (own implementation of the libc) 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 '../_fxlibc/_build-vhex/sysroot.txt') if [[ "$skip_input" != 'true' ]] then echo "This script will update the vxLibc 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 @@ -84,8 +84,8 @@ then echo "$TAG try to bump the vxOpenLibm dependency..." ../_vxopenlibm/scripts/update.sh --yes else - echo "$TAG WARNING: vxOpenLibm installed externaly, skipped" + echo "$TAG WARNING: vxOpenLibm installed externally, skipped" fi -echo "$TAG update operation will reclone and rebuild the project..." +echo "$TAG update operations will reclone and rebuild the project..." ./install.sh --prefix-sysroot="$prefix" --yes --overwrite