branch: externals/gpr-query commit fd1670eded985f20ca0fd1f9254f7d8f05452e12 Author: Stephen Leake <stephen_le...@stephe-leake.org> Commit: Stephen Leake <stephen_le...@stephe-leake.org>
* install.sh: Just copy alr build binary, clean up --- install.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 961272cba8..b6d6c25113 100755 --- a/install.sh +++ b/install.sh @@ -3,21 +3,26 @@ # # See build.sh for build (must be run before install). -# $1 : optional --prefix=<dir> +# $1 : optional <install dir> # # If you don't have write permission in the GNAT installation # directory, you need to use --prefix=<dir>, or run with root # privileges. -# We use 'gprinstall', because it defaults to the gnat compiler -# install directory; gpr_query relies on the format of the *.ali -# files, so it is tightly tied to the compiler version. +if [ x$1 = x ]; then + PREFIX=$HOME/.local + # as recommended by https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html +else + PREFIX=$1 +fi + +echo "installing gpr-query executables to" $PREFIX/bin if type alr; then - alr exec -- gprinstall -f -p -P emacs_gpr_query.gpr --install-name=emacs_gpr_query $1 + cp emacs_gpr_query/bin/* $PREFIX/bin elif type gprbuild; then - gprinstall -f -p -P emacs_gpr_query.gpr --install-name=emacs_gpr_query $1 + cp bin/* $PREFIX/bin else echo "neither Alire nor gnat compiler found"