[Omake] dependency scanning
Prashanth Mundkur
prashanth.mundkur at gmail.com
Tue Jun 15 16:50:23 PDT 2010
Hi,
I don't understand the behavior of
find-ocaml-targets-in-path-optional. I'm seeing it not record
dependencies that, AFAICT, it should record. For instance, although
the following small example might build, this may be by lucky
happenstance.
$ tree
.
|-- OMakefile
|-- OMakeroot
|-- http.ml
|-- http.mli
`-- tests
|-- OMakefile
`-- test_http.ml
$ cat http.mli
type version = HTTP11
$ cmp http.mli http.ml
$ cat tests/test_http.ml
open Http
let _ = ignore HTTP11
$ cat OMakefile
HTTP_LIB = $(OCamlLibrary http, http)
.DEFAULT: $(HTTP_LIB)
.SUBDIRS: tests
$ cat tests/OMakefile
OCAMLFLAGS += -I ..
OCAML_LIBS[] += ../http
TEST_PARSER = $(OCamlProgram test_http, test_http)
.DEFAULT: $(TEST_PARSER)
I added some print statements in OCaml.om.
$ omake --version
OMake 0.9.8.5 (release 3):
build [Thu Feb 25 08:42:14 2010]
$ omake
[...]
--- Checking if ocamldep understands -modules... (yes)
- scan . scan-ocaml-http.mli
+ ocamldep -modules http.mli | Shell.ocamldep-postproc()
PrintDependencies(http.mli, )
PrintMLIDependencies(http.mli, )
- scan . scan-ocaml-http.ml
+ ocamldep -modules http.ml | Shell.ocamldep-postproc()
PrintDependencies(http.ml, )
PrintMLDependencies(http.ml, , )
- scan tests scan-ocaml-test_http.ml
+ ocamldep -modules test_http.ml | Shell.ocamldep-postproc()
PrintDependencies(test_http.ml, Http)
PrintMLDependencies(test_http.ml, , )
*** omake: done (0.77 sec, 3/3 scans, 6/10 rules, 20/81 digests)
I don't understand why the Http module was removed from the
MLDependencies of test_http.ml. Is the tests/.. directory not passed
for search by find-ocaml-targets-in-path-optional?
I'm seeing failures in a larger build, and I suspect this to be the
root cause. The failures have the symptom:
+ ocamlopt.opt -warn-error A -I .. -I . -c test_http.ml
File "test_http.ml", line 16, characters 0-9:
Error: Unbound module Http
I've repeated the experiment with top-of-0.9.8.x branch, and I'm
seeing the same behavior.
Any insight would be appreciated.
Thanks.
--prashanth
More information about the Omake
mailing list