caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: William Le Ferrand <William.Le-Ferrand@polytechnique.edu>
To: Philippe Veber <philippe.veber@gmail.com>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Oasis and camlp4of
Date: Tue, 2 Aug 2011 14:54:34 -0700	[thread overview]
Message-ID: <CAGS5m-nfsHn2HndvHa9XzEAnUs02DrTed-T+v-utZPusCg1f9w@mail.gmail.com> (raw)
In-Reply-To: <CAOOOohSuZ3zDPckHSBD1C7JHU3CgFMJ1w1OeeGiU2S0vyT5G9Q@mail.gmail.com>

Hi

I let Sylvain detailing how things should be done properly but as a
quick hack you can add at the bottom of the _tags file <src/*.ml{,i}>:
syntax_camlp4of , it should do the trick (and it won't be erased by
oasis setup if you put it after the #OASIS_END line.

Hope it helps

William



On Tue, Aug 2, 2011 at 1:32 PM, Philippe Veber <philippe.veber@gmail.com> wrote:
> Hello,
> how can I tell oasis that my syntax extension needs camlp4of instead of
> camlp4o ? I tried to add a ByteOpt line for this:
>
> Library pa_guizmin
>   Path:               src/syntax
>   Modules:            Pa_guizmin
>   FindlibParent:      guizmin
>   FindlibName:        syntax
>   BuildDepends:       camlp4.lib, camlp4.quotations.o
>   CompiledObject:     byte
>   ByteOpt:            -pp camlp4of
>
> and indeed myocamlbuild.ml now contains:
>
> let package_default =
>   {
>      MyOCamlbuildBase.lib_ocaml =
>        [("src/syntax/pa_guizmin", ["src/syntax"]); ("src/guizmin",
> ["src"])];
>      lib_c = [];
>      flags =
>        [
>           (["oasis_library_pa_guizmin_byte"; "ocaml"; "link"; "byte"],
>             [(OASISExpr.EBool true, S [A "-pp"; A "camlp4of"])]);
>           (["oasis_library_pa_guizmin_byte"; "ocaml"; "ocamldep"; "byte"],
>             [(OASISExpr.EBool true, S [A "-pp"; A "camlp4of"])]);
>           (["oasis_library_pa_guizmin_byte"; "ocaml"; "compile"; "byte"],
>             [(OASISExpr.EBool true, S [A "-pp"; A "camlp4of"])])
>        ];
>      }
>   ;;
>
> But still, these options are not used when I compile using ocaml setup.ml
> -build
>
> + ocamlfind ocamldep -package camlp4.quotations.o -package camlp4.lib
> -package camlp4.extend -modules src/syntax/pa_guizmin.ml >
> src/syntax/pa_guizmin.ml.depends
> File "src/syntax/pa_guizmin.ml", line 22, characters 3-5:
> Error: Syntax error
>
> Am I missing something ?
>
> Cheers,
>   Philippe.
>



-- 
William Le Ferrand

Mobile : (+1) (415) 683-1484
Web : http://williamleferrand.github.com/


  reply	other threads:[~2011-08-02 21:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 20:32 Philippe Veber
2011-08-02 21:54 ` William Le Ferrand [this message]
2011-08-02 22:22   ` Philippe Veber
2011-08-03  8:11     ` [Caml-list] " Sylvain Le Gall
2011-08-03 12:02       ` Philippe Veber

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=CAGS5m-nfsHn2HndvHa9XzEAnUs02DrTed-T+v-utZPusCg1f9w@mail.gmail.com \
    --to=william.le-ferrand@polytechnique.edu \
    --cc=caml-list@inria.fr \
    --cc=philippe.veber@gmail.com \
    /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).