From mboxrd@z Thu Jan 1 00:00:00 1970 X-Sympa-To: caml-list@inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p72MMbbe028608 for ; Wed, 3 Aug 2011 00:22:37 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArsBALN3OE7RVdy2mGdsb2JhbAA/Aw6YSYZxAYgXCBQBAQEBAQgJDQcUJYFAAQEBAQIBEgIsARsdAQMBCwYFCw0uIQEBEQEFARwGEwgah0oEogEKjC+CVIRqO4htAgMGgziDBASCUJAriWuCYTyDJTk X-IronPort-AV: E=Sophos;i="4.67,307,1309730400"; d="scan'208";a="104548634" Received: from mail-vx0-f182.google.com ([209.85.220.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 03 Aug 2011 00:22:33 +0200 Received: by vxg33 with SMTP id 33so373214vxg.27 for ; Tue, 02 Aug 2011 15:22:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=qy6U3Gj+zyRthr58svKbw1lWcpBhiKYiINiG/9E3pGU=; b=AG5ZEriWGmwHOsXQC8wqwEyHTL9jM2vRTGN1B5RXSyJhReeY1a+7gmKdNUZ5P60zmc zruvVHDD/Up9iYEMngZKsY0Mtg1QzHy83OU9zbaXHYvqxVkzt+hyD7aqkiGOHTptRzGB sdHBHlHQngjW20qCwSNpw7KTr3YcA2kbu+7yI= Received: by 10.220.39.67 with SMTP id f3mr1299737vce.86.1312323751097; Tue, 02 Aug 2011 15:22:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.116.70 with HTTP; Tue, 2 Aug 2011 15:22:11 -0700 (PDT) In-Reply-To: References: From: Philippe Veber Date: Wed, 3 Aug 2011 00:22:11 +0200 Message-ID: To: William Le Ferrand Cc: caml users Content-Type: multipart/alternative; boundary=bcaec54ee94203b60304a98d2f09 X-Validation-by: philippe.veber@gmail.com Subject: Re: [Caml-list] Oasis and camlp4of --bcaec54ee94203b60304a98d2f09 Content-Type: text/plain; charset=ISO-8859-1 Well, it seems that I have a much simpler problem (and it is not related to camlp4of specifically): the only thing I'm missing is a '-syntax camlp4o' when compiling the library. Indeed, adding: : syntax_camlp4o at the end of _tags fixes the problem. I must have forgotten an option in the _oasis file, but I can't see which. Anyway, many thanks William ! ph. 2011/8/2 William Le Ferrand > 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 : > 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 > 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/ > --bcaec54ee94203b60304a98d2f09 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Well, it seems that I have a much simpler problem (and it is not related to= camlp4of specifically): the only thing I'm missing is a '-syntax c= amlp4o' when compiling the library. Indeed, adding:

<src/synt= ax/*>: syntax_camlp4o

at the end of _tags fixes the problem. I must have forgotten an option = in the _oasis file, but I can't see which. Anyway, many thanks William = !
ph.


2011/8/2 William Le Ferrand = <William.Le-Ferrand@polytechnique.edu>
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 o= f
> camlp4o ? I tried to add a ByteOpt line for this:
>
> Library pa_guizmin
> =A0 Path:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 src/syntax
> =A0 Modules:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Pa_guizmin
> =A0 FindlibParent:=A0=A0=A0=A0=A0 guizmin
> =A0 FindlibName:=A0=A0=A0=A0=A0=A0=A0 syntax
> =A0 BuildDepends:=A0=A0=A0=A0=A0=A0 camlp4.lib, camlp4.quotations.o
> =A0 CompiledObject:=A0=A0=A0=A0 byte
> =A0 ByteOpt:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 -pp camlp4of
>
> and indeed myocam= lbuild.ml now contains:
>
> let package_default =3D
> =A0 {
> =A0=A0=A0=A0 MyOCamlbuildBase.lib_ocaml =3D
> =A0=A0=A0=A0=A0=A0 [("src/syntax/pa_guizmin", ["src/syn= tax"]); ("src/guizmin",
> ["src"])];
> =A0=A0=A0=A0 lib_c =3D [];
> =A0=A0=A0=A0 flags =3D
> =A0=A0=A0=A0=A0=A0 [
> =A0=A0=A0=A0=A0=A0=A0=A0=A0 (["oasis_library_pa_guizmin_byte"= ;; "ocaml"; "link"; "byte"],
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 [(OASISExpr.EBool true, S [A "-= pp"; A "camlp4of"])]);
> =A0=A0=A0=A0=A0=A0=A0=A0=A0 (["oasis_library_pa_guizmin_byte"= ;; "ocaml"; "ocamldep"; "byte"],
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 [(OASISExpr.EBool true, S [A "-= pp"; A "camlp4of"])]);
> =A0=A0=A0=A0=A0=A0=A0=A0=A0 (["oasis_library_pa_guizmin_byte"= ;; "ocaml"; "compile"; "byte"],
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 [(OASISExpr.EBool true, S [A "-= pp"; A "camlp4of"])])
> =A0=A0=A0=A0=A0=A0 ];
> =A0=A0=A0=A0 }
> =A0 ;;
>
> But still, these options are not used when I compile using ocaml setup.ml
> -build
>
> + ocamlfind ocamldep -package camlp4.quotations.o -package camlp4.lib<= br> > -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,
> =A0 Philippe.
>



--
William Le Ferrand

Mobile :=A0(+1)=A0(415) 683-1484
Web :=A0h= ttp://williamleferrand.github.com/

--bcaec54ee94203b60304a98d2f09--