[Omake] Problem computing dependencies for byte code applications

Markus Mottl markus.mottl at gmail.com
Fri Nov 16 13:27:31 PST 2007


Hi,

we have been banging our heads against the following brick wall for
quite a while and still haven't found any solution.  We want a rule
that looks roughly as follows:

%.bc: %.cmo
  (* link %.cmo and all .cmo files in the local directory that are a a
dependency of %.cmo *)

The problem is, however, that the other .cmo files aren't really
dependencies of %.cmo, because .cmo-files depend only on .cmi files
due to fully separate compilation.

This is not the same in the native code case.  E.g. our rule for the
following works:

%.exe: %.cmx
  (* link %.cmx and all .cmx files in the local directory that are a a
dependency of %.cmx *)

The reason for the latter rule working is that .cmx-files depend on
other .cmx files due to cross-module inlining.  What we'd need to do
is essentially change how dependencies for .cmo files are computed,
e.g. by rewriting the output of ocamldep for .cmx files appropriately
such that they work for .cmo files.

But we don't know how to insert such a feature (use a different way to
compute dependencies for an already existing target) into the current
framework without breaking the rules in the OCaml.om file.  Do you
know of any way to do that?

Regards,
Markus

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl at gmail.com


More information about the Omake mailing list