caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dario Teixeira <dario.teixeira@nleyten.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Forcing OCamlbuild to compile a file before another
Date: Fri, 06 Feb 2015 17:01:04 +0000	[thread overview]
Message-ID: <5f5c603d077133e065b82db1eed43935@nleyten.com> (raw)
In-Reply-To: <CAPFanBGOon1tLO3Rg8P+vwbiGCuaeDErQL8jvLkg41xjxX9LUw@mail.gmail.com>

Hi,

Still on the subject of getting module aliases and -no-alias-deps to 
work
with OASIS and OCamlbuild: I've created a repo on Github for Libfoobar 
[1],
the dummy example I've been using to test and play with this problem.

As you can see, I've opted to postprocess the output of OCamldep outside
the OCamlbuild plugin.  Essentially, I set the Options.ocamldep to call
myocamldep.ml, an OCaml script that serves as frontend to OCamldep and
does the actual postprocessing.

Note that there is project-specific knowledge in myocamldep.ml: there is 
a
dictionary 'dict' mapping between the module alias files (foo.ml and 
bar.ml)
and the aliases declared in each one.  This is the same information that
should be contained in an mlalias file.  In addition, the script makes 
some
assumptions regarding the naming of modules.  Though obviously this 
solution
is far from optimal, this being just a stop-gap measure it will do for 
now.

I've come across a snag which puts some doubt on the hope that this 
could
all be implementable without touching OCamldep itself.  Consider the 
Bar_a
module.  It should depend on Bar, Foo, and Foo_a.  However, OCamldep 
reports
its dependencies as only Bar and Foo.  The missing dependency on Foo.A 
is not
considered, which of course makes sense, but it's not what I was hoping 
for!

Kind regards,
Dario Teixeira

[1] https://github.com/darioteixeira/libfoobar


  reply	other threads:[~2015-02-06 17:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 15:08 Dario Teixeira
2015-01-23 16:41 ` Francois Pottier
2015-01-23 19:09   ` Dario Teixeira
2015-01-24 12:56     ` Gabriel Scherer
2015-01-25 18:16       ` Dario Teixeira
2015-01-26 12:30         ` Dario Teixeira
2015-02-03 21:13           ` Gabriel Scherer
2015-02-04 13:18             ` Dario Teixeira
2015-02-04 14:52               ` Gabriel Scherer
2015-02-04 16:15                 ` Dario Teixeira
2015-02-04 16:44                   ` Gabriel Scherer
2015-02-06 17:01                     ` Dario Teixeira [this message]
2015-02-06 17:05                       ` Gabriel Scherer
2015-02-06 18:58                         ` Dario Teixeira
2015-02-15 10:41                           ` Gabriel Scherer
2015-02-15 13:55                             ` Dario Teixeira
2015-02-15 14:42                               ` 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=5f5c603d077133e065b82db1eed43935@nleyten.com \
    --to=dario.teixeira@nleyten.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).