caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Nicolas Pouillard <nicolas.pouillard@gmail.com>
To: Hendrik Tews <tews@os.inf.tu-dresden.de>, caml-list@inria.fr
Subject: Re: [Caml-list] specify include directories with ocamlbuild
Date: Tue, 24 Aug 2010 05:14:47 -0700 (PDT)	[thread overview]
Message-ID: <4c73b7b7.10ecd80a.42a3.011e@mx.google.com> (raw)
In-Reply-To: <19571.30056.802644.157376@blau.inf.tu-dresden.de>

On Tue, 24 Aug 2010 09:31:52 +0200, Hendrik Tews <tews@os.inf.tu-dresden.de> wrote:
> Hi,
Hi,

> in 3.11 I used
> 
>    <some_file.ml>: 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 myocamlbuild.ml

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
http://nicolaspouillard.fr


  reply	other threads:[~2010-08-24 12:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-24  7:31 Hendrik Tews
2010-08-24 12:14 ` Nicolas Pouillard [this message]
2010-09-02  9:06   ` [Caml-list] " Hendrik Tews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c73b7b7.10ecd80a.42a3.011e@mx.google.com \
    --to=nicolas.pouillard@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=tews@os.inf.tu-dresden.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).