caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Hongbo Zhang <bobzhang1988@gmail.com>
To: Marc Weber <marco-oweber@gmx.de>, Caml List <caml-list@inria.fr>
Subject: [Caml-list] Re: cppo and camlp4 ? which way to go ?
Date: Tue, 09 Jul 2013 22:23:56 -0400	[thread overview]
Message-ID: <51DCC5BC.8040308@gmail.com> (raw)
In-Reply-To: <1373421379-sup-8981@nixos>

Hi,
    I think an easy way is to write a wrapper(in python, for example) to 
wrap both cppo and camlp4.
    btw, camlp4 does have optcomp which has similar functionality as cppo.
On 7/9/13 10:03 PM, Marc Weber wrote:
> It looks like ocaml supports only one -pp option?
> Now I want both: first cppo, then camlp4?
>
> Which way to go?
> way 1) find a way to make ocaml accept multiple -pp
>
> way 2) KISS: -pp 'cppo | camlp4', unlikely to work, because -pp adds the
>         input file as last argument?
>
>         Well - could be using -pp 'sh -c "cppo $1 | camlp4 $1 ..." '
>
>         that's linux, only, starting quoting hell
>
> way 3)
>    make cppo accept additional options, and make it call camlp4 and pass
>    its data to it
>    3.1: using a file: batteries includes with_temp_file, but would add
>          new dependencies
>    3.2: pipe through command, which cross platform implementation does
>          exist?
>
>
> way 4) rewrite my tracing code to use new -ppx (would take too long ?)
>
> Have I missed a simple solution ?
>
> I appologize if I've missed the obvious.
>
> Marc Weber
>


      reply	other threads:[~2013-07-10  2:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10  2:03 [Caml-list] " Marc Weber
2013-07-10  2:23 ` Hongbo Zhang [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=51DCC5BC.8040308@gmail.com \
    --to=bobzhang1988@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=marco-oweber@gmx.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).