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 with findlib + camlp4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-03-06 (15:31)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] Ocamlbuild with findlib + camlp4

And thanks for the reply.

> Moreover, these lines mean that packages str and so on will only be used 
> when your files are tagged with use_pgsql. Is it really what you want?


> I have no experience of ocamlbuild with camlp4 extensions but I guess in 
> your case I would list all packages correctly in the "let packages = 
> ..." definition (unless you don't want to add the -package option for 
> every file?), tag my files which use the camlp4 extension with 
> "use_pgsql", and add a flag such as:

I've been mucking around with the plugin but still haven't
managed to achieve what I want.  And judging from a previous message by
Nicolas Pouillard, it may be altogether impossible with the current version
of Ocamlbuild.

Anyway, ideally one should be able to specify in the _tags file the findlib
packages that each ml file depends upon.  Suppose that by default you wanted
your ml files to use the "extlib,lwt,ocsigen,pgocaml" packages, but you also
had a "" file that used the PG'OCaml syntax extension, and therefore
should be preprocessed using the instructions in the "pgocaml.statements"
package.  I could define a _tags file as something like this:

true: pkg(extlib,lwt,ocsigen,pgocaml)
<>: camlp4, pkg(pgocaml.statements)

Any thoughts on how this could be achieved?  (I'm not even sure if
Ocamlbuild's tags can be parameterised).  This would go a long way
towards simplifying the use of syntax extensions that we've been
discussing in the OSR thread.

Thanks in advance,
Dario Teixeira

Sent from Yahoo! Mail.
The World's Favourite Email