[
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: | Nicolas Pouillard <nicolas.pouillard@g...> |
| Subject: | Re: [Caml-list] ocamlbuild .inferred.mli problem |
Excerpts from Hezekiah M. Carty's message of Sun Sep 16 04:36:23 +0200 2007:
> I have been unable to get ocamlbuild to preprocess a single .ml file
> when creating an inferred interface file. Here is some simple code
> to illustrate the problem:
>
> test.ml:
> value f x = x + 2;
>
> _tags:
> <test.ml>: pp(camlp4r)
Using pp(...), is not the best way to use preprocessors.
Try the camlp4r tag:
"test.ml": camlp4r
[...]
> 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");;
> along with a matching flag in _tags causes havoc, with each of the
> items on the list being repeated twice and quoted, leading to shell
> errors.
>
> I'm using revised syntax here as a simple example. I originally ran
> in to this issue while trying to build a library which uses the
> pa_openin camlp4 extension.
>
> Any suggestions or pointers on how to proceed with this?
HTH,
--
Nicolas Pouillard aka Ertai