|Anonymous | Login | Signup for a new account||2015-03-31 14:38 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004519||OCaml||OCaml general||public||2008-03-11 00:44||2013-09-04 17:57|
|Target Version||Fixed in Version|
|Summary||0004519: Interior files handled in ocamldep|
|Description||ocamldep does not emit dependencies for files which are not|
found in the given search path. This is Ok for system files.
However for generated files (eg. via ocamllex or -yacc) this
places a burden on the build system. It has to take care
that all files are generated before the dependencies can be
A simpler solution is to pass files interior to the build
graph to ocamldep. So whenever a module is encountered
which has no corresponding source it is checked whether
the file is given as interior file. If so, a dependency is
emited even though the file does not exists, yet. (It will
be later on created during the build process.)
The attached patch implements this change, however it is
very simple-minded and almost certainly needs polish.
|Attached Files||ocamldep.ml.diff [^] (2,113 bytes) 2008-03-11 00:44 [Show Content]|
That doesn't solve your problem, because ocamldep will then be unable
to emit dependencies for the generated file, since it is missing.
Your dependencies will still be incomplete, so the value of this
new feature is rather doubtful.
This is not true. Let me explain my point with an example.
I use the cook program to build my projects. Here I save the
dependency information in different files, which cook knows
how to (re-)generate them if necessary.
Suppose I have prog.ml and lexer.mll. I tell cook that it
should look out for prog.ml.d and lexer.ml.d, which contain
the dependency information. Since neither of them exists,
cook goes on and generates them. Depending on different
parameters cook might choose to do prog.ml.d first. Then it
tries to do lexer.mll.d, but there is no lexer.ml. No problem:
cook knows how to use ocamllex: First generate the .ml then
But now the build system is broken! ocamldep did not correctly
specify the dependency and the build will fail if cook tries
to build prog.cmo first.
My proposal fixes the problem. Without my proposal I have to
manually fiddle around with dependency information, which can
be easily obtained from the system. So the feature is clearly
|Why is the ocamldep's -modules option not enough?|
|2008-03-11 00:44||mb||New Issue|
|2008-03-11 00:44||mb||File Added: ocamldep.ml.diff|
|2008-03-11 14:36||doligez||Note Added: 0004473|
|2008-03-11 14:36||doligez||Status||new => acknowledged|
|2008-03-11 17:59||mb||Note Added: 0004474|
|2008-03-12 22:06||frisch||Note Added: 0004475|
|2009-08-19 13:20||xclerc||Relationship added||related to 0003725|
|2013-09-04 17:57||doligez||Tag Attached: patch|
|Copyright © 2000 - 2011 MantisBT Group|