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 SAA04775 for caml-red; Thu, 29 Jun 2000 18:46:11 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA23974 for ; Wed, 28 Jun 2000 19:09:09 +0200 (MET DST) Received: from davidb.org (adsl-216-103-8-60.dsl.sndg02.pacbell.net [216.103.8.60]) by concorde.inria.fr (8.10.0/8.10.0) with SMTP id e5SH98X17345 for ; Wed, 28 Jun 2000 19:09:09 +0200 (MET DST) Received: (qmail 17351 invoked by uid 1403); 28 Jun 2000 17:09:07 -0000 Date: Wed, 28 Jun 2000 10:09:07 -0700 From: David Brown To: David Chemouil Cc: caml-list@inria.fr Subject: Re: convenient features Message-ID: <20000628100907.B17309@opus.davidb.org> References: <3959C916.D1A3BDFD@enseeiht.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <3959C916.D1A3BDFD@enseeiht.fr>; from David.Chemouil@enseeiht.fr on Wed, Jun 28, 2000 at 11:44:54AM +0200 Sender: weis@pauillac.inria.fr 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 'threads.cm[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 > 'threads.cm[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 appropriately. 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