From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA10089 for caml-redistribution; Mon, 15 Sep 1997 08:40:20 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA02968 for ; Sat, 13 Sep 1997 19:52:46 +0200 (MET DST) Received: from postbox.dai.ed.ac.uk (postbox.dai.ed.ac.uk [129.215.41.196]) by nez-perce.inria.fr (8.8.7/8.8.5) with SMTP id TAA00226 for ; Sat, 13 Sep 1997 19:52:45 +0200 (MET DST) Received: from venus (venus.dai.ed.ac.uk [129.215.41.154]) by postbox.dai.ed.ac.uk (8.6.13/8.6.12) with ESMTP id SAA13859 for ; Sat, 13 Sep 1997 18:52:44 +0100 Date: Sat, 13 Sep 1997 18:52:43 +0100 Message-Id: <6086.199709131752@venus> From: William Chesters To: caml-list@inria.fr Subject: ocaml: demand-driven compilation? Sender: weis 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 recursively?) It would also be possible to do it (approximately) without touching the compiler, say using ocamldep, but it would get messy.