From: Dario Teixeira <darioteixeira@yahoo.com>
To: Nicolas Pouillard <nicolas.pouillard@gmail.com>
Cc: caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Ocamlbuild plugins
Date: Wed, 7 Nov 2007 13:39:19 +0000 (GMT) [thread overview]
Message-ID: <600766.97480.qm@web54604.mail.re2.yahoo.com> (raw)
In-Reply-To: <1194376648-sup-4076@ausone.local>
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
next prev parent reply other threads:[~2007-11-07 13:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-05 20:34 Dario Teixeira
2007-11-06 14:23 ` [Caml-list] " Nicolas Pouillard
2007-11-06 16:23 ` Dario Teixeira
2007-11-06 19:29 ` Nicolas Pouillard
2007-11-07 13:39 ` Dario Teixeira [this message]
2007-11-07 16:01 ` Nicolas Pouillard
2007-11-07 16:07 ` Alan Falloon
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=600766.97480.qm@web54604.mail.re2.yahoo.com \
--to=darioteixeira@yahoo.com \
--cc=caml-list@yquem.inria.fr \
--cc=nicolas.pouillard@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