Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: -- (:)
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/ 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:  FAQ:
To unsubscribe, mail  Archives: