[Omake] Menhir, --raw-depend, --infer, and OMake
Jason Hickey
jyh at cs.caltech.edu
Thu Feb 1 15:22:38 PST 2007
On Feb 1, 2007, at 1:43 AM, Francois Pottier wrote:
> I am not sure why --raw-depend is useful for omake. I think Jason
> Hickey
> wanted to use ocamldep with the -modules flag, which caused "menhir
> --depend"
> to become confused (since it parses ocamldep's output in order to
> fix it). So
> he asked me for a --raw-depend flag which echoes ocamldep's output
> verbatim.
> However, in the process, perhaps we lost that extra dependency line
> (which I
> assumed would be somehow produced by OCaml.om)? Jason, could you
> comment on
> this issue? I am willing to make whatever changes are appropriate.
The issue was that ocamldep doesn't produce dependencies correctly
when files do not exist. This is a catch 22: to figure out the
dependencies of a file, you need to call ocamldep, but you shouldn't
do it unless the .ml and .mli dependencies are already built. With --
raw-depend, ocamldep produces the raw free-variables, and OMake
figures out the dependencies (which is possible because OMake knows
about the entire build tree). This comes up frequently in larger
projects where you may have several .mly and .mll files.
I think the problem is that OMake is not doing the modifications
Francois mentioned:
> [--depend] looks for the line that begins with "parser.cmo:", replaces
> "parser.cmo:" with "parser.ml parser.mli:", removes "parser.cmi"
> from the right-hand side, and echoes that line.
We should just have OMake do the same thing, and that will fix it.
In the meantime, Mike, how about if you add a dependency manually?
parser.ml parser.mli: helper.cmo
Jason
--
Jason Hickey http://www.cs.caltech.edu/~jyh
Caltech Computer Science Tel: 626-395-6568 FAX: 626-792-4257
More information about the Omake
mailing list