[Omake] Dependencies on .o/.obj for OCaml modules
Alain Frisch
alain.frisch at lexifi.com
Mon Jan 28 09:13:16 PST 2008
Aleksey Nogin wrote:
> On 27.01.2008 08:25, Alain Frisch wrote:
>
>> It seems that the standard rules for OCaml included in omake create a
>> dependency from b.cmx to a.$(EXT_OBJ) when b depends on a. Why is it so?
>
> This should not be the case. The .a for a library and the executable
> should depend on the .o, but not the .cmx. If this is not the case, then
> something is wrong.
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.)
>> PS: this is even more problematic under Windows, because the .obj files
>> produced by the assembler (and thus ocamlopt) contain a time-stamp.
>
> 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.
-- Alain
More information about the Omake
mailing list