On Tue, Feb 10, 2009 at 5:15 PM, Daniel Bünzli <daniel.buen...@erratique.ch> wrote: > If in a rule a command generates multiple files (which don't necessary have > the same basename as the dep), how can I make ocamlbuild understand that > these files now exist in _build ?
I've used the following rule under After_rules in myocamlbuild.ml for camlidl .idl files: (* Handle *.idl files properly... I think *) rule "camlidl processing" ~prods:["%.mli"; "%.ml"; "%_stubs.c"] ~deps:["%.idl"] begin fun env _build -> let idl = env "%.idl" in let tags = tags_of_pathname idl++"compile"++"camlidl" in let cmd = Cmd(S[camlidl; T tags; P idl]) in Seq [cmd] end; Then, given foo.idl, "ocamlbuild foo.cma" seems to work properly, finding the relevant camlidl-output files. Hope this helps. Hez -- Hezekiah M. Carty Graduate Research Assistant University of Maryland Department of Atmospheric and Oceanic Science _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs