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

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


Richard Jones.
Merjis Ltd. - improving website return on investment - management courses