From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 85852BC69 for ; Mon, 25 Jun 2007 17:40:20 +0200 (CEST) Received: from smtp.janestcapital.com (www.janestcapital.com [66.155.124.107]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5PFeJqI020138 for ; Mon, 25 Jun 2007 17:40:19 +0200 Received: from [172.25.131.129] [38.96.172.125] by janestcapital.com (SMTPD-9.10) id A1F20178; Mon, 25 Jun 2007 11:40:34 -0400 Message-ID: <467FE1E1.1030502@janestcapital.com> Date: Mon, 25 Jun 2007 11:40:17 -0400 From: Andrew Warshaver User-Agent: Thunderbird 2.0.0.0 (X11/20070505) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: extraneous -pp options with myocamlbuild References: <467FE114.1060607@janestcapital.com> In-Reply-To: <467FE114.1060607@janestcapital.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IMAIL-SPAM-VALREVDNS: (e1f200c9000010fa) X-Miltered: at discorde with ID 467FE1E3.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; -pp:01 -pp:01 ocaml:01 foobar:01 usr:01 ocamldep:01 foobar:01 pcre:01 netstring:01 camlp:01 lib:01 cmo:01 lib:01 sexp:01 cmo:01 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 >