[Omake] menhir --infer + ocamldep -natives
Michael Furr
furr at cs.umd.edu
Thu May 24 19:15:50 PDT 2007
On Thu, 24 May 2007, Michael Furr wrote:
>
> > Try also using -debug-deps -debug-scanner - this should give more
> > information.
>
> $ omake --print-dependencies --depend -debug-deps -debug-scanner
> parser.ml
Upon further playing, it looks like the menhir aspect of this is a red
herring. I am also loosing dependencies for regular .cm? targets. For
instance, in one directory, I have two files, main.ml and typing.ml. Main
depends on Typing and a few other things, but Typing is not built before
main. Here is what the vanilla ocamldep commands show:
$ ocamldep -I parser main.ml
main.cmo: typing.cmo parser/parse_helper.cmi parser/ast_printer.cmo \
parser/ast.cmi
main.cmx: typing.cmx parser/parse_helper.cmx parser/ast_printer.cmx \
parser/ast.cmx
$ ocamldep -modules main.ml
main.ml: Ast Ast_printer List Parse_helper Printf Typing
Compiling with OCAMLDEP_MODULES_ENABLED *unset* works. However, enabling
that option causes the build to fail. Running with the debug flags above,
I get the following length output (with info on other files removed).
Note that "typing" does not appear at any place in this output:
+ ocamldep -modules main.ml | Shell.ocamldep-postproc()
- exit src scan-ocaml-main.ml, code 0
Scanner: /tmp/omake2975db.deps
targets = main.cmo
sources = parser/ast.cmi parser/ast_printer.cmi parser/parse_helper.cmi
targets = main.cmx main.o
sources = parser/ast.cmi parser/ast_printer.cmi parser/parse_helper.cmi
parser/ast.cmx parser/ast_printer.cmx parser/parse_helper.cmx
parser/ast.o parser/ast_printer.o parser/parse_helper.o
Saving dependencies: <scanner src/scan-ocaml-main.ml>
scanned deps:
src/main.cmo: src/parser/ast.cmi src/parser/ast_printer.cmi
src/parser/parse_helper.cmi
src/main.o: src/parser/parse_helper.o src/parser/ast.cmi
src/parser/ast.o src/parser/parse_helper.cmx
src/parser/ast_printer.cmx src/parser/ast.cmx
src/parser/ast_printer.cmi src/parser/parse_helper.cmi
src/parser/ast_printer.o
src/main.cmx: src/parser/parse_helper.o src/parser/ast.cmi
src/parser/ast.o src/parser/parse_helper.cmx
src/parser/ast_printer.cmx src/parser/ast.cmx
src/parser/ast_printer.cmi src/parser/parse_helper.cmi
src/parser/ast_printer.o
finish_scanner <scanner src/scan-ocaml-main.ml>:
src/main.cmo: src/parser/ast.cmi src/parser/ast_printer.cmi
src/parser/parse_helper.cmi
src/main.o: src/parser/parse_helper.o src/parser/ast.cmi
src/parser/ast.o
src/parser/parse_helper.cmx src/parser/ast_printer.cmx
src/parser/ast.cmx src/parser/ast_printer.cmi
src/parser/parse_helper.cmi src/parser/ast_printer.o
src/main.cmx: src/parser/parse_helper.o src/parser/ast.cmi
src/parser/ast.o src/parser/parse_helper.cmx
src/parser/ast_printer.cmx
src/parser/ast.cmx src/parser/ast_printer.cmi
src/parser/parse_helper.cmi src/parser/ast_printer.o
dependencies:
target: src/main.cmi
scanner dependencies: <scanner src/scan-ocaml-main.ml>
static dependencies: src/main.ml
build dependencies: src/main.ml src/parser/parse_helper.o
src/parser/ast.cmi src/parser/ast.o src/parser/parse_helper.cmx
src/parser/ast_printer.cmx src/parser/ast.cmx
<scanner src/scan-ocaml-main.ml> src/parser/ast_printer.cmi
src/parser/parse_helper.cmi src/parser/ast_printer.o
dependencies are merged from: src/main.cmi src/main.o src/main.cmx
targets that depend on this node at this point:
[...]
- build src main.cmx
+ ocamlfind ocamlopt -warn-error A -I parser -c main.ml
File "main.ml", line 4, characters 0-11:
Unbound module Typing
- exit src main.cmx, code 2
So it looks like the ocamldep -modules output isn't quite being parsed
correctly (or something is lost in processing).
-m
More information about the Omake
mailing list