From d6b7a95e80534e68dd413f03fdc42b367def6f77 Mon Sep 17 00:00:00 2001 From: Eric Norige Date: Mon, 2 Jul 2012 16:45:10 -0400 Subject: [PATCH] Add compiler-libs tag for OCaml 4.00 include dir OCaml 4.00 has moved some libraries into a compiler-libs subdirectory, so -I +compiler_libs is needed to compile --- libs/estring/_tags | 1 + myocamlbuild.ml | 7 ++++++- src/_tags | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libs/estring/_tags b/libs/estring/_tags index e1bd79157..c160f26e8 100644 --- a/libs/estring/_tags +++ b/libs/estring/_tags @@ -1,2 +1,3 @@ <*.ml> or <*.mli>: camlp4of +: compiler-libs true: debug \ No newline at end of file diff --git a/myocamlbuild.ml b/myocamlbuild.ml index ef5ac52c5..fd2ecb977 100644 --- a/myocamlbuild.ml +++ b/myocamlbuild.ml @@ -13,7 +13,7 @@ let packs = "bigarray,num,str" let doc_intro = "build/intro.text" let mkconf = "build/mkconf.byte" let pa_llist = "src/syntax/pa_llist/pa_llist.cmo" - +let compiler_libs = if Sys.ocaml_version.[0] = '4' then [A"-I"; A"+compiler-libs"] else [] (* removes the trailing newlines in the stdout of s *) let run_and_read s = let res = run_and_read s in @@ -167,6 +167,11 @@ let _ = dispatch begin function ocaml_lib "src/batteries"; ocaml_lib "src/batteriesThread"; + flag ["ocaml"; "compile"; "compiler-libs"] & S compiler_libs; + flag ["ocaml"; "link"; "compiler-libs"] & S compiler_libs; + flag ["ocaml"; "ocamldep"; "compiler-libs"] & S compiler_libs; + + flag ["ocaml"; "link"; "linkall"] & S[A"-linkall"]; (* dep ["ocaml"; "link"; "include_tests"; "byte"] & diff --git a/src/_tags b/src/_tags index d51fa51f0..68bf217ed 100644 --- a/src/_tags +++ b/src/_tags @@ -5,3 +5,4 @@ true: debug : rectypes <{batMap,batVect,batFile,batPervasives,batParserCo,batSet,batLogger,batPathGen,batSplay}.ml>: warn_z <{batPervasives,batIMap,batLog}.ml>: warn_-9 +: compiler-libs \ No newline at end of file