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
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: -- (:)
From: Hendrik Tews <tews@o...>
Subject: Re: [Caml-list] specify include directories with ocamlbuild
Nicolas Pouillard <nicolas.pouillard@gmail.com> writes:

   Can you try to have the following declaration in your myocamlbuild.ml

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

For me

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

works. Without "compile" ocamlbuild generates incorrect command lines:

/usr/local/stow/ocaml-3.12.0/bin/ocamldep.opt -I +camlp4/Camlp4Parsers -pp '-I +camlp4/Camlp4Parsers' -modules a.ml > a.ml.depends

For the ocamlbuild-inexperienced like myself: Put the pflag line
into myocamlbuild.ml and add 

open Ocamlbuild_plugin;; (* open the main API module *)

as first line. Then you can specify include directories in the
_tags file with "I", for example

<a.ml>: I(+camlp4/Camlp4Parsers)