(added link)
On 2014/09/10 07:21, Ashish Agarwal wrote:
> Is ocamldep 4.02 supposed to support the -no-alias-deps flag too? It doesn't, so I'm not sure how to implement the example at the end of Section 7.17 [1] on a real library. Specifically, I use omake, which calls ocamldep, and I don't see how to avoid it claiming circular dependencies even though I've added -no-alias-deps to the compilation flags.
>
> [1] http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#s%3Amodule-alias
Indeed, this is not supported by ocamldep, and I'm not sure that it would do
much sense to support it fully at this point, as what you need to do is
going to depend on how you use module aliases.
If you follow the recipe described in my ML workshop slides [2], what you
can do is leave your files unmodified (short names both inside and
outside), and use command line flags for copilation:
ocamlopt -no-alias-deps -open Mylib -o mylibA.cmx a.ml
If you do that, just use ocamldep to compute the dependencies without
mylib.ml, and post-process the results to add a mylib prefix to all file names.
Once the common idioms become clearer, we will probably want to add
some kind of support to ocamldep (to avoid this post-processing).
Jacques Garrigue
[2] http://www.math.nagoya-u.ac.jp/~garrigue/papers/index.html#modalias