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.3 required=5.0 tests=AWL 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 062A0BC6B for ; Fri, 22 Jun 2007 22:38:40 +0200 (CEST) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5MKcdqL020236 for ; Fri, 22 Jun 2007 22:38:39 +0200 Received: from [192.168.1.111] (vil93-4-82-227-140-227.fbx.proxad.net [82.227.140.227]) by smtp5-g19.free.fr (Postfix) with ESMTP id 81A7E45068; Fri, 22 Jun 2007 22:38:39 +0200 (CEST) Message-ID: <467C3345.9060303@philippewang.info> Date: Fri, 22 Jun 2007 22:38:29 +0200 From: Philippe Wang User-Agent: Thunderbird 1.5.0.12 (Macintosh/20070509) MIME-Version: 1.0 To: Andrew Warshaver , ocaml ml Subject: Re: [Caml-list] ocamlbuild single quotes causing trouble References: <467BE251.2090404@janestcapital.com> <467C0275.2050106@frisch.fr> <467C0ADA.7060008@janestcapital.com> In-Reply-To: <467C0ADA.7060008@janestcapital.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 467C334F.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; frisch:01 abbrev:01 lib:01 ocamlc:01 wrote:01 wrote:01 caml-list:01 alain:01 argument:02 argument:02 variables:02 guess:04 guess:04 shell:04 shell:04 Andrew Warshaver wrote: > > Alain Frisch wrote: >> Andrew Warshaver wrote: >>> it works just fine. I also discovered that if I don't use the ~ >>> abbrev. >>> then everything is happy (although this took me a long time to >>> discover!). >> >> The shell is responsible to expand ~ before calling the program. If you >> quote it, it won't be expanded; this is normal. When you put ~ on >> ocamlbuild's command line, as in "-I,~/multi-oc/lib" it is not expanded >> either (~ is interpreted only at the beginning of a word on the command >> line). >> > Thanks for the explanation. But is there any reason that ocamlbuild > has to add the single quotes when transferring the argument to > ocamlc? And, if it didn't, would it then work appropriately? The quotes are necessary to consider that the block is a single argument. If you want to remove those quotes, then you have to "guess" what the user meant (i.e. guessing where the quotes would have been if they were there). In some cases, it's impossible to guess with a 100% accuracy... Well, I suggest you to use $HOME instead of ~. (then you have to use double quotes instead of quotes, so that the shell expands $HOME, as the variables inside simple quotes don't expand -- well I hope you are not using a too weird shell ;-) -- Philippe Wang mail[at]philippewang.info