From 287a2b1ef3ae8a1b9c518d5c275e542db25cf2a5 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 7 Oct 2014 14:45:44 +0200 Subject: [PATCH] Added ocaml/opam install in setup_environment.sh --- Makefile | 2 ++ ocaml/Makefile | 4 ++++ ocaml/_tags | 2 +- setup_environment.sh | 12 ++++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a28670fe..87436fc0 100644 --- a/Makefile +++ b/Makefile @@ -27,3 +27,5 @@ doc: src: irpf90 EZFIO export QPACKAGE_ROOT=$$PWD ; \ $(MAKE) -C src + + diff --git a/ocaml/Makefile b/ocaml/Makefile index 80f19054..d4d4a90b 100644 --- a/ocaml/Makefile +++ b/ocaml/Makefile @@ -30,10 +30,14 @@ executables: $(ALL_EXE) mv _build/$*.inferred.mli . %.byte: $(MLFILES) $(MLIFILES) + rm -f -- $* $(OCAMLBUILD) $*.byte -use-ocamlfind $(PKGS) + ln -s $*.native $* %.native: $(MLFILES) $(MLIFILES) + rm -f -- $* $(OCAMLBUILD) $*.native -use-ocamlfind $(PKGS) + ln -s $*.native $* ezfio.ml: ${QPACKAGE_ROOT}/EZFIO/Ocaml/ezfio.ml cp ${QPACKAGE_ROOT}/EZFIO/Ocaml/ezfio.ml . diff --git a/ocaml/_tags b/ocaml/_tags index 55cb5085..6dc2a50c 100644 --- a/ocaml/_tags +++ b/ocaml/_tags @@ -1,3 +1,3 @@ -true: package(core) +true: package(core,async) true: thread diff --git a/setup_environment.sh b/setup_environment.sh index e79f07f8..8659885a 100755 --- a/setup_environment.sh +++ b/setup_environment.sh @@ -39,3 +39,15 @@ then echo "Error in IRPF90 installation" exit 1 fi + +# Ocaml installation +make -C ocaml qp_create_ezfio_from_xyz.native +if [[ $? -ne 0 ]] then + curl -kL https://raw.github.com/hcarty/ocamlbrew/master/ocamlbrew-install | env OCAMLBREW_FLAGS="-r" bash > ocaml_install.log + grep "source " install.log | grep "etc/ocamlbrew.bashrc" >> quantum_package.rc + source quantum_package.rc + echo Y | opam install core async +fi + + +make -C ocaml qp_compilation_test.byte