English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Announcing the OMake build system version 0.9.1
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-09-05 (13:20)
From: David Brown <caml-list@d...>
Subject: Re: [Caml-list] Announcing the OMake build system version 0.9.1
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.


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.


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