From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p2LJmYDa015686 for ; Mon, 21 Mar 2011 20:48:34 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmYDAIpIh01KfVI0imdsb2JhbACYPIx7CBQBAQEKCQ0HEgYhqCyKQoIfhSEviFsBAQMFhV4EjGaDUXKEPDo X-IronPort-AV: E=Sophos;i="4.63,220,1299452400"; d="scan'208";a="103208304" Received: from mail-ww0-f52.google.com ([74.125.82.52]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 21 Mar 2011 20:48:18 +0100 Received: by wwj40 with SMTP id 40so8373003wwj.9 for ; Mon, 21 Mar 2011 12:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:content-type:content-transfer-encoding :subject:date:message-id:to:mime-version:x-mailer; bh=LumWUKMlLlRsroqayFC0Ywd8i/x7tS6ZDf2EeigWMkw=; b=t0WkpKSJJSzxdT9fIw/FX3rgVKl5gCABODAuE7a4z32ldCaopL1KZ/JEoBtfCwsT4a FEetZTx7b3DSELeW0IUesJDzS/yXz6hmWepL35COKYBT09E3eJbY8DZeLBsuoqn9r1vY DnkdR1QIk+g/ylgfInYnegkd/x7aMbvYjJjBQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=iIsgClsOA1SvNkTxqN18sV110t3uo1lBSBp/i2h/U9Y7QQAEXIUXY0xLaDMVSeuHhH FZrD04xEklIEIsfEsLt8kUf8RrVko0M6H8krpnEoBL6D13+t6Ukz1arHkGtsOmqaHsqA JGMXknpsiOnRBVFYztztj5nEPomOLEioQpGqY= Received: by 10.216.68.85 with SMTP id k63mr586123wed.50.1300736897031; Mon, 21 Mar 2011 12:48:17 -0700 (PDT) Received: from [192.168.0.197] ([95.60.213.7]) by mx.google.com with ESMTPS id d54sm2682608wej.10.2011.03.21.12.48.15 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Mar 2011 12:48:16 -0700 (PDT) From: Joel Reymont Content-Type: text/plain; charset=us-ascii Date: Mon, 21 Mar 2011 19:48:13 +0000 Message-Id: <74CC64A7-C7B9-48F4-9638-BD1974AEAA92@gmail.com> To: caml-list@inria.fr Mime-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p2LJmYDa015686 Subject: [Caml-list] thrift and ocamlbuild I'm trying to use Apache Thrift with ocamlbuild (oasis actually). >From a single Foo.thrift, Thrift generates Foo_consts.ml, Foo_types.mli and Foo_types.ml. How do I add a rule for this to ocamlbuild? I tried the following but it doesn't work since ~prod wants a string. Thanks, Joel --- open Ocamlbuild_plugin;; open Command;; let thrift = A"thrift";; rule "thrift: %.thrift -> %_types.ml" ~prod:["%.ml";"%_consts.ml";"%_types.ml";"%_types.mli"] ~deps:["%.thrift"] begin fun env build -> Cmd(S[thrift; A"-gen ocaml"; P(env "%.thrift")]) end ;; -------------------------------------------------------------------------- - for hire: mac osx device driver ninja, kernel extensions and usb drivers ---------------------+------------+--------------------------------------- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont ---------------------+------------+---------------------------------------