* [Caml-list] cppo and camlp4 ? which way to go ?
@ 2013-07-10 2:03 Marc Weber
2013-07-10 2:23 ` [Caml-list] " Hongbo Zhang
0 siblings, 1 reply; 2+ messages in thread
From: Marc Weber @ 2013-07-10 2:03 UTC (permalink / raw)
To: caml-list
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Caml-list] Re: cppo and camlp4 ? which way to go ?
2013-07-10 2:03 [Caml-list] cppo and camlp4 ? which way to go ? Marc Weber
@ 2013-07-10 2:23 ` Hongbo Zhang
0 siblings, 0 replies; 2+ messages in thread
From: Hongbo Zhang @ 2013-07-10 2:23 UTC (permalink / raw)
To: Marc Weber, Caml List
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-10 2:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-10 2:03 [Caml-list] cppo and camlp4 ? which way to go ? Marc Weber
2013-07-10 2:23 ` [Caml-list] " Hongbo Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox