From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA06847; Fri, 2 Aug 2002 20:28:05 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 UAA06759 for ; Fri, 2 Aug 2002 20:28:04 +0200 (MET DST) Received: from corwin.mutu.net (mutu.net [80.65.226.162]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g72IS3518279 for ; Fri, 2 Aug 2002 20:28:04 +0200 (MET DST) Received: by corwin.mutu.net (Postfix, from userid 1000) id 6308915902D; Fri, 2 Aug 2002 20:28:00 +0200 (CEST) To: OCaml Subject: [Caml-list] ocamldsort 0.1 release X-face: '|!UPdE>Ot'L}nt?6Tf|'s{y%l~,+Yc5|p8A}ibew|_!vc48pPNPPx@7QA~$`$g=|yH*8sh9R]Xj1(CV7oUe>#/,t.(Z4F From: Dimitri Ara Date: 02 Aug 2002 20:28:00 +0200 Message-ID: <873ctxundb.fsf@corwin.mutu.net> User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, ocamldsort (dsort stands for dependency sorting) is a tiny command line tool to sort .ml files according to their dependencies in order to link the corresponding .cmo files. ocamldsort was thought to be used in makefiles. Here is a typical makefile: OCAMLC=ocamlc OCAMLDEP=ocamldep OCAMLDSORT=ocamldsort PPFLAGS=-pp camlp4o SORTED_ML_FILES=$(shell cat .depsort >/dev/null || echo ERROR) CMO_FILES=$(SORTED_ML_FILES:.ml=.cmo) a.out: $(CMO_FILES) $(OCAMLC) ... ERROR: @echo Did you run \`make depend\'? @false depend: $(OCAMLDEP) $(PPFLAGS) *.ml *.mli > .depend < .depend $(OCAMLDSORT) *.ml *.mli > .depsort In fact, ocamldep doesn't need any .depend. It can be used this way: $ ocamldsort -pp camlp4o *.ml *.mli > .depsort Beware: if your program relies on linking order because of side effects, ocamldsort can't help you. You can download it at http://dimitri.mutu.net/ocaml.html -- Dimitri Ara ------------------- 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