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 48C617FACE for ; Fri, 19 Sep 2014 00:30:16 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of yotambarnoy@gmail.com) identity=pra; client-ip=209.85.215.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of yotambarnoy@gmail.com designates 209.85.215.53 as permitted sender) identity=mailfrom; client-ip=209.85.215.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-la0-f53.google.com) identity=helo; client-ip=209.85.215.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="postmaster@mail-la0-f53.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvUBAINcG1TRVdc1m2dsb2JhbABghDcEgnzOGAGBBAgWAREBAQEBAQYLCwkUKoQEAQEDARIRHQEbHQEDAQsGBQQBBjcCAiIBEQEFARwGEwgaiAcBAwkIn3hrizCBcoMQiT0KGScNZoZIAREBBQ6PaQeCeIFTAQSdDJNWGCmFKyEvgkoBAQE X-IPAS-Result: AvUBAINcG1TRVdc1m2dsb2JhbABghDcEgnzOGAGBBAgWAREBAQEBAQYLCwkUKoQEAQEDARIRHQEbHQEDAQsGBQQBBjcCAiIBEQEFARwGEwgaiAcBAwkIn3hrizCBcoMQiT0KGScNZoZIAREBBQ6PaQeCeIFTAQSdDJNWGCmFKyEvgkoBAQE X-IronPort-AV: E=Sophos;i="5.04,550,1406584800"; d="scan'208";a="96513279" Received: from mail-la0-f53.google.com ([209.85.215.53]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Sep 2014 00:30:15 +0200 Received: by mail-la0-f53.google.com with SMTP id ge10so2025204lab.40 for ; Thu, 18 Sep 2014 15:30:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=0RM8zu48GuY2nLSYDf34ZPLib3YEn3UZk3lp9AJG1Hw=; b=uxT5O5FRtlApeeO2rpiRW6CoFwnXweB7hjiYGwfym4rEP3a2d+7KAB9x7w11uPjadW Ar/raRcj85t3zs9jl5hkflWW/KqPnC3f+8jwooGrXlIX43wDwGcsWPSMeMcNuSl/qrnq L7n0gnkGY/USK1zkXlOlabvmknOXa0iEaqceDsEB83C/DzHnaoME3OXS884Icjq+Qafi gW1DmIyJqDdf8C978UTQfuk+0Ux/dZky5gGIBk6tGX+fH0KnjIRhCS4pwXAfIlq9gHm7 G1C2qaDJg7sF/sJluPO48/DQjQTo1HZD4R+putF2krneGodRdEd3ZGgmj1M8VMy0t87t X9Fw== X-Received: by 10.112.13.232 with SMTP id k8mr2346115lbc.81.1411079415061; Thu, 18 Sep 2014 15:30:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.71 with HTTP; Thu, 18 Sep 2014 15:29:55 -0700 (PDT) In-Reply-To: <20140918222857.GA12277@mlqds.hnr.gr> References: <20140918222857.GA12277@mlqds.hnr.gr> From: Yotam Barnoy Date: Thu, 18 Sep 2014 18:29:55 -0400 Message-ID: To: =?UTF-8?Q?Gr=C3=A9goire_Henry?= Cc: OCaml Mailing List Content-Type: multipart/alternative; boundary=001a11c3c47e48e1e405035e87f6 Subject: Re: [Caml-list] opam local switch --001a11c3c47e48e1e405035e87f6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Awesome, thanks. On Thu, Sep 18, 2014 at 6:28 PM, Gr=C3=A9goire Henry wrote: > Hi, > > > My question is, if I set OPAMSWITCH, will I then be able to run regular > > (non-opam) ocaml build commands in the local shell in the given compile= r, > > while running commands in a different shell with a different compiler? > > No, it is not. But, what you are looking for is probably: > > eval $(opam config env --switch 3.12.1) > > This will setup the proper environment for ocaml-3.12.1 in the current > terminal (including the OPAMSWITCH variable) without changing the > "global default switch". > > The previous command is equivalent to: > > export OPAMSWITCH=3D3.12.1 > eval $(opam config env) > > -- Gr=C3=A9goire > --001a11c3c47e48e1e405035e87f6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Awesome, thanks.

On Thu, Sep 18, 2014 at 6:28 PM, Gr=C3=A9goire Henry = <gregoire.henry@ocamlpro.com> wrote:
Hi,

> My question is, if I set OPAMSWITCH, will I then be able to run regula= r
> (non-opam) ocaml build commands in the local shell in the given compil= er,
> while running commands in a different shell with a different compiler?=

No, it is not. But, what you are looking for is probably:

=C2=A0 eval $(opam config env --switch 3.12.1)

This will setup the proper environment for ocaml-3.12.1 in the current
terminal (including the OPAMSWITCH variable) without changing the
"global default switch".

The previous command is equivalent to:

=C2=A0 export OPAMSWITCH=3D3.12.1
=C2=A0 eval $(opam config env)

-- Gr=C3=A9goire

--001a11c3c47e48e1e405035e87f6--