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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id E17DABC69 for ; Wed, 2 May 2007 14:00:34 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l42C0YPC021927 for ; Wed, 2 May 2007 14:00:34 +0200 Received: by ug-out-1314.google.com with SMTP id k3so187513ugf for ; Wed, 02 May 2007 05:00:34 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=UqC0lFVmmxELvfdTQFqbDY5J9IMekExtvdCWwHdn7Qb+BsphnIgXKthhLCb5SVOaVLeNUPjr8G1IWDbuPDgS3Csy4OMBfozh9x+apvrB7y3J0cR+InZjSWetyb4C7s9h7YB9dSWFlFn/V+p3yiJih6adqaKGrWx43a3Z5rYjB5U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=nG7OGyTyEE5zvIVPRABRhiqSS2aZ7wBBqGoaUY73CaDbRubcmad8ofvXowAxo1kLciEIVuFcUBHfr7YV/B64v/fJsJ7f9iCMkF+kirnefhNwDbU+zFHOQ/8D1x1NF7Qw+jojMXy/m1Rmc6/swsrTZnpmhSt2i0NQegx5Wo5QhyM= Received: by 10.82.187.16 with SMTP id k16mr1287749buf.1178107234178; Wed, 02 May 2007 05:00:34 -0700 (PDT) Received: from ?192.168.1.34? ( [83.52.237.136]) by mx.google.com with ESMTP id c25sm42251ika.2007.05.02.05.00.20; Wed, 02 May 2007 05:00:29 -0700 (PDT) In-Reply-To: References: <301C13B2-671A-40CE-AB6C-E92E0ED454E6@gmail.com> <78040751-B95B-4620-A995-A4AB74F5E997@gmail.com> <2A1A8C74-50D5-4F0B-815B-B56CA506578E@gmail.com> <264A27CD-4310-4142-9BCB-2BF3DF5478C3@gmail.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1672645D-0CBF-4E76-BF6B-01831AD5B516@gmail.com> Cc: "Caml List" Content-Transfer-Encoding: 7bit From: Joel Reymont Subject: Re: [Caml-list] Re: ocamlbuild, menhir and keeping tokens in a separate file Date: Wed, 2 May 2007 13:00:11 +0100 To: "Nicolas Pouillard" X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 46387D62.001 on concorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at concorde with ID 46387D62.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; tokens:01 ocaml:01 parser:01 ocaml:01 ocamldep:01 symlink:01 compilation:01 flags:01 2007,:98 wrote:01 compile:01 compile:01 caml-list:01 mly:02 mly:02 On May 2, 2007, at 12:54 PM, Nicolas Pouillard wrote: > The main behavior of dep is just to build EasyToken.mly before running > the command, not to include it into the command line. You can use flag > to insert it into the command line. This is what I use now: let menhir_opts = S[A"--external-tokens"; A"EasyToken"; A"--base"; A"EasyParser"; A"EasyToken.mly" ];; flag ["ocaml"; "parser"; "menhir" ] (menhir_opts); flag ["ocaml"; "menhir_ocamldep" ] (menhir_opts); Two things happen, though, both undesirable: 1) Menhir cannot find EasyToken.mly unless I manually go into _build and symlink the file from ../ 2) ocamlbuild tries to compile EasyToken.mly. I want to avoid this as this file is not set up for compilation. How do I prevent ocamlbuild from trying to compile EasyToken.mly while still copying it into _build/ for Menhir to find it? Alternatively, how do I specify custom flags for the Menhir run on EasyToken.mly? I need to add --token-only, for example. And one last thing, how do I apply menhir_opts to certain mly files but not others? Thanks, Joel -- http://wagerlabs.com/