From 743aa7b5b11a28c2b0e6fa719101fc37bd43ce6c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Sun, 10 Mar 2013 10:52:24 +0100 Subject: [PATCH] Handle compiling the java test program from ocamlbuild too --- main.itarget | 2 ++ myocamlbuild.ml | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/main.itarget b/main.itarget index d188d1e..45edc29 100644 --- a/main.itarget +++ b/main.itarget @@ -1 +1,3 @@ src/main.native +tools/xml_diff.native +tools/XPathEval.class diff --git a/myocamlbuild.ml b/myocamlbuild.ml index d198faa..4dbf6f6 100644 --- a/myocamlbuild.ml +++ b/myocamlbuild.ml @@ -37,5 +37,15 @@ 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)); + + | After_rules -> + 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 -- 2.17.1