From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 3A15CBB81 for ; Tue, 6 Dec 2005 22:34:16 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jB6LYFKu012428 for ; Tue, 6 Dec 2005 22:34:15 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA17273 for ; Tue, 6 Dec 2005 22:34:15 +0100 (MET) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jB6LYEZm012422; Tue, 6 Dec 2005 22:34:14 +0100 Received: from frontend1.internal (mysql-sessions.internal [10.202.2.149]) by frontend1.messagingengine.com (Postfix) with ESMTP id D3844D1DF88; Tue, 6 Dec 2005 16:34:11 -0500 (EST) Received: from frontend2.messagingengine.com ([10.202.2.151]) by frontend1.internal (MEProxy); Tue, 06 Dec 2005 16:34:11 -0500 X-Sasl-enc: oZJi/f9870JJ/kYgYmt/b9mPe056OtK00yBtFqXwX8P9 1133904850 Received: from munge (burnham.ljcrf.edu [192.231.106.2]) by frontend2.messagingengine.com (Postfix) with ESMTP id 9C37257145C; Tue, 6 Dec 2005 16:34:09 -0500 (EST) Date: Tue, 6 Dec 2005 13:33:51 -0800 (PST) From: Martin Jambon X-X-Sender: martin@munge To: Gerd Stolpmann Cc: Alain Frisch , Martin Jambon , caml-list@inria.fr Subject: Re: [Caml-list] ocamlfind + ocamldep + camlp4? In-Reply-To: <1133856603.5990.48.camel@localhost.localdomain> Message-ID: References: <1133856603.5990.48.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at nez-perce with ID 439603D7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 439603D6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamlfind:01 ocamldep:01 camlp:01 gerd:01 stolpmann:01 ocamlfind:01 camlp:01 dependencies:01 ocamlc:01 -package:01 ocamldep:01 preprocess:01 syntax:01 dependencies:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 On Tue, 6 Dec 2005, Gerd Stolpmann wrote: > Am Montag, den 05.12.2005, 14:08 -0800 schrieb Martin Jambon: >> Hello, >> >> I would like to know if there is a way of using ocamlfind as front-end to >> camlp4o alone. Let me explain: the following works nicely since it will >> locate the pa_someext package and load its dependencies: >> >> ocamlfind ocamlc -c -syntax camlp4o -package pa_someext file.ml >> >> but how to tell ocamldep to preprocess file.ml using camlp4o and the >> wanted syntax modules, without listing all the include directories and >> dependencies? > > Why not > > ocamlfind ocamldep -syntax camlp4o -package pa_someext *.ml > > ? > > You can also get the options for camlp4o using: > > P4_PKG = "pa_someext" > P4_I_OPTIONS = $(shell ocamlfind query -predicates "syntax,preprocessor,camlp4o" \ > $(P4_PKG) -i-format) > P4_A_OPTIONS = $(shell ocamlfind query -predicates "syntax,preprocessor,camlp4o" \ > $(P4_PKG) -a-format) > > then > > camlp4 $(P4_I_OPTIONS) $(P4_A_OPTIONS) > > should work. Thanks a lot Gerd (and Alain). I was really looking for a simple way of performing source-to-source conversion of OCaml code, from the command-line. So that really helps, and I derived a shell-script which provides such a command: http://martin.jambon.free.fr/camlp4find Martin -- Martin Jambon, PhD http://martin.jambon.free.fr Store and share your bioinformatics tips at http://wikiomics.org