[Omake] Dependencies on .o/.obj for OCaml modules

Alain Frisch alain.frisch at lexifi.com
Tue Mar 4 03:07:50 PST 2008


Alain Frisch wrote:
> Well, it really seems to me that the PrintMLDependencies function
> generates dependencies from .cmx files to .o/.obj files. If I uncomment
> the debug statement (that prints the dependencies to stderr), I get:
> 
> b.cmo: a.cmi
> b.cmx b.obj: \
>     a.cmi  \
>     a.cmx \
>     a.obj
> 
> (for two files a.ml, b.ml where b.ml refers to module A.)

I just submitted a bug report for that.

>> This is unfortunate. Is there any command line options that would
>> prevent this, or is the patching of the .obj as you suggested the only 
>> way?
> 
> I haven't found any option. It wouldn't be difficult to patch ocamlopt 
> to do the patching itself, but I don't know if this will be integrated 
> upstream.

Xavier prefers not to integrate this patch upstream (we use this patch 
internally at LexiFi). I guess it is possible to tell omake that we 
depend on the content of an .obj file modulo some timestamp (we could 
compute a digest that ignore some bytes and use a :value: dependency); 
or to change the rules that produce .obj files so as to reset the 
timestamp in the file itself. If the bug mentioned above is fixed, this 
is probably not so important.

-- Alain



More information about the Omake mailing list