caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Martin Jambon <martin_jambon@emailuser.net>
To: Gerd Stolpmann <info@gerd-stolpmann.de>
Cc: Alain Frisch <Alain.Frisch@inria.fr>,
	Martin Jambon <martin_jambon@emailuser.net>,
	caml-list@inria.fr
Subject: Re: [Caml-list] ocamlfind + ocamldep + camlp4?
Date: Tue, 6 Dec 2005 13:33:51 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.63.0512061109120.23278@munge> (raw)
In-Reply-To: <1133856603.5990.48.camel@localhost.localdomain>

On Tue, 6 Dec 2005, Gerd Stolpmann wrote:

> Am Montag, den 05.12.2005, 14:08 -0800 schrieb Martin Jambon:
>> Hello,
>>
>> I would like to know if there is a way of using ocamlfind as front-end to
>> camlp4o alone. Let me explain: the following works nicely since it will
>> locate the pa_someext package and load its dependencies:
>>
>>    ocamlfind ocamlc -c -syntax camlp4o -package pa_someext file.ml
>>
>> but how to tell ocamldep to preprocess file.ml using camlp4o and the
>> wanted syntax modules, without listing all the include directories and
>> dependencies?
>
> Why not
>
> ocamlfind ocamldep -syntax camlp4o -package pa_someext *.ml
>
> ?
>
> You can also get the options for camlp4o using:
>
> P4_PKG = "pa_someext"
> P4_I_OPTIONS = $(shell ocamlfind query -predicates "syntax,preprocessor,camlp4o" \
>                 $(P4_PKG) -i-format)
> P4_A_OPTIONS = $(shell ocamlfind query -predicates "syntax,preprocessor,camlp4o" \
>                 $(P4_PKG) -a-format)
>
> then
>
> camlp4 $(P4_I_OPTIONS) $(P4_A_OPTIONS)
>
> should work.

Thanks a lot Gerd (and Alain).

I was really looking for a simple way of performing source-to-source 
conversion of OCaml code, from the command-line. So that really helps, and 
I derived a shell-script which provides such a command:
   http://martin.jambon.free.fr/camlp4find



Martin

--
Martin Jambon, PhD
http://martin.jambon.free.fr

Store and share your bioinformatics tips at http://wikiomics.org


      reply	other threads:[~2005-12-06 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-05 22:08 Martin Jambon
2005-12-06  8:00 ` [Caml-list] " Alain Frisch
2005-12-06  8:10 ` Gerd Stolpmann
2005-12-06 21:33   ` Martin Jambon [this message]

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=Pine.LNX.4.63.0512061109120.23278@munge \
    --to=martin_jambon@emailuser.net \
    --cc=Alain.Frisch@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.de \
    /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;
as well as URLs for NNTP newsgroup(s).