From: "Hezekiah M. Carty" <hcarty@atmos.umd.edu>
To: Nicolas Pouillard <nicolas.pouillard@gmail.com>
Cc: Inria Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] ocamlbuild .inferred.mli problem
Date: Mon, 17 Sep 2007 14:08:49 -0400 [thread overview]
Message-ID: <20070917180849.GA3012@laptop44.umd.edu> (raw)
In-Reply-To: <1190038867-sup-9845@ausone.inria.fr>
On Mon, 17 Sep 2007, Nicolas Pouillard wrote:
> > I have also tried creating a myocamlbuild.ml to get around this, but
> > using something like this in myocamlbuild.ml:
> >
> > flag ["use_openin"]
> > (S [A "-I"; A "+camlp4"; A "-pp"; A "camlp4o pa_openin.cmo"]);;
>
> You certainly don't want to add these flags to any commands that treat a file
> that is tagged use_openin. You certainly want to add them only for ocaml
> preprocessing.
>
> flag ["ocaml"; "pp"; "use_openin"]
> (A"pa_openin.cmo");;
>
This gets me a little bit closer I think, but I'm still not able to
make ocamlbuild do what I want.
Here's the current code -
test.ml:
let sum l = open List in fold_left (+) 0 l
_tags:
"test.ml": use_openin
myocamlbuild.ml:
open Ocamlbuild_plugin;;
open Command;;
flag ["ocaml"; "pp"; "use_openin"] (A "pa_openin.cmo");;
Using the above "flag ..." line adds "-pp pa_openin.cmo" to the
compilation command line using the following line in _tags:
"test.ml": use_openin
If I change the _tags line to:
"test.ml": camlp4o, use_openin
the output from ocamlbuild test.cma is:
+ /home/hcarty/Applications/godi/bin/ocamldep.opt -pp 'pa_openin.cmo
camlp4o' -modules test.ml > test.ml.depends
sh: pa_openin.cmo: command not found
Preprocessing error on file test.ml
How do I fix this to properly use a syntax extension such as
pa_openin.cmo and be able to specify the location of the .cmo, but
only for the files which need that specific extension? ie. add "-I
+camlp4" to the ocaml* command line, and have the -pp value in the
correct order.
I apologize for asking such a basic question, but I haven't been
able to figure out the answer from the user's guide or other
examples I've found. Once this is all worked out I would be happy
to add this to a wiki somewhere.
Thanks,
Hez
next prev parent reply other threads:[~2007-09-17 18:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-16 2:36 Hezekiah M. Carty
2007-09-17 14:25 ` [Caml-list] " Nicolas Pouillard
2007-09-17 18:08 ` Hezekiah M. Carty [this message]
2007-09-18 14:49 ` Nicolas Pouillard
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=20070917180849.GA3012@laptop44.umd.edu \
--to=hcarty@atmos.umd.edu \
--cc=caml-list@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