caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jordan W <jordojw@gmail.com>
To: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: [Caml-list] A way to have certain file suffixes treated as .ml/.mli with ocamlbuild.
Date: Sun, 2 Aug 2015 12:45:44 -0700	[thread overview]
Message-ID: <CAPOA5_6GUaMeNP0ic5KB0vF9v6hRe-=htppkks_ytyHQBeSOqw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 872 bytes --]

Hello,

Is there a way to have certain files, with particular suffixes, treated as
.ml/.mli respectively with ocamlbuild? I understand that ocaml compiler
itself supports -intf/-impl/-intf-suffix, but it's not clear that
ocamlbuild will allow use of these.

Specifically, here is how all of the ocamlc/ocamldep/* suite of commands
should be effected by the file extension:

*/*.xyz

ocamlc/ocamldep  -pp convertXyzProgram -impl theFile.xyz -intf-suffix xyzi

*/*.xyzi

ocamlc/ocamldep -pp convertXyzProgram -intf theFile.xyzi


Is there a way to do this with _tags or possibly resorting to a
myocamlbuild.ml? I would be satisfied with a myocamlbuild rule that *moves*
the .xyz to a .ml, but in that case errors are reported in terms of the
generated .ml and not the original .xyz, which is unfortunate. I know the
ocaml compler supports this, but does ocamlbuild?

Jordan

[-- Attachment #2: Type: text/html, Size: 1133 bytes --]

             reply	other threads:[~2015-08-02 19:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-02 19:45 Jordan W [this message]
2015-08-02 20:31 ` Gabriel Scherer

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='CAPOA5_6GUaMeNP0ic5KB0vF9v6hRe-=htppkks_ytyHQBeSOqw@mail.gmail.com' \
    --to=jordojw@gmail.com \
    --cc=caml-list@inria.fr \
    /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).