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

Alain Frisch alain.frisch at lexifi.com
Sun Jan 27 08:25:55 PST 2008


Hello,

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? 
  I believe it is perfectly ok to avoid recompiling b.ml when a.ml 
changes as long as a.cmx and a.cmi do no change. This can happen quite 
easily when the changes only occur within functions whose body is not 
included in the .cmx file. Did I miss something?


Alain


PS: this is even more problematic under Windows, because the .obj files 
produced by the assembler (and thus ocamlopt) contain a time-stamp. So, 
if you simply add a comment to an .ml file, the resulting .obj file will 
be modified and all the transitive closure of the project will be 
recompiled. As a matter of fact, it might be a good idea to remove this 
timestamp from the .obj files (this is quite easy to do: just patch 4 
bytes in the .obj files at offset 4).


More information about the Omake mailing list