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] canonical camlp4-suffix?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-09-04 (14:00)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] canonical camlp4-suffix?

On Tue, Sep 04, 2001 at 02:43:35PM +0200, Markus Mottl wrote:

> The topmost line in a file could read like this:
>   (*pp camlp4o -I some_dir some_quots.cmo some_more_quots.cmo *)

It is almost my syntax! I use just:
   (* camlp4o -I some_dir some_quots.cmo some_more_quots.cmo *)

Therefore my shell script tests "(* camlp4o" in my source file with a simple
grep. With some appropriate "sed", I build the right command lines. And I
have also a "depend" entry which tests the .cmo files of this line to
create the dependencies.

> Then I just check for the 'pp' tag, and if it's there, I just take the
> contents of the comment as parameter for the -pp option. This could then
> also be a completely different preprocessor (cpp? ;).

Yes. If you need other preprocessors, you can do that. You can take the
version in camlp4 (tools/camlp4_comm.sh) or take the ideas in it, if you
want, no problem. It is implementable, since all compilation of camlp4
files use that (including the files not to be preprocessed).

Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr