add a script to install compiler libraries

Ignore-this: 1be1715f4e0e3bbcb31cddaee9ff9ce6

darcs-hash:20110803113251-c41ad-48f30dafb6ad00e0549e2cece6f66a67767176d0
This commit is contained in:
Jeremie Dimino 2011-08-03 13:32:51 +02:00
parent 5eff3286aa
commit ec72c8c913
3 changed files with 58 additions and 2 deletions

18
README
View File

@ -4,9 +4,23 @@ url: https://forge.ocamlcore.org/projects/utop/
* Requirements:
utop depends on the lambda-term package, which is available at:
utop depends on the following packages:
https://forge.ocamlcore.org/projects/lambda-term/
* findlib (http://projects.camlcity.org/projects/findlib.html)
* react (http://erratique.ch/software/react)
* lwt (http://ocsigen.org/lwt/)
* camomile (http://camomile.sourceforge.net/)
* zed (http://forge.ocamlcore.org/projects/zed/)
* lambda-term (http://forge.ocamlcore.org/projects/lambda-term/)
Lwt must be compiled with react support, configure it with:
$ ./configure --enable-react
utop also requires OCaml compiler libraries. If you are using
debian, they are available as the package ocaml-compiler-libs, if
you are using godi, they are installed by default. If you installed
ocaml by hand, you can run the script utils/install-compiler-libs.sh.
* Installation:

View File

@ -6,5 +6,7 @@
# Add oasis stuff
oasis setup
chmod +x utils/install-compiler-libs.sh
# Cleanup
rm -f predist.sh boring dist.sh

40
utils/install-compiler-libs.sh Executable file
View File

@ -0,0 +1,40 @@
#!/bin/sh
#
# install-compiler-libs.sh
# ------------------------
# Copyright : (c) 2011, Jeremie Dimino <jeremie@dimino.org>
# Licence : BSD3
#
# This file is a part of utop.
set -e
if [ $# -ne 1 ]; then
echo "usage: $0 <ocaml source path>"
exit 2
fi
SOURCEPATH="$1"
if [ ! -d "$SOURCEPATH/typing" -o ! -d "$SOURCEPATH/parsing" -o ! -d "$SOURCEPATH/utils" ]; then
echo "'$1' does not contain ocaml sources."
exit 1
fi
if [ ! -f "$SOURCEPATH/typing/types.cmi" -o ! -f "$SOURCEPATH/parsing/longident.cmi" ]; then
echo "ocaml sources in '$1' are not compiled."
exit 1
fi
STDLIBPATH=`ocamlc -where`
INSTALLPATH="$STDLIBPATH/compiler-libs"
mkdir -p "$INSTALLPATH"
for dir in typing parsing utils; do
echo "copying cmi files from '$SOURCEPATH/$dir' to '$INSTALLPATH/$dir'"
mkdir -p "$INSTALLPATH"/$dir
for file in "$SOURCEPATH"/$dir/*.cmi; do
cp "$file" "$INSTALLPATH"/$dir
done
done