Commit bbb8bf0f authored by François Bobot's avatar François Bobot

[Makefile] if present, ocamlfind gives the installation directory for the why3 ocaml library

parent f78b2f35
......@@ -43,6 +43,7 @@ OCAMLLEX = @OCAMLLEX@
OCAMLYACC = @OCAMLYACC@
OCAMLDOC = @OCAMLDOC@
OCAMLLIB = @OCAMLLIB@
OCAMLINSTALLLIB = @OCAMLINSTALLLIB@
OCAMLBEST = @OCAMLBEST@
OCAMLVERSION = @OCAMLVERSION@
COQC = @COQC@
......@@ -207,8 +208,10 @@ clean::
clean_old_install:
rm -f $(BINDIR)/why3*
rm -rf $(DATADIR)/why3
rm -rf $(OCAMLINSTALLLIB)/why3
install_no_local::
install_no_local:: clean_old_install
mkdir -p $(BINDIR)
mkdir -p $(DATADIR)/why3
mkdir -p $(DATADIR)/why3/images
......@@ -235,10 +238,9 @@ install_no_local::
cp -f share/lang/why3.lang $(DATADIR)/why3/lang/why3.lang
install_no_local_lib::
rm -rf $(OCAMLLIB)/why3
mkdir -p $(OCAMLLIB)/why3
mkdir -p $(OCAMLINSTALLLIB)/why3
cp -f lib/why3/why3.cm* lib/why3/why3.[ao] \
lib/why3/META $(OCAMLLIB)/why3
lib/why3/META $(OCAMLINSTALLLIB)/why3
ifeq (@enable_local@,yes)
install install-lib:
......
......@@ -285,6 +285,14 @@ if test "$USEOCAMLFIND" = yes; then
fi
fi
#if ocamlfind is used it gives the install path for ocaml library
if test "$USEOCAMLFIND" = yes; then
OCAMLINSTALLLIB=$(ocamlfind printconf destdir)
else
OCAMLINSTALLLIB=$OCAMLLIB
fi
# checking for rubber
if test "$enable_doc" = yes ; then
AC_CHECK_PROG(RUBBER,rubber,rubber,no)
......@@ -607,6 +615,7 @@ AC_SUBST(OCAMLDOC)
AC_SUBST(OCAMLBEST)
AC_SUBST(OCAMLVERSION)
AC_SUBST(OCAMLLIB)
AC_SUBST(OCAMLINSTALLLIB)
dnl AC_SUBST(OCAMLV)
dnl AC_SUBST(FORPACK)
AC_SUBST(OCAMLGRAPHLIB)
......@@ -720,6 +729,8 @@ if test "$enable_local" = yes ; then
else
echo "Installable : yes"
echo " Binary path : $bindir"
echo " Lib path : $libdir/why3"
echo " Data path : $datarootdir/why3"
echo " Ocaml Library : $OCAMLINSTALLLIB/why3"
echo " Relocatable : $enable_relocation"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment