From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA20061; Sun, 5 Sep 2004 15:20:10 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 PAA19085 for ; Sun, 5 Sep 2004 15:20:09 +0200 (MET DST) Received: from mail.davidb.org (adsl-64-172-240-129.dsl.sndg02.pacbell.net [64.172.240.129]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i85DK7V3018515 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 5 Sep 2004 15:20:09 +0200 Received: from davidb by mail.davidb.org with local (Exim 4.41 #1 (Debian)) id 1C3wwA-00045E-Kn; Sun, 05 Sep 2004 06:20:06 -0700 Date: Sun, 5 Sep 2004 06:20:06 -0700 From: David Brown To: skaller Cc: caml-list Subject: Re: [Caml-list] Announcing the OMake build system version 0.9.1 Message-ID: <20040905132006.GA15531@old.davidb.org> References: <4139ECD3.1050708@cs.caltech.edu> <001e01c492a6$872c7280$19b0e152@warp> <413A0921.7030607@ntlworld.com> <413A1E89.10806@libertysurf.fr> <1094361655.3352.476.camel@pelican.wigram> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1094361655.3352.476.camel@pelican.wigram> User-Agent: Mutt/1.5.6i X-Miltered: at nez-perce with ID 413B1287.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 caml-list:01 2004:99 outputs:01 outputs:01 dependencies:01 haskell:01 myprog:01 foo:01 dependencies:01 ocaml:01 ocaml:01 05,:01 sep:01 makefile:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sun, Sep 05, 2004 at 03:20:56PM +1000, skaller wrote: > The basic problem is that make assumes a fixed set > of target outputs and has rules like: > > A depends on B: use P to make A from B > > This means you have to know all the outputs, > dependencies, and build rules in advance > which is *never* the case on any realistic system. Amen. I asked a few years back why nobody had developed a tool similar to 'ghc --make' for Haskell or 'gnatmake' for Ada. The idea is that you give it the main module, and the tool works out all of the rules in advance. There are a couple of problems with these systems, especially in regards to ocaml. But, I think there are things to learn from them. - They tend to be very tied to their specific language. When source files in this language are themselves generated, this either has to be encoded in the make tool (yuck), or the make tool wrapped in a makefile, which kind of defeats the purpose. - Ocaml allows arbitrary code to be executed during module elaboration (to borrow an Ada term). This causes two issues: 1. elaboration order can be significant, and 2. modules can be required for the system, but not be dependent (in a module sense) on the "main" module. This also means that the notion of a main module is less meaningful on ocaml. It is very convenient to have a tool where the only rule needed is something like: myprog depends on foo.ml and its dependencies. In fact, if you specify the modules and also that dependencies are tracked, it solves the second problem above. Any time order is important, it can be specified (as well as additional modules), but when a module is required, any dependencies are checked and will be included before that module in the named list. I wrote a tool to do this, but ran into the first problem above. Perhaps I should investigate adding this capability to something like omake. Dave ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners