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
ocamlfind + ocamldep + camlp4?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-12-05 (22:09)
From: Martin Jambon <martin_jambon@e...>
Subject: ocamlfind + ocamldep + camlp4?

I would like to know if there is a way of using ocamlfind as front-end to 
camlp4o alone. Let me explain: the following works nicely since it will 
locate the pa_someext package and load its dependencies:

   ocamlfind ocamlc -c -syntax camlp4o -package pa_someext file.ml

but how to tell ocamldep to preprocess file.ml using camlp4o and the
wanted syntax modules, without listing all the include directories and 

OCamlMakefile solves this by reading the first line of the OCaml files. 
That works, but ocamlfind doesn't help here, so all directories of the 
camlp4 extensions (direct + dependent) must be specified, which is 
impractical. That would be something like:
(*pp ./pp-command *)

where pp-command would be:
     -I /path/to/lib1 lib1.cma \
     -I /path/to/lib2 lib2.cma \
     -I /path/to/pa_someext pa_someext.cmo $*

where lib1 and lib2 are required by pa_someext.

Instead, it would be nice to write only:

(*pp ocamlfind camlp4o -package pa_someext *)



Martin Jambon, PhD

Store and share your bioinformatics tips at http://wikiomics.org