* extraneous -pp options with myocamlbuild
@ 2007-06-25 15:36 Andrew Warshaver
2007-06-25 15:40 ` Andrew Warshaver
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Warshaver @ 2007-06-25 15:36 UTC (permalink / raw)
To: caml-list
Hi Folks,
I'm trying to use a myocamlbuild file with ocamlbuild. It appears to me
that by my specifying a -pp option, an extra -pp option gets thrown in
and I'm not sure why. Here is my myocamlbuild.ml (which I stole mostly
from another email):
$ cat myocamlbuild.ml
open Ocamlbuild_plugin;;
open Command;;
let packages = "pcre,netstring,jane,lbm"
let pp = "camlp4o /home/awarshaver/multi-oc/lib/pa_type_conv.cmo
/home/awarshaver/multi-oc/lib/pa_sexp_conv.cmo";;
let ocamlfind cmd =
S [A "ocamlfind"; A cmd; A "-thread"; A "-package"; A packages];;
flag ["ocaml"] (S[A "-pp"; A pp]);;
flag ["ocaml"; "link"] (A"-linkpkg");;
dispatch begin function
| After_options ->
Options.ocamlc := ocamlfind "c";
Options.ocamlopt := ocamlfind "opt";
| _ -> ()
end
And here is what happens at the terminal...
$ ./make.sh
+ /usr/local/home/godi310/godi/bin/ocamldep.opt -pp 'camlp4o
/home/awarshaver/multi-oc/lib/pa_type_conv.cmo
/home/awarshaver/multi-oc/lib/pa_sexp_conv.cmo' -pp '-pp '\''camlp4o
/home/awarshaver/multi-oc/lib/pa_type_conv.cmo
/home/awarshaver/multi-oc/lib/pa_sexp_conv.cmo'\''' -modules
live_query.ml > live_query.ml.depends
sh: - : invalid option
As you can see, after the first -pp '..' there is another -pp, and then
another '-pp ...', completely unexpected.
Thanks,
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: extraneous -pp options with myocamlbuild
2007-06-25 15:36 extraneous -pp options with myocamlbuild Andrew Warshaver
@ 2007-06-25 15:40 ` Andrew Warshaver
2007-06-26 6:55 ` [Caml-list] " Nicolas Pouillard
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Warshaver @ 2007-06-25 15:40 UTC (permalink / raw)
To: caml-list
Oops, I meant also to add, it does not matter if it is a -pp option, for
examlpe if I have
flag ["ocaml"] (A "foobar");;
then I get
$ ./make.sh
+ /usr/local/home/godi310/godi/bin/ocamldep.opt foobar -pp foobar
-modules live_query.ml > live_query.ml.depends
sh: foobar: command not found
Thanks!
Andrew Warshaver wrote:
> Hi Folks,
>
> I'm trying to use a myocamlbuild file with ocamlbuild. It appears to me
> that by my specifying a -pp option, an extra -pp option gets thrown in
> and I'm not sure why. Here is my myocamlbuild.ml (which I stole mostly
> from another email):
>
> $ cat myocamlbuild.ml
> open Ocamlbuild_plugin;;
> open Command;;
>
> let packages = "pcre,netstring,jane,lbm"
>
> let pp = "camlp4o /home/awarshaver/multi-oc/lib/pa_type_conv.cmo
> /home/awarshaver/multi-oc/lib/pa_sexp_conv.cmo";;
>
> let ocamlfind cmd =
> S [A "ocamlfind"; A cmd; A "-thread"; A "-package"; A packages];;
>
> flag ["ocaml"] (S[A "-pp"; A pp]);;
> flag ["ocaml"; "link"] (A"-linkpkg");;
>
> dispatch begin function
> | After_options ->
> Options.ocamlc := ocamlfind "c";
> Options.ocamlopt := ocamlfind "opt";
> | _ -> ()
> end
>
> And here is what happens at the terminal...
>
> $ ./make.sh
> + /usr/local/home/godi310/godi/bin/ocamldep.opt -pp 'camlp4o
> /home/awarshaver/multi-oc/lib/pa_type_conv.cmo
> /home/awarshaver/multi-oc/lib/pa_sexp_conv.cmo' -pp '-pp '\''camlp4o
> /home/awarshaver/multi-oc/lib/pa_type_conv.cmo
> /home/awarshaver/multi-oc/lib/pa_sexp_conv.cmo'\''' -modules
> live_query.ml > live_query.ml.depends
> sh: - : invalid option
>
> As you can see, after the first -pp '..' there is another -pp, and then
> another '-pp ...', completely unexpected.
>
> Thanks,
> Andrew
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Re: extraneous -pp options with myocamlbuild
2007-06-25 15:40 ` Andrew Warshaver
@ 2007-06-26 6:55 ` Nicolas Pouillard
0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Pouillard @ 2007-06-26 6:55 UTC (permalink / raw)
To: Andrew Warshaver; +Cc: caml-list
On 6/25/07, Andrew Warshaver <awarshaver@janestcapital.com> wrote:
> Oops, I meant also to add, it does not matter if it is a -pp option, for
> examlpe if I have
>
> flag ["ocaml"] (A "foobar");;
Be more precisce on your flags
flag ["compile"; "ocaml"] (A"-onlyoncompilation")
there is also link, pp, ocamldep.
For the pp flag the -pp option is automatically added when there is at
least one argument to pass.
>
> then I get
>
> $ ./make.sh
> + /usr/local/home/godi310/godi/bin/ocamldep.opt foobar -pp foobar
> -modules live_query.ml > live_query.ml.depends
> sh: foobar: command not found
>
> Thanks!
>
> Andrew Warshaver wrote:
> > Hi Folks,
> >
> > I'm trying to use a myocamlbuild file with ocamlbuild. It appears to me
> > that by my specifying a -pp option, an extra -pp option gets thrown in
> > and I'm not sure why. Here is my myocamlbuild.ml (which I stole mostly
> > from another email):
> >
> > $ cat myocamlbuild.ml
> > open Ocamlbuild_plugin;;
> > open Command;;
> >
> > let packages = "pcre,netstring,jane,lbm"
> >
> > let pp = "camlp4o /home/awarshaver/multi-oc/lib/pa_type_conv.cmo
> > /home/awarshaver/multi-oc/lib/pa_sexp_conv.cmo";;
> >
> > let ocamlfind cmd =
> > S [A "ocamlfind"; A cmd; A "-thread"; A "-package"; A packages];;
> >
> > flag ["ocaml"] (S[A "-pp"; A pp]);;
> > flag ["ocaml"; "link"] (A"-linkpkg");;
> >
> > dispatch begin function
> > | After_options ->
> > Options.ocamlc := ocamlfind "c";
> > Options.ocamlopt := ocamlfind "opt";
> > | _ -> ()
> > end
> >
> > And here is what happens at the terminal...
> >
> > $ ./make.sh
> > + /usr/local/home/godi310/godi/bin/ocamldep.opt -pp 'camlp4o
> > /home/awarshaver/multi-oc/lib/pa_type_conv.cmo
> > /home/awarshaver/multi-oc/lib/pa_sexp_conv.cmo' -pp '-pp '\''camlp4o
> > /home/awarshaver/multi-oc/lib/pa_type_conv.cmo
> > /home/awarshaver/multi-oc/lib/pa_sexp_conv.cmo'\''' -modules
> > live_query.ml > live_query.ml.depends
> > sh: - : invalid option
> >
> > As you can see, after the first -pp '..' there is another -pp, and then
> > another '-pp ...', completely unexpected.
> >
> > Thanks,
> > Andrew
> >
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
--
Nicolas Pouillard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-26 6:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-25 15:36 extraneous -pp options with myocamlbuild Andrew Warshaver
2007-06-25 15:40 ` Andrew Warshaver
2007-06-26 6:55 ` [Caml-list] " Nicolas Pouillard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox