caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Magnus Therning <magnus@therning.org>
To: Gabriel Scherer <gabriel.scherer@gmail.com>
Cc: Anil Madhavapeddy <anil@recoil.org>,
	OCaml List <caml-list@yquem.inria.fr>,
	Sylvain Le Gall <sylvain@le-gall.net>
Subject: Re: [Caml-list] oasis building out-of-src and camlp4
Date: Wed, 23 Sep 2015 10:54:05 +0200	[thread overview]
Message-ID: <20150923085405.GG22004@sobel.cipherstone.com> (raw)
In-Reply-To: <CAPFanBF6g9K9XcdQ92P+0PUnu8bQgn=OELdTnn++X4zz+p-4yw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1873 bytes --]

On Wed, Sep 23, 2015 at 10:38:31AM +0200, Gabriel Scherer wrote:
> Thanks for the reproducible information. I just tried and could
> reproduce the issue.
> 
> The problem comes from the fact that, with the command-line invocation
> you use oasis generates the build description files (_tags,
> myocamlbuild.ml, setup.data) in the build directory, not in the source
> directory, but ocamlbuild when invoked (from the source directory)
> will look for them in the source directory. In particular, I could
> "fix" the build by doing

Indeed, the goal is to not contaminate the source directory *at all*.

>   ...
>   ocaml setup.ml -C $PWD/../oasis-camlp4 -configure
>   for f in {myocamlbuild.ml,_tags,setup.data}; do ln -s $PWD/$f
> ../oasis-camlp4; done
>   ocaml setup.ml -C $PWD/../oasis-camlp4 -build -build-dir $PWD/build
> 
> It looks like oasis's behavior with "-C $DIR -configure" is
> problematic: it should generate its files in $DIR -- except maybe
> setup.ml, or then people would have to run (ocaml $DIR/setup.ml -C
> $DIR ...).

I've been playing around a bit with the various combinations of where I
run `ocaml <path>/setup.ml` and `-C`. Since the steps work on "simple"
code, but doesn't on code using `camlp4` I'm leaning towards calling
this a bug.

> TL;DR: this appear to be an oasis issue, rather than a issue with
> CMake or ocamlbuild.

Yes, I'm guessing it's an issue in the code generated by `oasis` and how
it uses `ocamlbuild` and other build tools.

/M

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

The man who is denied the opportunity of taking decisions of
importance begins to regard as important the decisions he is allowed
to take.
     -- C Northcote Parkinson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 163 bytes --]

  reply	other threads:[~2015-09-23  8:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 21:12 Magnus Therning
2015-09-23  7:48 ` Anil Madhavapeddy
2015-09-23  8:19   ` Magnus Therning
2015-09-23  8:38     ` Gabriel Scherer
2015-09-23  8:54       ` Magnus Therning [this message]
2015-09-23  9:19         ` Gabriel Scherer
2015-09-23  9:44           ` Magnus Therning
2015-09-29 22:59             ` Sylvain Le Gall
2015-09-30 11:49               ` Magnus Therning
2015-10-01  6:46                 ` Sylvain Le Gall
2015-10-01  7:23                   ` Magnus Therning
2015-10-02  9:32                     ` Sylvain Le Gall
2015-10-02  9:38                       ` Magnus Therning
2015-09-23  7:56 ` Anil Madhavapeddy

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=20150923085405.GG22004@sobel.cipherstone.com \
    --to=magnus@therning.org \
    --cc=anil@recoil.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=gabriel.scherer@gmail.com \
    --cc=sylvain@le-gall.net \
    /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).