From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id ADEB97EEFD for ; Thu, 1 Oct 2015 09:23:49 +0200 (CEST) IronPort-PHdr: 9a23:offfrBUlaX9wciJcOHO0X6c2R3vV8LGtZVwlr6E/grcLSJyIuqrYZhyFt8tkgFKBZ4jH8fUM07OQ6PC8HzJZqs/b6DgrS99laVwssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk2sfTR8Kum9IIPOlcP/j7n0oM2PJVsRz2PnOftbF1afk0b4joEum4xsK6I8mFPig0BjXKBo/15uPk+ZhB3m5829r9ZJ+iVUvO89pYYbCf2pN4xxd7FTDSwnPmYp/4Wr8ECbFUrcrkcbB14HlgRBAg6NyByycZ71tmOurft5xiCbO+XyQPU7UDCmqaFmVEm7pj0AMmsc+W7Rl9c4sKJWuhSgoRM3l4vdb4eIL9Jifq7He9IcSixGRMkHBH8JOZ+1c4ZaV7lJBu1ftYSo4gJW9RY= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=magnus@therning.org; spf=None smtp.mailfrom=magnus@therning.org; spf=None smtp.helo=postmaster@mail-wi0-f182.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of magnus@therning.org) identity=pra; client-ip=209.85.212.182; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="magnus@therning.org"; x-sender="magnus@therning.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of magnus@therning.org) identity=mailfrom; client-ip=209.85.212.182; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="magnus@therning.org"; x-sender="magnus@therning.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f182.google.com) identity=helo; client-ip=209.85.212.182; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="magnus@therning.org"; x-sender="postmaster@mail-wi0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CGAADm3gxWm7bUVdFEGoN7aAa9bAENgX2CQYM2AoEuOBQBAQEBAQEBARABAQEBAQYLCwkhLoIdgggBAQQSFVIQCxgJJQ8FIAEFASITGweIDAQBAwU7qGSBMD4xoBUBAQEBAQEBAQEBAQEBAQEBAQEaCotnhCoRAVEHgxiBFAWVeYUWh3gGUn5Gg3CCcIoYchaDToIjNYEXHwEBglMWB4FWbwGIN4FAAQEB X-IPAS-Result: A0CGAADm3gxWm7bUVdFEGoN7aAa9bAENgX2CQYM2AoEuOBQBAQEBAQEBARABAQEBAQYLCwkhLoIdgggBAQQSFVIQCxgJJQ8FIAEFASITGweIDAQBAwU7qGSBMD4xoBUBAQEBAQEBAQEBAQEBAQEBAQEaCotnhCoRAVEHgxiBFAWVeYUWh3gGUn5Gg3CCcIoYchaDToIjNYEXHwEBglMWB4FWbwGIN4FAAQEB X-IronPort-AV: E=Sophos;i="5.17,616,1437429600"; d="asc'?scan'208";a="180354120" Received: from mail-wi0-f182.google.com ([209.85.212.182]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 01 Oct 2015 09:23:48 +0200 Received: by wicfx3 with SMTP id fx3so14777055wic.0 for ; Thu, 01 Oct 2015 00:23:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=YRuW4Geo3AQqEKfakcndXRZmzfyJcGGbccW26YYP1p4=; b=BZ/ZCmaDsj7WgaDhx33GL+1hZ71VGAmENG8EKBl7cZkgXlDiySj1PVIyPfSObznu/G Bav8nE7MjUCuSkfEpQgaZNENIGhaSNg7v3lplK00HEZ3seI5HPjovlmT1kb6mXfH1Y3s 3SYgt+GxbqBBAEMAUVec/nOCHHUy9ng+7Ta3oWhy9gr1RFePPfJd8dk08mu56ZCs68DL /TgMvsLljhbspCkbVFangAA4iqNPoqjCDcZeQRkYCxHS+xCGIYGmRNAiSPBwirjbWWuG qqm7DoP+LdZSXveHT8g8FgxQFNCTO29OODbRXHHsE0iDb7VdOmXuRnEoEPABoCdIpwIi EH0g== X-Gm-Message-State: ALoCoQkVio66yD5WwRPuI3hnBCsJR9O79pjdmCqpIUv9co+MHr3/B+yWl1qkOX11cLVSnGISIb0E X-Received: by 10.194.121.232 with SMTP id ln8mr10373070wjb.76.1443684228651; Thu, 01 Oct 2015 00:23:48 -0700 (PDT) Received: from sobel.cipherstone.com (pc-132.aktiviteten.se. [194.218.229.132]) by smtp.gmail.com with ESMTPSA id lj12sm1659269wic.0.2015.10.01.00.23.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Oct 2015 00:23:47 -0700 (PDT) Date: Thu, 1 Oct 2015 09:23:45 +0200 From: Magnus Therning To: Sylvain Le Gall Cc: Gabriel Scherer , Anil Madhavapeddy , OCaml List Message-ID: <20151001072345.GA9809@sobel.cipherstone.com> References: <20150922211237.GA22711@tatooine> <20150923081916.GE22004@sobel.cipherstone.com> <20150923085405.GG22004@sobel.cipherstone.com> <20150923094414.GB25229@sobel.cipherstone.com> <20150930114947.GA21728@sobel.cipherstone.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [Caml-list] oasis building out-of-src and camlp4 --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 01, 2015 at 06:46:55AM +0000, Sylvain Le Gall wrote: > Hello, >=20 > Le mer. 30 sept. 2015 =E0 13:49, Magnus Therning a > =E9crit : >=20 > > On Tue, Sep 29, 2015 at 10:59:49PM +0000, Sylvain Le Gall wrote: > > > Please consider adding more comments to the following bug, which seems > > > close to what you are discussing: > > > > > > > > https://forge.ocamlcore.org/tracker/index.php?func=3Ddetail&aid=3D1473&= group_id=3D54&atid=3D291 > > > > > > I must admit that I totally miss the whole point of the discussion, > > > probably if you can make a summary of what you precisely need in the > > > BTS, I will be able to understand the problem better. > > > > Unfortunately I don't know enough about `oasis` to understand that bug > > report :( > > > > I'll try to explain how I'd like to use oasis/buildtool by looking how > > Haskell's Cabal lets me do it: > > > > - Configure without generating anything in the current dir: > > > > % runhaskell Setup.hs --builddir /tmp/my_build_dir > > > > - Build using the just generated configuration, again without putting > > anything in the current dir: > > > > % runhaskell Setup.hs --builddir /tmp/my_build_dir > > > > Comparing this to oasis/buildtool (assuming I've a pre-existing > > `setup.ml` generated with `oasis setup -setup-update dynamic` to > > minimize the amount of build-related stuff in the project): > > > > - Configure > > > > % ocaml setup.ml -configure > > > > This generates a file, `setup.data` in the current dir. I've found no > > way to have it generated in a dedicated build dir. > > > > - Build > > > > % ocaml setup.ml -build -build-dir /tmp/my_build_dir -no-links > > > > This builds in the mentioned dir, but it also generates a `setup.log` > > in the current dir! > > > > I thought that `-C` could offer a way to achieve this, but it doesn't: > > > > % mkdir /tmp/my_build_dir; cd /tmp/my_build_dir > > % ocaml /path/to/setup.ml -h > > Exception: Sys_error "_oasis: No such file or directory". > > File "/path/to/setup.ml", line 1: > > Error: Reference to undefined global `OASISDynRun' > > > > I'm not convinced `-C` *should* be the way to achieve what I want. > > > > Hopefully this makes it clearer what I mean. > > > > > First, why not just copy everything in the new directory: > % cp -R . /tmp/my_build_dir; cd /tmp/my_build_dir > % ocaml setup.ml -configure > % ocaml setup.ml -build >=20 > Maybe I miss some context to understand why this simple solution is not > enough. >=20 > Going back at the other points. There are 3 categories of files: > - the ones that are really generated at build time: setup.log, setup.data > -> they probably need to follow the indication provided -C. This is a b= ug > - the ones that are generated by the underlying build system: _build > (ocamlbuild) > -> as you wrote "-build -build-dir /tmp/my_build_dir -no-links" should = be > enough > - the ones that are generated by the dynamic mode, which is a hack to > prevent adding the files that other tools need: > -> these ones are tricky because they should have been in the source > directory right from the beginning and being able to apply -C to them is > equivalent to make sure that "ocamlfind"/"ocamlbuild"/other build tools > will use -C and the source directory... This is clearly not trivial to > assume that all tools will do. >=20 > My initial proposal to "cp" the files and build from the copy would > probably solve your problem without assuming that all tools comply > with -C. Tell me if it solves your problem. Sure, that is a solution. Maybe I was unclear to begin with. I wanted a way to use *only* oasis/buildtool to achieve my goal. That is, I didn't want to involve system-specific tools to copy the source from the project source dir into the build dir before building. I couldn't find a way to use oasis/buildtool to achieve that, so I sent an email to the list. *I* consider the lack of a way to do that a deficiency in oasis/buildtool. (Do note that it's completely acceptable to just say that this use case isn't one that you see any value in and that the hack of copying the source is the way to achieve a build that doesn't leave *anything* behind in the source dir.) /M --=20 Magnus Therning OpenPGP: 0xAB4DFBA4=20 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus Failure is not an option. It comes bundled with the software. --HcAYCG3uE/tztfnV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEABECAAYFAlYM34EACgkQiMWTaatN+6RlPgCePCuzuZcTLcIz7AHdTMxtwlLA Gs0Anj5k4q+N+iDPvbx4Ca3bD1IMtelU =m/Vd -----END PGP SIGNATURE----- --HcAYCG3uE/tztfnV--