Date: Sat, 13 Sep 1997 18:52:43 +0100
From: William Chesters <email@example.com>
Subject: ocaml: demand-driven compilation?
Are there plans to extend the separate compilation system of ocaml to
take over some of the functions of make, as the Java compiler does?
The Java compiler not only checks sources against the precompiled
signatures of the modules it refers to, as ocamlc/ocamlopt do; it also
checks the existence and modtime of the bytecode file against the
source and (re)compiles if necessary. With a little hack to get any
necessary standard libraries included in the link command
automagically, we wouldn't need makefiles at all. For me it would
even be nice to able to specify the C files implementing the external
functions needed by each source _in the source itself_.
I think it would be quite easy to hack something together to do this,
since [Env.find_pers_struct] very nearly constitutes the necessary
hook. (Mind you it would be even easier if the compiler was free of
naughty global variables---I don't think it's safe to invoke it
It would also be possible to do it (approximately) without touching
the compiler, say using ocamldep, but it would get messy.
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:12 MET