Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] make
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: [Caml-list] ocamldsort and directories
On Tue, Oct 19, 2004 at 03:16:33PM +0200, Julien Signoles wrote:
> 
> > What I'd love is an enhanced ocamldep that in addition to the
> > dependencies prints also a topologically sorted list of files, like
> > this:
> 
> I think Ara's ocamldsort (mixed with ocamldep) is your friend. I quote the
> beginning of the README file:
> 
> "The ocamldsort command scans a set of Objective Caml source files (.ml
> and .mli files), sorts them according to their dependencies and prints the
> sorted files in order to link their corresponding .cmo and .cmi files."
> 
> 	http://www.eleves.ens.fr/home/ara/ocaml.html

I tried out ocamldsort, and it seems to work well, *except* that
there seems to be a strange bug involving directories:

~/d/merjis/tools/wiki/scripts/lib$ ocamldsort -byte *.ml *.mli
cocanwiki_date.cmo cocanwiki_emailnotify.cmo cocanwiki_files.cmo [...]

~/d/merjis/tools/wiki/scripts/lib$ cd ..

~/d/merjis/tools/wiki/scripts$ ocamldsort -I lib -byte lib/*.ml lib/*.mli
lib/cocanwiki.cmo lib/cocanwiki_date.cmo lib/cocanwiki_diff.cmo [...]

The second ordering is completely wrong.  (In fact, I think the second
ordering is just alphabetic ordering).

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
http://www.YouUnlimited.co.uk/ - management courses