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.
This commit is contained in:
parent
6f7ac4559f
commit
2eea83a65f
2
_tags
2
_tags
|
@ -1,7 +1,7 @@
|
|||
# -*- conf -*-
|
||||
|
||||
# Use compiler interfaces
|
||||
<src/**/*.ml{,i}>: use_compiler_libs
|
||||
<src/**/*.ml{,i}>: package(compiler-libs)
|
||||
|
||||
# Use camlp5
|
||||
<src/camlp5/**/*.ml{,i}>: use_camlp5
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
(* Must be the same as driver/errors.mli from ocaml sources. *)
|
||||
open Format
|
||||
val report_error : formatter -> exn -> unit
|
Loading…
Reference in New Issue