caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [OASIS help] Run an executable during build with ocamlbuild
@ 2016-04-26 12:34 Christoph Höger
  0 siblings, 0 replies; only message in thread
From: Christoph Höger @ 2016-04-26 12:34 UTC (permalink / raw)
  To: caml users

Dear all,

in one of my projects, the compiler shall be used to generate a module
required in order to run the integration tests. I _could_ tweak a ppx
preprocessor to run that compiler by passing the correct arguments.
However, oasis won't set the corresponding variable:

Executable "ppx_mcl"
  Path:      ppx_src
  ...

Executable "mcl_tests"
  ...
  NativeOpt: -ppx ppx_src/ppx_mcl.native


Ideally, I would write:

  NativeOpt: -ppx $ppx_mcl

but that gives:
Failure: No variable ppx_mcl defined when trying to expand "${ppx_mcl}"

Why is that?

So another idea is to directly create ocamlbuild rules. I have these
rules in another project where they work fine. But there they assume
that the compiler is in PATH. This is clearly not the case in the test
environment, so how do I access the path of an oasis executable during
the build?

thanks,

Christoph
-- 
Christoph Höger

Technische Universität Berlin
Fakultät IV - Elektrotechnik und Informatik
Übersetzerbau und Programmiersprachen

Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin

Tel.: +49 (30) 314-24890
E-Mail: christoph.hoeger@tu-berlin.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-26 12:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26 12:34 [Caml-list] [OASIS help] Run an executable during build with ocamlbuild Christoph Höger

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