From 2eea83a65f5c654be2b07dcad492f6f3705f522c Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Mon, 20 Oct 2014 17:10:42 +0400 Subject: [PATCH] Remove unused/deprecated autodetection from myocamlbuild.ml. FINDLIB_VERSION is not used anymore. compiler-libs are provided as a package in findlib >=1.4. errors.cmi is now provided by compiler-libs. --- _tags | 2 +- myocamlbuild.ml | 16 +--------------- src/lib/errors.mli | 3 --- 3 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 src/lib/errors.mli diff --git a/_tags b/_tags index 2f4bae3..1e43ae5 100644 --- a/_tags +++ b/_tags @@ -1,7 +1,7 @@ # -*- conf -*- # Use compiler interfaces -: use_compiler_libs +: package(compiler-libs) # Use camlp5 : use_camlp5 diff --git a/myocamlbuild.ml b/myocamlbuild.ml index dcd9150..2c28054 100644 --- a/myocamlbuild.ml +++ b/myocamlbuild.ml @@ -32,7 +32,6 @@ let () = flag ["ocaml"; "link"; "toplevel"] & A"-linkpkg"; let env = BaseEnvLight.load () in - let path = BaseEnvLight.var_get "compiler_libs" env in let stdlib = BaseEnvLight.var_get "standard_library" env in let ocaml_version = @@ -41,21 +40,8 @@ let () = Printf.sprintf "OCAML_VERSION %d" (major * 10000 + minor * 100 + patchlevel)) in - let findlib_version = BaseEnvLight.var_get "findlib_version" env in - let findlib_version = - Scanf.sscanf findlib_version "%d.%d.%d" (fun major minor patchlevel -> - Printf.sprintf "FINDLIB_VERSION %d" (major * 10000 + minor * 100 + patchlevel)) - in - (* Cppo *) - flag ["cppo"] & S[A"-D"; A ocaml_version; A"-D"; A findlib_version]; - - (* Add directories for compiler-libraries: *) - let paths = List.filter Sys.file_exists [path; path / "typing"; path / "parsing"; path / "utils"] in - let paths = List.map (fun path -> S [A "-I"; A path]) paths in - flag ["ocaml"; "compile"; "use_compiler_libs"] & S paths; - flag ["ocaml"; "ocamldep"; "use_compiler_libs"] & S paths; - flag ["ocaml"; "doc"; "use_compiler_libs"] & S paths; + flag ["cppo"] & S[A"-D"; A ocaml_version]; let paths = [A "-I"; A "+camlp5"] in flag ["ocaml"; "compile"; "use_camlp5"] & S paths; diff --git a/src/lib/errors.mli b/src/lib/errors.mli deleted file mode 100644 index 5d10804..0000000 --- a/src/lib/errors.mli +++ /dev/null @@ -1,3 +0,0 @@ -(* Must be the same as driver/errors.mli from ocaml sources. *) -open Format -val report_error : formatter -> exn -> unit