caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Paul Argentoff <argentoff@rtelekom.ru>
To: Gerd Stolpmann <gerd@gerd-stolpmann.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] yet another silly question on PXP
Date: Fri, 25 Feb 2005 10:35:40 +0300	[thread overview]
Message-ID: <863bvl9jn7.fsf@paul.rtelekom.ru> (raw)
In-Reply-To: <86hdk29mze.fsf@paul.rtelekom.ru> (Paul Argentoff's message of "Thu, 24 Feb 2005 15:11:17 +0300")

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


  reply	other threads:[~2005-02-25  7:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-22 17:07 Paul Argentoff
2005-02-22 17:34 ` [Caml-list] " Jerome Simeon
2005-02-22 18:25 ` Paul Argentoff
2005-02-22 19:03   ` Gerd Stolpmann
2005-02-24  7:49     ` Paul Argentoff
2005-02-24 12:11     ` Paul Argentoff
2005-02-25  7:35       ` Paul Argentoff [this message]
2005-02-25 16:14     ` :pxp_evpull notation (was: yet another silly question on PXP) Paul Argentoff
2005-02-27 19:05       ` Gerd Stolpmann
2005-02-28 10:24         ` :pxp_evpull notation Paul Argentoff
2005-02-28 10:39           ` Gerd Stolpmann
2005-02-28 11:00             ` Paul Argentoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=863bvl9jn7.fsf@paul.rtelekom.ru \
    --to=argentoff@rtelekom.ru \
    --cc=caml-list@inria.fr \
    --cc=gerd@gerd-stolpmann.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).