caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Maxence Guesdon <Maxence.Guesdon@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] syntax extensions with ocamlfind
Date: Mon, 2 Mar 2015 19:24:23 +0100	[thread overview]
Message-ID: <20150302192423.11734fc7@alcazar2> (raw)
In-Reply-To: <md28td$a91$1@ger.gmane.org>

On Mon, 2 Mar 2015 18:07:40 +0000
Andreas Hauptmann <andreas@ml.ignorelist.com> wrote:

> On Mon, 2 Mar 2015 18:48:46 +0100
> Maxence Guesdon wrote:
> 
> > It seems that ocamlfind only supports camlp4 for preprocessors. Am I
> > right ? Does anybody known how to achieve this ?
> 
> Take a look at the META file of camlp5. If i remember right, it achieves
> similar without native support inside ocamlfind.

Indded, thanks. But it seems that ocamlfind can handle only one
preprocessor, instead of building a command chaining the preprocessors.
When I have more than one packages defining a preprocessor, I get:

  ocamlfind: Several packages are selected that specify preprocessors:
  package camlp4 defines `camlp4', package mypkg.syntax defines
  `./mypp'

And the use of a preprocessor depends on having a "archive" variable
defined like that:
  archive(syntax,preprocessor,dynamow) = "..."

Which must not be empty to make the preprocessor used. If it's empty,
then I get:

  ocamlfind: Using -syntax, but no package is selected specifying a
  preprocessor as required for -syntax

Moreover, ocamlfind automatically adds a -I option to the preprocessor
command, in my case I end up with
  
  -pp "mypp '-I' '/home/guesdon/.opam/4.02.1/lib/mypkg'

So the preprocessor machinery seems very camlp{4,5} oriented.

I think I'll just require the user to add -pp "ocamlfind mypkg/mypp" on
command line option.

Maxence

  reply	other threads:[~2015-03-02 18:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02 17:48 Maxence Guesdon
2015-03-02 18:07 ` Andreas Hauptmann
2015-03-02 18:24   ` Maxence Guesdon [this message]
2015-03-03  9:40     ` Gerd Stolpmann
2015-03-04 10:17       ` Maxence Guesdon

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=20150302192423.11734fc7@alcazar2 \
    --to=maxence.guesdon@inria.fr \
    --cc=caml-list@inria.fr \
    /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).