From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p2LKInCw016774 for ; Mon, 21 Mar 2011 21:18:49 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmYDABpPh01KfVI0imdsb2JhbACYPIx7CBQBAQEKCQ0HEgYhqC6KQoIfhSkviFsBAQMFhV4EjGaDUXKEPDo X-IronPort-AV: E=Sophos;i="4.63,221,1299452400"; d="scan'208";a="78802834" Received: from mail-ww0-f52.google.com ([74.125.82.52]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 21 Mar 2011 21:18:44 +0100 Received: by mail-ww0-f52.google.com with SMTP id 40so8416796wwj.9 for ; Mon, 21 Mar 2011 13:18:44 -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=f2PrAUdt4xLMrs8Dc285mIL2KeQU2klpLvLhraPbCgU=; b=bQKSS9CQRxk9I89KE4xphaJXDVX9ou76SMij7uUwgdu2YVol2BP2LPc1rMGc8kZRkc PvUy3flHtGap+bm2ANxRUlgPDnYIGcczOd7D6Jp1+rGszcUNomwZas3AGBjhywN9A7XR F6tmEkwgxv0RDPiq6dkg7l6uIrmIsQIHVDN6c= 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=s9ZLICkRzKKfP/LfHxkGn7Fd3SEXXOpvi3dyt0KXXw1sXTZR1jmqUQQ+f+DlxdwW93 DGnvcR1ksIo0CZOFIboClUH7W3ddDsUk1ovSHaNvRsA/nVOq3Ecyy8GYnMpetWEGNGHA 7FB+//t/VHRxTsWk60n2LcGhPY8exv6v1mnYU= Received: by 10.216.120.129 with SMTP id p1mr4700329weh.81.1300738676031; Mon, 21 Mar 2011 13:17:56 -0700 (PDT) Received: from [192.168.0.197] ([95.60.213.7]) by mx.google.com with ESMTPS id l5sm2687079wej.32.2011.03.21.13.17.54 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Mar 2011 13:17:55 -0700 (PDT) From: Joel Reymont Content-Type: text/plain; charset=us-ascii Date: Mon, 21 Mar 2011 20:17:52 +0000 Message-Id: <8304C39B-0086-44A8-A49F-7A7539E9295C@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 p2LKInCw016774 Subject: [Caml-list] oasis and thrift I'm trying to use Apache Thrift with Oasis. Suppose I have a project directory structure that looks like this: protocol\ message1.thrift message2.thrift ... ocaml\ project1 project2 ... OCaml projects use Oasis and automatically generate *.ml from *.thrift using a custom rule in ocamlbuild, e.g. open Ocamlbuild_plugin;; open Command;; let thrift = A"thrift";; rule "thrift: %.thrift -> %_types.ml" ~prods:["%.ml";"%_consts.ml";"%_types.ml";"%_types.mli"] ~deps:["%.thrift"] begin fun env build -> Cmd(S[thrift; A"-gen"; A"ocaml"; P(env "%.thrift")]) end ;; I'm skipping the issue of parsing dependencies by looking at Thrift "include" directives for now but do want to define path to protocol in the Oasis file for each project. This is so that I can pass -I to thrift above. How can this be done with Oasis? Thanks, Joel -------------------------------------------------------------------------- - for hire: mac osx device driver ninja, kernel extensions and usb drivers ---------------------+------------+--------------------------------------- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont ---------------------+------------+---------------------------------------