From: kim Date: Sun, 11 Sep 2011 12:31:09 +0000 (+0000) Subject: Fix build process to return correct line-number for preprocessed files. X-Git-Url: http://git.nguyen.vg/gitweb/?a=commitdiff_plain;ds=sidebyside;h=38d272b6d0c20bdc58e55a02c5febc99a0ce68fa;p=SXSI%2Fxpathcomp.git Fix build process to return correct line-number for preprocessed files. * make camlp4 return ocaml ast instead of plain .ml files * pass -unsafe option to camlp4 instead of ocamlopt git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/xpathcomp@1128 3cdefd35-fc62-479d-8e8d-bae585ffb9ca --- diff --git a/myocamlbuild.ml b/myocamlbuild.ml index 62dbdaf..23901cd 100644 --- a/myocamlbuild.ml +++ b/myocamlbuild.ml @@ -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;