projects
/
tatoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9b75e9a
)
Use ocamlfind to invoke pa_macro appropriately.
author
Kim Nguyễn
<kn@lri.fr>
Fri, 21 Dec 2012 10:31:06 +0000
(11:31 +0100)
committer
Kim Nguyễn
<kn@lri.fr>
Fri, 21 Dec 2012 10:31:06 +0000
(11:31 +0100)
myocamlbuild.ml
patch
|
blob
|
history
myocamlbuild_config.ml
patch
|
blob
|
history
diff --git
a/myocamlbuild.ml
b/myocamlbuild.ml
index
7a792d1
..
3410d1b
100644
(file)
--- a/
myocamlbuild.ml
+++ b/
myocamlbuild.ml
@@
-31,7
+31,7
@@
let ( =:: ) r e = r := e :: !r
(* Pre-processed files *)
let pp_macro_options = ref
(* 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 =
let include_full_path = Pathname.pwd / include_path
module Depends =
@@
-93,7
+93,7
@@
let cxx_compile env _build =
(* Native compile and link action *)
(* 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
let ppopt l = List.map (fun e -> S[ A"-ppopt"; e ]) l
@@
-143,9
+143,7
@@
let () = dispatch begin
| After_rules ->
dep [ "link" ] cstub_lib;
rule "c++: cpp & depends -> o" ~prod:"%.o" ~deps:[ "%.cpp" ] cxx_compile;
| 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 ]);
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
+153,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);
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
| _ -> ()
end
diff --git
a/myocamlbuild_config.ml
b/myocamlbuild_config.ml
index
fef4759
..
7ef1631
100644
(file)
--- a/
myocamlbuild_config.ml
+++ b/
myocamlbuild_config.ml
@@
-2,7
+2,7
@@
let ocaml_inline = "1000";;
let include_path = "include";;
let src_path = "src";;
let ocaml_link = [ ];;
let include_path = "include";;
let src_path = "src";;
let ocaml_link = [ ];;
-let ocamlfind_packages = "unix,ulex,expat,camlp4,camlp4.lib";;
+let ocamlfind_packages = "unix,ulex,expat,camlp4,camlp4.lib
,camlp4.macro
";;
let cxx_flags = [ "-fno-PIC"; "-std=c++0x"; "-O3" ];;
let main_targets = [ "native","src/main.native";
"byte", "src/main.byte" ];;
let cxx_flags = [ "-fno-PIC"; "-std=c++0x"; "-O3" ];;
let main_targets = [ "native","src/main.native";
"byte", "src/main.byte" ];;