[Omake] Some problems with -pack

Aleksey Nogin nogin at metaprl.org
Tue Mar 27 18:37:23 PDT 2007


Hi Achim,

On 26.03.2007 22:57, Achim Blumensath wrote:

>> Do you have a concrete example? I've checked out Ant, so I could try
>> debugging things in more detail.
> 
> Just build the project (requires ocaml 3.10 beta). Then modify some file
> like VM/Private/Primitives.mli and build again. You will get an error
> message stating that Foo.cmx and Bar.cmx make inconsistent assumptions
> about the interface of VM.

It might take me a little time to get around to compiling 3.10 beta.
Once I have it, I'll take a look.

>>> Unfortunately, with this option (Local)OCamlGeneratedFiles has no
>>> effect. My project uses two camlp4 extensions which have to be compiled
>>> before dependency analysis. How am I to tell omake to do so without
>>> using (Local)(OCamlGeneratedFiles)?
>>
>> If you are using the default OCaml rules, something like
>>
>> .SCANNER: scan-ocaml-%: $(MLPP_TARGETS)
>>
>> should work.
> 
> Isn't this exactly what LocalOCamlGeneratedFiles is supposed to do?

Not quite. The original intent of both the *OCamlGeneratedFiles
functions was to mark OCaml source files generated by tools like
ocamlyacc and ocamllex - files that are not true dependencies, but still
have to be there for ocamldep to see them. The Local version was there
for the case where the global one would not work (for example, where the
generator is itself an OCaml program that needs to be scanned and
compiled first).

> So, why did you disable it?

Under the "ocamldep -modules" approach, there is no need for the
generated source files to be there at scan time, so
LocalOCamlGeneratedFiles simply ignores that. Once the "ocamldep
-modules" approach becomes the default one, the LocalOCamlGeneratedFiles
is likely to be changed to produce a warning saying it's obsolete.

As you pointed out, even with the "ocamldep -modules", there is still a
need to be able to specify things that are true dependencies of the
scanning process. Perhaps we would need to create a separate variable or
function for that.

Aleksey


More information about the Omake mailing list