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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 77D1ABB81 for ; Tue, 6 Dec 2005 09:10:07 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jB68A6Fo002538 for ; Tue, 6 Dec 2005 09:10:07 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA02694 for ; Tue, 6 Dec 2005 09:10:06 +0100 (MET) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.190]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jB68A5vu002535 for ; Tue, 6 Dec 2005 09:10:06 +0100 Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1EjXtk-0001W6-00; Tue, 06 Dec 2005 09:10:04 +0100 Received: from [84.58.146.3] (helo=gate.lan.gerd-stolpmann.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1EjXtk-0000u3-00; Tue, 06 Dec 2005 09:10:04 +0100 Received: from flakew.lan.gerd-stolpmann.de (flakew.lan.gerd-stolpmann.de [192.168.0.32]) by gate.lan.gerd-stolpmann.de (Postfix) with ESMTP id F37A0C097; Tue, 6 Dec 2005 09:10:03 +0100 (CET) Subject: Re: [Caml-list] ocamlfind + ocamldep + camlp4? From: Gerd Stolpmann To: Martin Jambon Cc: caml-list@inria.fr In-Reply-To: References: Content-Type: text/plain Date: Tue, 06 Dec 2005 09:10:03 +0100 Message-Id: <1133856603.5990.48.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:a6865a839c0178d9aa0ce41878507ea2 X-Miltered: at concorde with ID 4395475E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4395475D.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.0 required=5.0 tests=none autolearn=disabled version=3.0.3 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. Gerd > > OCamlMakefile solves this by reading the first line of the OCaml files. > That works, but ocamlfind doesn't help here, so all directories of the > camlp4 extensions (direct + dependent) must be specified, which is > impractical. That would be something like: > (*pp ./pp-command *) > > where pp-command would be: > #!/bin/sh > camlp4o > -I /path/to/lib1 lib1.cma \ > -I /path/to/lib2 lib2.cma \ > -I /path/to/pa_someext pa_someext.cmo $* > > where lib1 and lib2 are required by pa_someext. > > Instead, it would be nice to write only: > > (*pp ocamlfind camlp4o -package pa_someext *) > > > Thanks, > > Martin > > -- > Martin Jambon, PhD > http://martin.jambon.free.fr > > Store and share your bioinformatics tips at http://wikiomics.org > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Telefon: 06151/153855 Telefax: 06151/997714 ------------------------------------------------------------