From: Romain Bardou <Romain.Bardou@lri.fr>
To: Hans Ole Rafaelsen <hans@simula.no>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ocamlbuild and ocamlfind - using multiple grammars in a project
Date: Wed, 08 Apr 2009 15:23:08 +0200 [thread overview]
Message-ID: <49DCA53C.4040401@lri.fr> (raw)
In-Reply-To: <49DC757D.6080701@simula.no>
Hans Ole Rafaelsen a écrit :
> Hi
>
> I'm trying to build a project using ocamlbuild with ocamlfind. One
> submodule requires 'json-static' and another requires
> 'bitstring.syntax'. The preprocessors requires different syntaxes,
> resulting in the following error:
>
> ocamlfind: No unique value for the META variable 'preprocessor': package
> camlp4 defines `camlp4', package bitstring.syntax defines `camlp4of'
>
> Is there a way to make a myocamlbuild.ml file to select the preprocessor
> to use on a submodule/file basis?
Yes. In the wiki plugin, you have lines such as:
flag ["ocaml"; "compile"; "syntax_"^syntax] & S[A"-syntax"; A syntax];
This means that the "-syntax foo" option will only be added if a package
"foo" exists AND your compiled file (i.e. ".ml") has tag "syntax_foo".
So, just tag your files, but not two files with two syntax tags.
> On a similar topic: Is it possible to tell ocamlbuild to use another
> file than myocamlbuild.ml for additional build instructions? At the
> moment I have a makefile that changes links to different files, but I'm
> not happy too with this method.
Unfortunately, not yet.
--
Romain Bardou
next prev parent reply other threads:[~2009-04-08 13:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 9:59 Hans Ole Rafaelsen
2009-04-08 13:23 ` Romain Bardou [this message]
2009-04-08 13:25 ` [Caml-list] " Romain Bardou
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=49DCA53C.4040401@lri.fr \
--to=romain.bardou@lri.fr \
--cc=caml-list@yquem.inria.fr \
--cc=hans@simula.no \
/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