X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=myocamlbuild.ml;h=1bb24103152c7716143634e0b8e054b9776bea66;hb=73755ec720254766e4504ac72684be5e357b6939;hp=7a792d1b523da931e152f3db9b650b405fd30bba;hpb=cba2938d929fd5119b1491686ddc224d5af618c6;p=tatoo.git diff --git a/myocamlbuild.ml b/myocamlbuild.ml index 7a792d1..1bb2410 100644 --- a/myocamlbuild.ml +++ b/myocamlbuild.ml @@ -1,3 +1,22 @@ +(***********************************************************************) +(* *) +(* TAToo *) +(* *) +(* Kim Nguyen, LRI UMR8623 *) +(* Université Paris-Sud & CNRS *) +(* *) +(* Copyright 2010-2013 Université Paris-Sud and Centre National de la *) +(* Recherche Scientifique. All rights reserved. This file is *) +(* distributed under the terms of the GNU Lesser General Public *) +(* License, with the special exception on linking described in file *) +(* ../LICENSE. *) +(* *) +(***********************************************************************) + +(* + Time-stamp: +*) + open Ocamlbuild_plugin open Command open Myocamlbuild_config @@ -31,7 +50,7 @@ let ( =:: ) r e = r := e :: !r (* Pre-processed files *) let pp_macro_options = ref - [ A "-parser"; A "macro"; A dwsize; A "-I"; P include_path ] + [ A dwsize; A "-I"; P include_path ] let include_full_path = Pathname.pwd / include_path module Depends = @@ -93,7 +112,7 @@ let cxx_compile env _build = (* Native compile and link action *) -let ocamlfind x = S[ T (Tags.singleton "ocamlfind"); A"ocamlfind"; x ; A "-package"; A ocamlfind_packages ] +let ocamlfind x = S[ T (Tags.singleton "ocamlfind"); A"ocamlfind"; x ; A "-package"; A ocamlfind_packages; A "-syntax"; A "camlp4o" ] let ppopt l = List.map (fun e -> S[ A"-ppopt"; e ]) l @@ -143,9 +162,7 @@ let () = dispatch begin | After_rules -> dep [ "link" ] cstub_lib; rule "c++: cpp & depends -> o" ~prod:"%.o" ~deps:[ "%.cpp" ] cxx_compile; - let syntax_flags = S ([ A "-syntax"; A "camlp4o"; - S (ppopt [A "-printer" ; A"Camlp4OCamlAstDumper"]); - S (ppopt !pp_macro_options) ]) + let syntax_flags = S[ S (ppopt !pp_macro_options) ] in flag [ "ocaml"; "ocamldep"] syntax_flags; flag [ "ocaml"; "compile" ] (S[ A "-cc"; A cxx_cmd; S cxx_flags_for_ml ; syntax_flags; S !compile_flags ]); @@ -155,6 +172,6 @@ let () = dispatch begin Quote (S [ _S cstub_lib; S !cxx_link_flags]) ]); flag [ "ocaml"; "byte"; "link" ] (_S !byte_link_flags); flag [ "ocaml"; "native"; "link" ] (_S !native_link_flags); - flag [ "c"; "ocamlmklib"] (S[ A "-custom"; ]) + flag [ "c"; "ocamlmklib"] (A "-custom") | _ -> () end