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=1.1 required=5.0 tests=AWL,SPF_NEUTRAL 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 7D7DCBC69 for ; Tue, 26 Jun 2007 08:55:19 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.226]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5Q6tIB8021989 for ; Tue, 26 Jun 2007 08:55:19 +0200 Received: by nz-out-0506.google.com with SMTP id s1so1364078nze for ; Mon, 25 Jun 2007 23:55:16 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KX+1/PoAPoTQtiWbIo5kX/cNyf8GwhkDcl+54LUr95KsyQbJTp+PXtzuEe5c+6HfHLI3euti6w51OTBI50qotOJK19tb+U8uokQMAFGhMS/AbI3Aa2AeDiryz26Ut6O94hp/WBOsSg+1n90Zt+fOU2m7lsKZVeUW7Wy7vMM1Nn4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rrv0zIiN1Blo6eYIgZ2NhsVfjRyc3RZ6F6+A5cdKnr6rheH2YMKCEST6dHYhVxhtMKo+7YdbuTERgBtYVNLVT+SQ/kD5+kwAKIkywafBJ3IFN9aHOy+4qS9W2z+RhfKUD7zhuCdDze/nrhm26K11/xoVaBkci3WIBvhvi4mpqeM= Received: by 10.114.127.1 with SMTP id z1mr6153780wac.1182840915952; Mon, 25 Jun 2007 23:55:15 -0700 (PDT) Received: by 10.114.181.8 with HTTP; Mon, 25 Jun 2007 23:55:15 -0700 (PDT) Message-ID: Date: Tue, 26 Jun 2007 08:55:15 +0200 From: "Nicolas Pouillard" To: "Andrew Warshaver" Subject: Re: [Caml-list] Re: extraneous -pp options with myocamlbuild Cc: caml-list@yquem.inria.fr In-Reply-To: <467FE1E1.1030502@janestcapital.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <467FE114.1060607@janestcapital.com> <467FE1E1.1030502@janestcapital.com> X-j-chkmail-Score: MSGID : 4680B856.002 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 4680B856.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; -pp:01 -pp:01 ocaml:01 foobar:01 flags:01 ocaml:01 ocamldep:01 usr:01 ocamldep:01 foobar:01 pcre:01 netstring:01 camlp:01 lib:01 cmo:01 On 6/25/07, Andrew Warshaver 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