caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: Paolo Donadeo <p.donadeo@gmail.com>
Cc: caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Using findlib and a syntax extension with ocamlbuild
Date: Fri, 23 Nov 2007 13:04:06 +0100	[thread overview]
Message-ID: <1195819440-sup-4781@ausone.inria.fr> (raw)
In-Reply-To: <4b5157c30711211521g38a5d7bbg204e1283b975f38@mail.gmail.com>

Excerpts from Paolo Donadeo's message of Thu Nov 22 00:21:43 +0100 2007:
> I'm fighting again with ocamlbuild. In the (excellent!) wiki I found
> two useful recipes: how to use findlib with ocamlbuild and how to
> compile source code using a syntax extension. Now it happens that I
> have both these needs, and I'm not so sure how to mix the ingredients
> and obtain a good dish.
> 
> At the moment the solution I have discovered (by trial and error)
> works well, but it doesn't seem very clean.
> 
> The involved files in my source directory are these:
> 
> ./xnuncc.ml
> ./myocamlbuild.ml
> ./ext_libs/openin-20070524/pa_openin.ml
> ./_tags
> 
> In xnuncc.ml I use the openin extension, and xnuncc.ml is the main
> compilation unit.
> 
> Here is the contents of _tags and the plugin for ocamlbuild:
> 
> ======= 8< CUT HERE: _tags >8 =======
> <dom> or <files> or <fragment_composer> or <test> or <doc> : include
> <ext_libs/openin-20070524> : include
> true : dtypes
> <**/pa_openin.ml> : camlp4of, use_camlp4of
> "xnuncc.ml" : camlp4o, use_openin
> ======= 8< END HERE: _tags >8 =======

<dom> (and many others) can be rewritten "dom" since it's constant.

[...]

> If I use "pa_openin.cmo", indeed, the result is an absurd (for me)
> error message starting with:
> 

[...]

In  a  "dep"  declaration  include  directories  are  not taken in account for
building pathnames.

> At the end of the story the question is: is this solution the best
> possible for compiling a project with findlib and a syntax extension
> present in a subdir of the project?

Not  yet  (you  can  still  factorise  the "ext_libs/openin-20070524" and even
compute it, since the plugin language is OCaml).

-- 
Nicolas Pouillard aka Ertai


  reply	other threads:[~2007-11-23 12:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-21 23:21 Paolo Donadeo
2007-11-23 12:04 ` Nicolas Pouillard [this message]
2007-11-23 14:27   ` [Caml-list] " Paolo Donadeo

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=1195819440-sup-4781@ausone.inria.fr \
    --to=nicolas.pouillard@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=p.donadeo@gmail.com \
    /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).