* [Caml-list] OASIS and -no-alias-deps: the non-evil approach
@ 2015-01-13 14:38 Dario Teixeira
0 siblings, 0 replies; only message in thread
From: Dario Teixeira @ 2015-01-13 14:38 UTC (permalink / raw)
To: OCaml mailing-list
Hi,
I still haven't given up on using -no-alias-deps with a OASIS/OCamlbuild build
system, despite a critical component -- OCamldep -- seemingly not supporting
-no-alias-deps in 4.02 [1]. I've made a small experiment which suggests it
should be possible anyway, but I'll need a bit of help from someone who's
more familiar with OASIS and OCamlbuild.
I'm using the same dummy library I've described before [2]. Basically, I
have three actual code files (foo_a.ml, foo_b.ml, foo_c.ml), plus a foo.ml
which only declares module aliases. Due to ocamldep's obliviousness to
-no-alias-deps, it infers that foo.ml depends on the 3 other modules,
whereas each in turn also depends on foo.ml, resulting in a circular build.
The small experiment I made was to rename ocamldep and to replace it with
a small frontend that detects whether it's being called on foo.ml, in which
case it declares no dependencies. Something like this:
let () = match Sys.argv with
| [| "ocamldep.opt"; "-modules"; "src/foo.ml" |] ->
print_endline "src/foo.ml:"
| x ->
Unix.execv "/home/dario/.opam/4.02.1/bin/ocamldep.opt.orig" x
Pure evil, but it works. Now, my question is: would it be possible to achieve
the same result in plain OASIS/OCamlbuild, ie, without the evil? I reckon
one would need to tag a certain file in such a way that any invocation of
ocamldep for that file should be replaced with a string. Your thoughts?
Thanks in advance for your time + best regards,
Dario Teixeira
[1] https://sympa.inria.fr/sympa/arc/caml-list/2014-09/msg00078.html
[2] https://sympa.inria.fr/sympa/arc/caml-list/2014-12/msg00097.html
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-13 14:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-13 14:38 [Caml-list] OASIS and -no-alias-deps: the non-evil approach Dario Teixeira
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox