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
specify include directories with ocamlbuild
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-08-24 (12:14)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] specify include directories with ocamlbuild
On Tue, 24 Aug 2010 09:31:52 +0200, Hendrik Tews <> wrote:
> Hi,

> in 3.11 I used
>    <>: I(+camlp4/Camlp4Parsers)
> in _tags to specify that ocamlbuild should add 
> -I +camlp4/Camlp4Parsers when compiling some_file. In 3.12 this
> gives 
>     Warning: tag "I" does not expect a parameter, but is used with parameter "+camlp4/Camlp4Parsers"
> What is the recommended way to specify an include directory in
> 3.12?

Can you try to have the following declaration in your

pflag ["ocaml"] "I" (fun x -> S[A"-I"; A x])

The syntax foo(bar) was implicitely turned into arguments "-foo bar"
for commands involving the matched files, however this was too much
specific (the "-" thing) and too much coarse grained. Indeed there
was no way to choose when to add this flag (linking, compiling,
pre-processing, building doc...).

This is now possible with thes parameterized flags, and almost backward
compatible since we added default pflags:
  pp(_), for-pack(_), inline(_), package(_), predicate(_), syntax(_)

However we didn't thought about I(_)...

Nicolas Pouillard