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 (14:31)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Announcing the OMake build system version 0.9.1
On Sun, 2004-09-05 at 23:20, David Brown wrote:

> I asked a few years back why nobody had developed a tool similar to
> 'ghc --make' for Haskell or 'gnatmake' for Ada.  

Or just 'flx progname' for Felix, or python progname for Python,
javac for java  .. :)

> 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. 

That's hard to avoid when you're basing dependency information
on the language grammar :)

>     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.

To remove the 'yuck' requires two things I think:

	(a) the tool and target language are unified
	(b) the language is designed to generate itself

Such systems do exist -- Forth and I guess Lisp fall into
this category.

>   - 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.

I personally think this is, quite simply, a design fault.

There is also a simple, clear and standard kind of solution,
which Python uses -- mandate explicit specification.
Python uses 'import' for this.

Resolving the actual order of initialisation is another
issue :)

> 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.

Well ocamldep already does most of the work -- for Ocaml code.

John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net

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