diff --git a/ocaml/Makefile b/ocaml/Makefile index 7e514d1a..9c689f56 100644 --- a/ocaml/Makefile +++ b/ocaml/Makefile @@ -1,9 +1,9 @@ .NOPARALLEL: -# Check if QPACKAGE_ROOT is defined -ifndef QPACKAGE_ROOT +# Check if QP_ROOT is defined +ifndef QP_ROOT $(info -------------------- Error --------------------) -$(info QPACKAGE_ROOT undefined. Source the quantum_package.rc script) +$(info QP_ROOT undefined. Source the quantum_package.rc script) $(info -----------------------------------------------) $(error ) endif @@ -32,10 +32,10 @@ default: $(ALL_TESTS) $(ALL_EXE) .gitignore echo $$i ; \ done > .gitignore -executables: $(QPACKAGE_ROOT)/data/executables +executables: $(QP_ROOT)/data/executables -$(QPACKAGE_ROOT)/data/executables: - $(QPACKAGE_ROOT)/scripts/module/create_executables_list.sh +$(QP_ROOT)/data/executables: + $(QP_ROOT)/scripts/module/create_executables_list.sh external_libs: opam install cryptokit core @@ -62,8 +62,8 @@ qp_run.native: $(MLFILES) $(MLIFILES) executables $(OCAMLBUILD) $*.native -use-ocamlfind $(PKGS) ln -s $*.native $* -ezfio.ml: ${QPACKAGE_ROOT}/EZFIO/Ocaml/ezfio.ml - cp ${QPACKAGE_ROOT}/EZFIO/Ocaml/ezfio.ml . +ezfio.ml: ${QP_ROOT}/EZFIO/Ocaml/ezfio.ml + cp ${QP_ROOT}/EZFIO/Ocaml/ezfio.ml . qptypes_generator.byte: qptypes_generator.ml $(OCAMLBUILD) qptypes_generator.byte -use-ocamlfind @@ -71,8 +71,8 @@ qptypes_generator.byte: qptypes_generator.ml Qptypes.ml: qptypes_generator.byte ./qptypes_generator.byte > Qptypes.ml -${QPACKAGE_ROOT}/EZFIO/Ocaml/ezfio.ml: - $(MAKE) -C ${QPACKAGE_ROOT}/src ezfio +${QP_ROOT}/EZFIO/Ocaml/ezfio.ml: + $(MAKE) -C ${QP_ROOT}/src ezfio Input_auto_generated.ml qp_edit.ml: ei_handler.py ocaml_global diff --git a/ocaml/Qpackage.ml b/ocaml/Qpackage.ml index a3862f11..ef4476c6 100644 --- a/ocaml/Qpackage.ml +++ b/ocaml/Qpackage.ml @@ -5,8 +5,8 @@ open Qputils;; (** Variables related to the quantum package installation *) let root = - match (Sys.getenv "QPACKAGE_ROOT") with - | None -> failwith "QPACKAGE_ROOT environment variable is not set. + match (Sys.getenv "QP_ROOT") with + | None -> failwith "QP_ROOT environment variable is not set. Please source the quantum_package.rc file." | Some x -> x ;; @@ -59,7 +59,7 @@ let executables = lazy ( |> List.filter ~f:(fun x -> x <> "") in match e with - | [a;b] -> (a,String.substr_replace_all ~pattern:"$QPACKAGE_ROOT" ~with_:root b) + | [a;b] -> (a,String.substr_replace_all ~pattern:"$QP_ROOT" ~with_:root b) | _ -> ("","") ) in diff --git a/setup_environment.py b/setup_environment.py index e1327ab5..e866ea1c 100755 --- a/setup_environment.py +++ b/setup_environment.py @@ -238,9 +238,11 @@ if "ninja" in l_need_genealogy: l_cmd = ["cd install;", "wget {0} -O {1} -o /dev/null ;".format(url, path_archive), - "./scripts/install_ninja.sh 2>/dev/null;", "cd -"] + "./scripts/install_ninja.sh", "cd -"] check_output(" ".join(l_cmd), shell=True) + + print "Done" l_need_genealogy.remove("ninja") print """