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 <[email protected]> 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/
--
Caml-list mailing list. Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs