* [Caml-list] ocamldsort 0.1 release
@ 2002-08-02 18:28 Dimitri Ara
0 siblings, 0 replies; only message in thread
From: Dimitri Ara @ 2002-08-02 18:28 UTC (permalink / raw)
To: OCaml
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-08-02 18:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-02 18:28 [Caml-list] ocamldsort 0.1 release Dimitri Ara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox