projects
/
tatoo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a 'trace' mode (must be enabled at build time) that saves the
[tatoo.git]
/
myocamlbuild.ml
diff --git
a/myocamlbuild.ml
b/myocamlbuild.ml
index
41730a6
..
5ce02af
100644
(file)
--- a/
myocamlbuild.ml
+++ b/
myocamlbuild.ml
@@
-26,9
+26,13
@@
let macro_flags = [
let () = dispatch begin
function
let () = dispatch begin
function
- | Before_rules ->
- set_flags [["ocaml";"compile"]; ["ocaml";"ocamldep"] ] macro_flags;
+ | Before_rules -> ()
+ | After_rules ->
+ set_flags [["ocaml";"compile"]; ["ocaml"; "ocamldep"] ] macro_flags;
+ pflag [ "ocaml"; "compile" ] "warning" (fun s -> (S[ A"-w"; A s]));
flag [ "ocaml"; "compile"; "debug" ] (S[ A"-g"; A"-ppopt"; A"-DDEBUG"]);
flag [ "ocaml"; "compile"; "debug" ] (S[ A"-g"; A"-ppopt"; A"-DDEBUG"]);
+ flag [ "ocaml"; "compile"; "htmltrace" ] (S[ A"-ppopt"; A"-DHTMLTRACE"]);
+ flag [ "ocaml"; "ocamldep"; "htmltrace" ] (S[ A"-ppopt"; A"-DHTMLTRACE"]);
flag [ "ocaml"; "link"; "debug" ] (A"-g");
flag [ "ocaml"; "compile"; "profile"] (S[A"-ppopt"; A"-DPROFILE"]);
flag [ "ocaml"; "compile"; "profile"; "native"] (A"-p");
flag [ "ocaml"; "link"; "debug" ] (A"-g");
flag [ "ocaml"; "compile"; "profile"] (S[A"-ppopt"; A"-DPROFILE"]);
flag [ "ocaml"; "compile"; "profile"; "native"] (A"-p");
@@
-36,5
+40,14
@@
let () = dispatch begin
pflag [ "ocaml"; "compile"; "native" ] "inline" (fun i -> (S[ A"-inline"; A i ]));
pflag [ "ocaml"; "compile" ] "unsafe" (fun s -> (if s = "true" then S[A"-ppopt";A "-unsafe"] else N));
pflag [ "ocaml"; "compile"; "native" ] "inline" (fun i -> (S[ A"-inline"; A i ]));
pflag [ "ocaml"; "compile" ] "unsafe" (fun s -> (if s = "true" then S[A"-ppopt";A "-unsafe"] else N));
+
+ rule "Java compilation"
+ ~prod:"%.class"
+ ~dep:"%.java"
+ begin fun env _build ->
+ let java = env "%.java" in
+ let tags = tags_of_pathname java ++ "compile" in
+ Cmd( S[ A"javac" ; P java; T tags ])
+ end
| _ -> ()
end
| _ -> ()
end