Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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))

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