[Omake] Changes in MenhirMulti or OCamlGeneratedFiles
Aleksey Nogin
anogin at hrl.com
Thu Mar 22 14:29:41 PDT 2007
On 22.03.2007 12:36, Nicholas Kidd wrote:
> I recently upgraded to omake 0.9.8.1 via GODI. That all worked fine;
> however, omake now fails to build my project. It is detecting a deadlock
> on a generated file 'parser.mli'. Was there a change in detecting
> dependencies or in the MenhirMulti rules?
Yes, Menhir dependency scanning had a bug, which was fixed.
In general, the Menhir and the "OCamlGeneratedFiles" just do not play
well together (unless you are very careful to do it precisely right). If
you are using Menhir and are not running on Mac OS X, your best bet is
probably to set OCAMLDEP_MODULES_ENABLED to true.
Note:
- OCAMLDEP_MODULES_ENABLED is experimental. It is known not to work
right when you have a non-Windows non-Cygwin setting with a
case-insensitive filesystem (e.g. on Mac OS X). Expected to be fixed in
0.9.8.2
- OCAMLDEP_MODULES_ENABLED obsoletes the "OCamlGeneratedFiles"
mechanism. In fact, if OCAMLDEP_MODULES_ENABLED is set,
OCamlGeneratedFiles and LocalOCamlGeneratedFiles become no-ops.
Basically, OCAMLDEP_MODULES_ENABLED tells OMake to start figuring this
stuff automatically (as opposed to you having to fine-tune things manually).
> Below is omake's depenency output followed by the OMakefile. I'm not
> sure if this will help. Are there additional commands that I can run to
> determine what is causing this dependency?
[...]
> *** omake: deadlock on parser.mli
> *** omake: is a dependency of <phony <OCamlGeneratedFilesTarget>>
> *** omake: is a dependency of <phony <OCamlGeneratedFilesTarget>>
> *** omake: is a dependency of <scanner scan-ocaml-keywords.mli>
> *** omake: is a dependency of keywords.cmi
> *** omake: is a dependency of parser.mli
Here we have two legitimate dependencies:
- parser.mli: keywords.cmi
This one is probably generated by the Menhir dependency scanning
- keywords.cmi: <scanner scan-ocaml-keywords.mli>
This one is always there - we need to find out what the dependencies
are before you can build the thing.
and two dependencies that come from the overprotective "GeneratedFiles"
mechanism:
- <scanner scan-ocaml-keywords.mli>: OCamlGeneratedFilesTarget
The "GeneratedFiles" mechanism works by requiring the phony
"OCamlGeneratedFilesTarget" target to be built before any OCaml scanning
is done.
- OCamlGeneratedFilesTarget: parser.mli
This is what OCamlGeneratedFiles(...parser.mli...) will do.
> PS. I have always found it necessary to include the ".mly" suffix on
> files passed to MenhirMulti.
Yes, there was a bug. Just fixed it in rev. 10269, thanks!
Aleksey
--
Aleksey Nogin, Research Staff Member
Advanced Technologies Department, Information & System Sciences Lab
HRL Laboratories, LLC, Malibu, CA
More information about the Omake
mailing list