Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
thelema committed Aug 30, 2012
1 parent 58acbf4 commit d6b7a95
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions libs/estring/_tags
@@ -1,2 +1,3 @@
<*.ml> or <*.mli>: camlp4of
<pa_estring_top.*>: compiler-libs
true: debug
7 changes: 6 additions & 1 deletion myocamlbuild.ml
Expand Up @@ -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
Expand Down Expand Up @@ -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"] &
Expand Down
1 change: 1 addition & 0 deletions src/_tags
Expand Up @@ -5,3 +5,4 @@ true: debug
<batFingerTree.ml>: rectypes
<{batMap,batVect,batFile,batPervasives,batParserCo,batSet,batLogger,batPathGen,batSplay}.ml>: warn_z
<{batPervasives,batIMap,batLog}.ml>: warn_-9
<batteriesHelp.*>: compiler-libs

0 comments on commit d6b7a95

Please sign in to comment.