caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OASIS help : adding -pp camlp4of and camlp4.gramlib to the compilation flags
@ 2012-01-17  2:51 Francois Berenger
  2012-01-17  7:48 ` [Caml-list] " Francois Berenger
  0 siblings, 1 reply; 4+ messages in thread
From: Francois Berenger @ 2012-01-17  2:51 UTC (permalink / raw)
  To: caml-list; +Cc: ocaml_beginners

Hello,

I'd like to preprocess some source files.
Gabriel Scherer advised me to use the options
mentioned in the title of this e-mail.

What should I modify in an oasis project in order to
add these compilation flags?

I guess something should be added to the _oasis file.
I did not find anything in the oasis documentation about
using a preprocessor.

Here is an example build command that works, issued
by a Makefile for the moment:

ocamlfind ocamlopt -package camlp4.gramlib,batteries -linkpkg -o 
test_logger -annot -g -pp camlp4of logger.ml test_logger.ml

Thanks a lot,
Francois.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Caml-list] Re: OASIS help : adding -pp camlp4of and camlp4.gramlib to the compilation flags
  2012-01-17  2:51 [Caml-list] OASIS help : adding -pp camlp4of and camlp4.gramlib to the compilation flags Francois Berenger
@ 2012-01-17  7:48 ` Francois Berenger
  2012-01-17  8:32   ` Jérémie Dimino
  0 siblings, 1 reply; 4+ messages in thread
From: Francois Berenger @ 2012-01-17  7:48 UTC (permalink / raw)
  To: caml-list; +Cc: ocaml_beginners

On 01/17/2012 11:51 AM, Francois Berenger wrote:
> Hello,
>
> I'd like to preprocess some source files.
> Gabriel Scherer advised me to use the options
> mentioned in the title of this e-mail.
>
> What should I modify in an oasis project in order to
> add these compilation flags?
>
> I guess something should be added to the _oasis file.
> I did not find anything in the oasis documentation about
> using a preprocessor.
>
> Here is an example build command that works, issued
> by a Makefile for the moment:
>
> ocamlfind ocamlopt -package camlp4.gramlib,batteries -linkpkg -o
> test_logger -annot -g -pp camlp4of logger.ml test_logger.ml

In fact, now I only need to use cppo to preprocess my source files.
So the updated command is:
ocamlfind ocamlopt -package batteries -linkpkg -o test_logger -annot -g 
-pp cppo   logger.ml test_logger.ml

How do I request oasis to preprocess all files using cppo?

Thanks a lot,
Francois.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Re: OASIS help : adding -pp camlp4of and camlp4.gramlib to the compilation flags
  2012-01-17  7:48 ` [Caml-list] " Francois Berenger
@ 2012-01-17  8:32   ` Jérémie Dimino
  2012-01-17  9:25     ` Francois Berenger
  0 siblings, 1 reply; 4+ messages in thread
From: Jérémie Dimino @ 2012-01-17  8:32 UTC (permalink / raw)
  To: Francois Berenger; +Cc: caml-list, ocaml_beginners

Le mardi 17 janvier 2012 à 16:48 +0900, Francois Berenger a écrit :
> In fact, now I only need to use cppo to preprocess my source files.
> So the updated command is:
> ocamlfind ocamlopt -package batteries -linkpkg -o test_logger -annot -g 
> -pp cppo   logger.ml test_logger.ml
> 
> How do I request oasis to preprocess all files using cppo?

You must modify the _tags file. You can add this line (outside
OASIS_START/OASIS_STOP):

  <**/*.ml>: pp(cppo)

you may also want to add:

  BuildTools: cppo

to your _oasis file so oasis will check for cppo.

Cheers,

-- 
Jérémie



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Re: OASIS help : adding -pp camlp4of and camlp4.gramlib to the compilation flags
  2012-01-17  8:32   ` Jérémie Dimino
@ 2012-01-17  9:25     ` Francois Berenger
  0 siblings, 0 replies; 4+ messages in thread
From: Francois Berenger @ 2012-01-17  9:25 UTC (permalink / raw)
  To: caml-list

On 01/17/2012 05:32 PM, Jérémie Dimino wrote:
> Le mardi 17 janvier 2012 à 16:48 +0900, Francois Berenger a écrit :
>> In fact, now I only need to use cppo to preprocess my source files.
>> So the updated command is:
>> ocamlfind ocamlopt -package batteries -linkpkg -o test_logger -annot -g
>> -pp cppo   logger.ml test_logger.ml
>>
>> How do I request oasis to preprocess all files using cppo?
>
> You must modify the _tags file. You can add this line (outside
> OASIS_START/OASIS_STOP):
>
>    <**/*.ml>: pp(cppo)
>
> you may also want to add:
>
>    BuildTools: cppo
>
> to your _oasis file so oasis will check for cppo.

Thanks a lot! You made my day. :)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-17  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-17  2:51 [Caml-list] OASIS help : adding -pp camlp4of and camlp4.gramlib to the compilation flags Francois Berenger
2012-01-17  7:48 ` [Caml-list] " Francois Berenger
2012-01-17  8:32   ` Jérémie Dimino
2012-01-17  9:25     ` Francois Berenger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).