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
ocamlbuild, camlp4 and the _tags file
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-04-30 (12:01)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] ocamlbuild, camlp4 and the _tags file
On 4/30/07, Joel Reymont <> wrote:
> I see that ocamlbuild is being used to build camlp4 examples.
> I thought I would ask a few questions on the meaning of the different
> tags since they are not described in my version of the ocamlbuild
> user's guide and the presentation slides.
>  >>> "" or "": camlp4rf, use_camlp4
> The above is clear.
>  >>> "": camlp4rf, use_camlp4_full
> But what's the difference between use_camlp4_full and use_camlp4?

use_camlp4_full put a dependency on camlp4fulllib.{cma,cmxa}.

The camlp4fullib contains all the camlp4 modules including parsers,
printers... Some modules are incompatible and then loading them
together is only useful when using camlp4 as a library.

> When should one be used vs the other?

use_camlp4_lib most of the time.

>  >>> "": pp(camlp4of ./macros.cmo)
>  >>> "": pp(camlp4of ./lambda_quot.cmo)
> Why are these special options needed? When should I use them?

That's just examples, here macros.cmo and lambda_quot.cmo are camlp4

In your case you can do something like.

"": pp(camlp4o -filter map -filter fold)

>  >>> <parse_files.*>: camlp4of, use_camlp4_full, use_dynlink
> Why is dynlink used here?

Since camlp4 use dynlink one needs it too in order to link a standalone program.

Nicolas Pouillard