From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 6F655BC75 for ; Fri, 25 Feb 2005 08:35:58 +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 j1P7Zvv8010715 for ; Fri, 25 Feb 2005 08:35:58 +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 IAA07546 for ; Fri, 25 Feb 2005 08:35:57 +0100 (MET) Received: from paul.rtelekom.ru (paul.rtelekom.ru [217.146.42.160]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j1P7Zhqk016856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 25 Feb 2005 08:35:57 +0100 Received: from paul.rtelekom.ru (paul@localhost [127.0.0.1]) by paul.rtelekom.ru (8.13.1/8.13.1) with ESMTP id j1P7ZfWT058313; Fri, 25 Feb 2005 10:35:41 +0300 (MSK) (envelope-from argentoff@rtelekom.ru) Received: (from paul@localhost) by paul.rtelekom.ru (8.13.1/8.13.1/Submit) id j1P7Zf1T058312; Fri, 25 Feb 2005 10:35:41 +0300 (MSK) (envelope-from argentoff@rtelekom.ru) X-Authentication-Warning: paul.rtelekom.ru: paul set sender to argentoff@rtelekom.ru using -f X-Comment-To: Paul Argentoff To: Gerd Stolpmann Cc: caml-list@inria.fr Subject: Re: [Caml-list] yet another silly question on PXP References: <86bracttfd.fsf@paul.rtelekom.ru> <86d5uspi3a.fsf@paul.rtelekom.ru> <1109099029.5947.0.camel@localhost.localdomain> <86hdk29mze.fsf@paul.rtelekom.ru> From: Paul Argentoff Date: Fri, 25 Feb 2005 10:35:40 +0300 In-Reply-To: <86hdk29mze.fsf@paul.rtelekom.ru> (Paul Argentoff's message of "Thu, 24 Feb 2005 15:11:17 +0300") Message-ID: <863bvl9jn7.fsf@paul.rtelekom.ru> User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Corporate Culture) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at nez-perce with ID 421ED55E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 pxp:01 preprocessed:01 makefile:01 makefile:01 netclient:01 netstring:01 pcre:01 pcre:01 netstring:01 pxp:01 ocamlfind:01 ocamlfind:01 ocamlc:01 -where:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: Dear Paul Argentoff, Let PA = "Paul Argentoff" in written_by PA => PA> But I can't compile it with OCamlMakeFile. Is there any way to do PA> that? Here's the workaround I found: In the first line of preprocessed file I write (*pp sh pp.sh *) -- that's OCamlMakefile standard except that I use as a preprocesssor a custom sh script which is generated from within Makefile as a .PHONY target. Here's an example of my Makefile fragment: PACKS= zip \ equeue \ netclient \ pxp-engine \ pxp-ulex-utf8 \ pxp-pp \ annexlib \ postgresql \ dbi PPPACKS= netstring \ pcre USE_CAMLP4 = yes PPLIBS = unix.cma \ pcre.cma \ netstring.cma \ pxp_pp.cma PRE_TARGETS = pp.sh .PHONY: pp.sh pp.sh: echo -n "camlp4o" >pp.sh $(foreach pack, ${PACKS}, echo -n " -I `ocamlfind query ${pack}`" >>pp.sh;) \ $(foreach pack, ${PPPACKS}, echo -n " -I `ocamlfind query ${pack}`" >>pp.sh;) \ echo -n " -I `ocamlc -where`" >>pp.sh $(foreach lib, ${PPLIBS}, echo -n " ${lib}" >>pp.sh;) \ echo -n " "$$\1 >>pp.sh The latter part may not seem that elegant, but it's what I could do at last last night after reading those gnu make manuals... -- Yours truly, WBR, Paul Argentoff. Jabber: paul@jabber.rtelekom.ru RIPE: PA1291-RIPE