INCLUDE "some/relative/path/snippet.mli"
The path passed to INCLUDE is relative to the including file, but with
ocamlbuild I've a problem. Namely, the snippet is not copied inside
the appropriate subdir of _build, and camlp4 correctly fails with
something like:
File "some/relative/path/snippet.mli", line 52, characters 0-3:
I/O error: "some/relative/path/snippet.mli: No such file or directory"
Preprocessing error on file src/foo/bar/including.mli
Command exited with code 2.
The snippet is not otherwise processed by the OCaml toolchain, it is
just meant to be INCLUDEd.
How can I tell ocamlbuild to copy into the _build/ directory my
snippets?
My reading of the manual doesn't hint me to any useful tag ...
TIA,
Cheers.
--
Stefano Zacchiroli -*- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'č sempre /oo\ All one has to do is hit the right
uno zaino -- A.Bergonzoni \__/ keys at the right time -- J.S.Bach
_______________________________________________
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
You can use copy_rule in a plugin.
Cheers,
--
Stéphane
Try to have something like
open Ocamlbuild_plugin
dispatch begin function
| After_rules ->
dep ["file:src/foo/bar/including.mli"] ["some/relative/path/snippet.mli"]
end
to your myocamlbuild.ml
--
Nicolas Pouillard aka Ertai