-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: HIPO submodule and installation script
- Loading branch information
Showing
6 changed files
with
49 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
# install HIPO locally | ||
|
||
set -eou pipefail | ||
|
||
# set the installation prefix: the default is clas12root/hipo, and it may be overriden by user argument | ||
top_dir=$(cd $(dirname ${BASH_SOURCE[0]:-$0}) && pwd -P) | ||
[ $# -ge 1 ] && prefix=$1 || prefix=$top_dir/hipo | ||
|
||
# check for meson and ninja | ||
if ! type meson; then | ||
echo "ERROR: 'meson' is needed to build HIPO; you can install it with your package manager or with 'pip'." >&2 | ||
exit 1 | ||
fi | ||
if ! type ninja; then | ||
echo "WARNING: 'ninja' may be needed for 'meson', unless you prefer a different default backend; building HIPO may fail." >&2 | ||
fi | ||
|
||
# compile and install | ||
source_dir=$top_dir/hipo_src | ||
build_dir=$source_dir/build | ||
echo """================================================================================== | ||
source directory: $source_dir | ||
build directory: $build_dir | ||
installation directory: $prefix | ||
================================================================================== | ||
""" | ||
meson setup --wipe $build_dir $source_dir --prefix=$prefix # use --wipe to force a 'clean' build | ||
meson install -C $build_dir | ||
echo """================================================================================== | ||
Done installing HIPO. | ||
You may now set your environment to point to this installation: | ||
- for bash or zsh: export HIPO=$prefix | ||
- for csh or tcsh: setenv HIPO $prefix | ||
""" |