Refactoring, 1st tier:
[SXSI/xpathcomp.git] / myocamlbuild.ml
index 62dbdaf..41c25b5 100644 (file)
@@ -106,7 +106,7 @@ let cxx_compile env build =
   let src = env "%.cpp" and obj = env "%.o" in
   let local_include = Depends.cxx src in
   let local_dispatch = List.map (fun p -> List.map (fun p' -> p'/p) project_dirs) local_include in
-  let  () = ignore (build local_dispatch) in
+  let  () = ignore (build local_dispatch ) in
   Cmd(S[A cxx_cmd; A "-o" ; P obj; A "-c";  S !cxx_flags; cxx_include_flags; P src])
 
 (* Native compile and link action *)
@@ -140,7 +140,8 @@ let () = dispatch begin
        cxx_link_flags @= [ A "-g" ];
       end
       else begin
-       compile_flags @= [A "-noassert"; A "-unsafe"];
+       compile_flags @= [A "-noassert"];
+       pp_macro_options @= [ A "-unsafe" ];
        native_compile_flags @= [ A "-inline"; A ocaml_inline ];
        cxx_flags @= [ A "-O3" ]
       end;
@@ -160,7 +161,7 @@ let () = dispatch begin
       rule "compile cpp -> o" ~prod:"%.o" ~deps:[ "%.cpp"] cxx_compile;
 
       let syntax_flags = S ([ A "-syntax"; A "camlp4o";
-                           S (ppopt [A "-printer" ; A"ocaml"]);
+                           S (ppopt [A "-printer" ; A"Camlp4OCamlAstDumper"]);
                            S (ppopt !pp_macro_options) ])
       in
       flag [ "ocaml"; "ocamldep"] syntax_flags;