X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=myocamlbuild.ml;h=dbc0a4549d4d3941d5ee536cd1dccb10c3e63d91;hp=7f8652359801060ac51115a3f236a88df7dcab3d;hb=3fadb034bfc0075d420bdd1383214014500501b8;hpb=c5fc33c2eda7c2bb45c3bafbe74827f17e215fb8 diff --git a/myocamlbuild.ml b/myocamlbuild.ml index 7f86523..dbc0a45 100644 --- a/myocamlbuild.ml +++ b/myocamlbuild.ml @@ -1,6 +1,9 @@ -open Ocamlbuild_plugin ;; +open Ocamlbuild_plugin +let includes = + let open Pathname in + let d = Array.to_list (readdir "include") in + List.map (concat "include") d -let includes = [ "include/utils.ml"; "include/utils32.ml"; "include/utils64.ml"; "include/debug.ml" ] let ml_str_rule () = rule ".ml.str" ~dep:"%.ml.str" ~prod:"%.ml" @@ -14,7 +17,7 @@ let ml_str_rule () = Cmd ( Sh cmd )) let () = - dispatch begin function + dispatch (function | After_rules -> dep ["ocaml";"compile";] includes; dep ["ocaml";"ocamldep"; ] includes; @@ -22,5 +25,4 @@ let () = pflag ["ocaml";"ocamldep";] "ppopt" (fun s -> S [A"-ppopt"; A (s)]); ml_str_rule () | _ -> () - -end;; + )