Browse thread
Ocamlbuild plugins
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Dario Teixeira <darioteixeira@y...> |
| Subject: | Re: [Caml-list] Ocamlbuild plugins |
Hi,
> (...)
> Sadly you're right. As always any help/contribution will be appreciated :)
Well, I'll do my part: once I grok Ocamlbuild I'll profusely document
the myocamlbuild.ml for my project.
Anyway, thanks again for your help. I have at the moment a myocamlbuild.ml
that can handle almost everything I need; the only bit that isn't working
is precisely the part that handles camlp4. So, here's the myocamlbuild.ml:
______________________________________________________________
open Ocamlbuild_plugin
open Command
let ocamlfind x =
let packages = "calendar, ocsigen" in
S[A "ocamlfind"; x; A "-package"; A packages];;
dispatch begin function
| Before_options ->
Options.ocamlc := ocamlfind & A"ocamlc";
Options.ocamlopt := ocamlfind & A"ocamlopt";
Options.ocamldep := ocamlfind & A"ocamldep"
| After_rules ->
let some_flags = S[A"-package"; A"pgocaml.statements";
A"-syntax"; A"camlp4o"] in
flag ["ocaml"; "compile"; "use_pgocaml_statements"]
some_flags;
flag ["ocaml"; "ocamldep"; "use_pgocaml_statements"]
some_flags;
flag ["ocaml"; "link"] (A"-linkpkg")
| _ -> ()
end;;
______________________________________________________________
I also have a _tags file with just one line:
"database.ml": use_pgocaml_statements, thread
And this is the error I get when I run "ocamlbuild database.cmo":
______________________________________________________________
+ ocamlfind ocamldep -package 'calendar, ocsigen' -package pgocaml.statements
-syntax camlp4o -pp '-package pgocaml.statements -syntax camlp4o' -modules
database.ml > database.ml.depends
Warning: -pp overrides the effect of -syntax partly
sh: Illegal option -p
Preprocessing error on file database.ml
Command exited with code 2.
______________________________________________________________
My guess is that some builtin rule is trying to invoke camlp4 with -pp,
which is altogether unnecessary because ocamlfind takes care of that
automatically with the -syntax option. Any thoughts?
Thanks for your time,
Dario
_____________________________________________________
Do not compromise. Get unlimited storage and first rate spam protection with Yahoo! Mail.
http://uk.mail.yahoo.com