From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id EF3EABBAF for ; Tue, 24 Aug 2010 14:14:48 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkBAO5Tc0zRVde2mGdsb2JhbACgNQgVAQEBAQEICQwHESKeTYkYghOGQi6IVAEBAwWFMgSENQ X-IronPort-AV: E=Sophos;i="4.56,263,1280700000"; d="scan'208";a="57737189" Received: from mail-ey0-f182.google.com ([209.85.215.182]) by mail2-smtp-roc.national.inria.fr with ESMTP; 24 Aug 2010 14:14:48 +0200 Received: by eyx24 with SMTP id 24so3837009eyx.27 for ; Tue, 24 Aug 2010 05:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:subject :to:in-reply-to:references:mime-version:content-type:content-id; bh=klH2EBaipdRFYJcAioAtwWuum3J1T6mxobZzFoZAgYw=; b=gFKeEukBNyp8ymhxfSKdMB7hW2K6ae2m+ZEI1OwpBfqNlT2Wy2Ao9Tw1vFqh1+QrII o3y4bOrVApau9sLOqXZ9KZy+bcSHub1QGodzWr4dc6n6yKWT7moxuFeu+b0sXyfKtrq3 3klu30LxMFbnWR0wffB0sXEMNmRhuW2E1rCuU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:subject:to:in-reply-to:references:mime-version :content-type:content-id; b=NIACvc2LojLBU0P5aOk+CmUR6sT7j1egppyZREfuAEMsAKWR3qytGFavdDiGd7z7de jZOTQekIaZHzN3npGWVXvpgD7aeKzQXxavh+NidUdPLpgKOu4Xul++HpiLGBPXJFbyOI 8h6z0bVm6h6GC+s0V06eIPWYOMXVICGN2PBBk= Received: by 10.216.179.137 with SMTP id h9mr5873848wem.39.1282652088435; Tue, 24 Aug 2010 05:14:48 -0700 (PDT) Received: from localhost (sk.feydakins.org [94.23.4.142]) by mx.google.com with ESMTPS id v16sm14557weq.32.2010.08.24.05.14.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Aug 2010 05:14:47 -0700 (PDT) Message-ID: <4c73b7b7.10ecd80a.42a3.011e@mx.google.com> Date: Tue, 24 Aug 2010 05:14:47 -0700 (PDT) From: Nicolas Pouillard Subject: Re: [Caml-list] specify include directories with ocamlbuild To: Hendrik Tews , caml-list@inria.fr In-Reply-To: <19571.30056.802644.157376@blau.inf.tu-dresden.de> References: <19571.30056.802644.157376@blau.inf.tu-dresden.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2691.1282652086.1@sk.feydakins.org> X-Spam: no; 0.00; 0200,:01 hendrik:01 tews:01 tews:01 camlp:01 camlp:01 parsers:01 parsers:01 ocaml:01 syntax:01 foo:01 flags:01 syntax:01 tu-dresden:01 wrote:01 On Tue, 24 Aug 2010 09:31:52 +0200, Hendrik Tews wrote: > Hi, Hi, > in 3.11 I used > > : I(+camlp4/Camlp4Parsers) > > in _tags to specify that ocamlbuild should add > -I +camlp4/Camlp4Parsers when compiling some_file. In 3.12 this > gives > > Warning: tag "I" does not expect a parameter, but is used with parameter "+camlp4/Camlp4Parsers" > > What is the recommended way to specify an include directory in > 3.12? Can you try to have the following declaration in your myocamlbuild.ml pflag ["ocaml"] "I" (fun x -> S[A"-I"; A x]) The syntax foo(bar) was implicitely turned into arguments "-foo bar" for commands involving the matched files, however this was too much specific (the "-" thing) and too much coarse grained. Indeed there was no way to choose when to add this flag (linking, compiling, pre-processing, building doc...). This is now possible with thes parameterized flags, and almost backward compatible since we added default pflags: pp(_), for-pack(_), inline(_), package(_), predicate(_), syntax(_) However we didn't thought about I(_)... -- Nicolas Pouillard http://nicolaspouillard.fr