Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Magnus Therning <magnus@therning.org>
To: caml-list@inria.fr
Subject: [Caml-list] oasis: building in separate folder
Date: Thu, 17 Sep 2015 12:57:13 +0200	[thread overview]
Message-ID: <20150917105713.GD2033@sobel.cipherstone.com> (raw)

I was trying to get oasis to build in a completely different folder from
the source but ran into a problem.

Here's what I have:

~~~ _oasis
OASISFormat : 0.4
Name : OasisTest
Version : 0.0
Synopsis : TBD
Authors : Magnus Therning
Copyrights : (C) 2015 TBD
License : PROP

Executable test
  Path : src/
  MainIs : main.ml
  CompiledObject : best
  BuildTools : ocamlbuild
  BuildDepends : oasis
~~~

~~~ src/main.ml
(* Minimal example to try out oasis out-of-source build *)

let () =
    print_string "Hello, World!\n"
~~~

I can build the executable using these steps:

    % oasis setup
    % ocaml setup.ml -configure
    % ocaml setup.ml -build

However this generates quite a bit of stuff in the folder.  Stuff that I
don't really want there at all, so I attempted building in a separate
folder:

    % mkdir my_build_folder; cd my_build_folder
    % oasis setup -oasis ../_oasis
    % ocaml setup.ml -configure
    % ocaml setup.ml -build

I then get this when building:

~~~
Finished, 1 target (0 cached) in 00:00:00.
Solver failed:
  Ocamlbuild knows of no rules that apply to a target named src/main.mly. This can happen if you ask Ocamlbuild to build a target with the wrong extension (e.g. .opt instead of .native) or if the source files live in directories that have not been specified as include directories.
Compilation unsuccessful after building 0 targets (0 cached) in 00:00:00.
E: Failure("Command ''/usr/bin/ocamlbuild' src/main.native -tag debug' terminated with error code 6")
~~~

Is there some way to make this work?
Should it work?  (That is, is it a bug that it doesn't?)

/M

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: magnus@therning.org   jabber: magnus@therning.org
twitter: magthe               http://therning.org/magnus

The British have "the perfect temperament to be hackers--technically
skilled, slightly disrespectful of authority, and just a touch of
criminal behavior".
     -- Mary Ann Davidson, Oracle's Security Chief

                 reply	other threads:[~2015-09-17 10:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20150917105713.GD2033@sobel.cipherstone.com \
    --to=magnus@therning.org \
    --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