Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
convenient features
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-06-29 (16:46)
From: David Brown <caml-list@d...>
Subject: Re: convenient features
On Wed, Jun 28, 2000 at 11:44:54AM +0200, David Chemouil wrote:
> 1. One thing that really bothers me is the obligation to put object
> files in the good order, when linking them. As it is possible to
> generate the dependency graph (ocamldot does it), wouldn't it be
> possible for the linker to "flatten" it, in order for it to find alone
> the good order? It seems to me that it works in C for example. So, one
> would just have to put necessary object files on the command line, in
> any order. 'Cause when you have 50 object files, or so, it's really
> boring to find dependencies "by hand".
> 2. The second point is minor: it seems to me you only need to put the
> '-thread' option when your program uses the '[x]a' library. So
> it must be possible to remove the '-thread' option, and have the
> compiler guess that the program is multithreaded when it sees
> '[x]a' on the command line.

A while back, I wrote up a small utility that I called ocamlmake.  It takes
as an argument a single module name.  It runs ocamldep (actually I put the
ocamldep code in it) to determine module dependencies and ordering.  It
would scan for use of threads and unix (and other) libraries and compile

I need to rewrite it to use the new ocamllex, and with the new copyright, I
can actually distribute what I produce.

Is there interest in such a beast?

Dave Brown