English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] ocamlmktop and includes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-05-01 (03:39)
From: John Gerard Malecki <johnm@a...>
Subject: Re: [Caml-list] ocamlmktop and includes
Jacques Garrigue wrote (2001-05-01T10:05:37+0900):
 >    To get all crcs in one directory:
 > 	extract_crc `\ls *.cmi | sed "s/.cmi//" | capitalize`

Capitalize not posix and hence available on some but not all machines.
The ocaml team recognized this and allows uncased module names as in

 > 	extract_crc `\ls *.cmi | sed "s/.cmi//"`

Within a makefile the following works for me:

 extract_crc := $(shell ocamlc -where)/extract_crc

 crcs.ml: $(INTF)
	$(extract_crc) $< > \#$@
	mv \#$@ $@

where INTF may be something like

 INTF := $(patsubst %.mli,%.cmi,$(wildcard *.mli))

To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr