caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Forcing OCamlbuild to compile a file before another
@ 2015-01-23 15:08 Dario Teixeira
  2015-01-23 16:41 ` Francois Pottier
  0 siblings, 1 reply; 17+ messages in thread
From: Dario Teixeira @ 2015-01-23 15:08 UTC (permalink / raw)
  To: caml-list

Hi,

How does one force OCamlbuild to compile a file before another
when it cannot automatically infer their dependency?

For instance, compilation fails because OCamlbuild tries to compile
lambwiki_parser.mly before lambwiki.ml. To get around it, I added
the following to the "After_rules" of my dispatcher:

dep ["menhir"; "file:lambwiki_parser.mly"] ["lambwiki.cmo"]

My assumption was that this told OCamlbuild that using Menhir to
compile file lambwiki_parser.mly added an explicit dependency
on lambwiki.cmo (which in turn can be obtained by compiling
lambwiki.ml).  This doesn't work, however, so perhaps my
mental model of how OCamlbuild works is not correct.

Any ideas on how to get this to work as intended?

Thanks in advance for your attention!
Best regards,
Dario Teixeira


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-02-15 14:42 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23 15:08 [Caml-list] Forcing OCamlbuild to compile a file before another 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
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

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).