From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id C06E2BBC1 for ; Tue, 4 Mar 2008 10:36:56 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAO+mzEfBL1AZbWdsb2JhbACQdwsEBgkHGZst X-IronPort-AV: E=Sophos;i="4.25,443,1199660400"; d="scan'208";a="23339580" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 04 Mar 2008 10:36:55 +0100 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m249arXD027855 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 4 Mar 2008 10:36:54 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAO+mzEfBL1AZbWdsb2JhbACQdwsEBgkHGZst X-IronPort-AV: E=Sophos;i="4.25,443,1199660400"; d="scan'208";a="23339565" Received: from gw.exalead.com (HELO exalead.com) ([193.47.80.25]) by mail4-smtp-sop.national.inria.fr with ESMTP; 04 Mar 2008 10:36:50 +0100 Received: from [192.168.204.148] (madpc064.exalead.com [192.168.204.148]) (authenticated bits=0) by exalead.com (8.14.0/8.14.0) with ESMTP id m249agd6026143; Tue, 4 Mar 2008 10:36:44 +0100 Message-ID: <47CD182A.50803@exalead.com> Date: Tue, 04 Mar 2008 10:36:42 +0100 From: Berke Durak User-Agent: Thunderbird 1.5.0.10 (X11/20070221) MIME-Version: 1.0 To: Nicolas Pouillard Cc: Ashish Agarwal , caml-list Subject: Re: [Caml-list] ocamlbuild's symlink behavior References: <20080303180449.GA16119@stratocaster.home> <1204621199-sup-9348@ausone.inria.fr> In-Reply-To: <1204621199-sup-9348@ausone.inria.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 47CD1835.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; berke:01 durak:01 berke:01 durak:01 symlink:01 symlink:01 symlinks:01 symlinks:01 basename:01 basename:01 wrote:01 symbolic:01 caml-list:01 executables:01 toto:02 Nicolas Pouillard a écrit : > Excerpts from Ashish Agarwal's message of Tue Mar 04 02:26:33 +0100 2008: >> It is probably better to refer to the executables under _build in external >> scripts. >> >> On Mon, Mar 3, 2008 at 1:04 PM, Eric Cooper wrote: >>> Ocamlbuild seems to create a symbolic link into the _build directory >>> when you build a single target. But it removes that symlink if you >>> build a different target, and it doesn't produce any symlinks if you >>> build a *.otarget. >>> >>> Is there any rationale for this? It makes it difficult to use the >>> resulting symlinks in any kind of build script. > > That's right, symlinks was more to explain the user where things are. I have an idea. Remove symlinks pointing to the _build directory *only* if the basename of the symlink is the same as the basename of the target. Hence, if I have toto.native in project/_build and toto.native in project pointing to project/_build/toto.native, it would get deleted when ocamlbuild is invoked without toto.native as a target. However I can create a link project/toto.opt that links to project/_build/toto.native and it wouldn't get deleted by myocamlbuild. This would also be a way to respond to people who find the ".native" extension too long - tell them that they would be better of creating their own symlinks anyway. -- Berke DURAK