z3 now works in vagrant environment.

This commit is contained in:
michael lowell roberts 2017-02-19 14:33:37 -08:00
Родитель cb3b19436b
Коммит f643d53080
3 изменённых файлов: 27 добавлений и 14 удалений

Просмотреть файл

@ -21,4 +21,4 @@ if [ "x$1" == "x--vagrant" ]; then
git submodule foreach '$SHELL ../../scripts/setup/git.sh'
fi
$SHELL $gitroot/scripts/setup/z3.sh
$SHELL $gitroot/scripts/setup/z3.sh build

Просмотреть файл

@ -17,5 +17,5 @@ $SHELL $gitroot/scripts/setup/python.sh
if [ "x$1" == "x--vagrant" ] && ! grep -q 'cd /vagrant' $HOME/.profile; then
echo 'cd /vagrant' >> $HOME/.profile
echo 'eval "$(sh /vagrant/scripts/setup/z3.sh env)"' >> $HOME/.profile
fi

Просмотреть файл

@ -6,22 +6,35 @@
# z3 setup script
# show what's happening.
set -x
# exit on any unobserved failure.
set -e
self=$(basename $0)
gitroot=$(git rev-parse --show-toplevel)
target=$gitroot/submodules/z3/build/z3
if [ ! -x "$target" ]; then
echo "$self: i couldn't find the z3 executable; rebuilding..."
cd $gitroot/submodules/z3
git clean -fdx
python scripts/mk_make.py
cd build && make
else
echo "$self: i found the z3 executable at '$target'; build skipped."
fi
case $1 in
"env")
echo "# type \`eval \"\$(sh $0 env)\"\` to add the following"
echo "# to the environment."
echo "export PATH=$gitroot/submodules/z3/build:\$PATH"
echo "export LD_LIBRARY_PATH=$gitroot/submodules/z3/build:\$LD_LIBRARY_PATH"
echo "export PYTHONPATH=$gitroot/submodules/z3/build/python:\$PYTHONPATH"
;;
"build")
# show what's happening.
set -x
target=$gitroot/submodules/z3/build/z3
if [ ! -x "$target" ]; then
echo "$self: i couldn't find the z3 executable; rebuilding..."
cd $gitroot/submodules/z3
git clean -fdx
python scripts/mk_make.py
cd build && make
else
echo "$self: i found the z3 executable at '$target'; build skipped."
fi
;;
*)
echo "usage: $self env|build"
esac