caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] oasis: building in separate folder
@ 2015-09-17 10:57 Magnus Therning
  0 siblings, 0 replies; only message in thread
From: Magnus Therning @ 2015-09-17 10:57 UTC (permalink / raw)
  To: caml-list

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

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

only message in thread, other threads:[~2015-09-17 10:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-17 10:57 [Caml-list] oasis: building in separate folder Magnus Therning

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