From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: ns build symlinks all libexec programs into bin directory Date: Sun, 13 May 2012 08:27:58 +0200 Message-ID: <6843BF26-8BB7-4C5A-AD57-FCA4A0E7927D@swipnet.se> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1336903003 6317 80.91.229.3 (13 May 2012 09:56:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 13 May 2012 09:56:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 13 11:56:42 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1STVXd-0006Jg-0C for ged-emacs-devel@m.gmane.org; Sun, 13 May 2012 11:56:41 +0200 Original-Received: from localhost ([::1]:52901 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STVXc-0006vy-BT for ged-emacs-devel@m.gmane.org; Sun, 13 May 2012 05:56:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STVXZ-0006vt-HF for emacs-devel@gnu.org; Sun, 13 May 2012 05:56:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STVXX-0002My-Ny for emacs-devel@gnu.org; Sun, 13 May 2012 05:56:37 -0400 Original-Received: from mailout.melmac.se ([62.20.26.67]:45076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STVXX-0002Me-HG for emacs-devel@gnu.org; Sun, 13 May 2012 05:56:35 -0400 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id C0D689300 for ; Sun, 13 May 2012 11:56:29 +0200 (CEST) Original-Received: (qmail 23276 invoked by uid 89); 13 May 2012 10:52:24 -0000 Original-Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 13 May 2012 10:52:24 -0000 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id F14927FA06C; Sun, 13 May 2012 08:27:57 +0200 (CEST) In-Reply-To: X-Mailer: Apple Mail (2.1278) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 62.20.26.67 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150471 Archived-At: Hello. 12 maj 2012 kl. 20:18 skrev Glenn Morris: >=20 > Why does a --with-ns build do this (in install-arch-dep): >=20 > cd nextstep/Emacs.app/bin > ls -l > hexl -> ../libexec/hexl > movemail -> ../libexec/movemail > profile -> ../libexec/profile > rcs2log -> ../libexec/rcs2log > update-game-score -> ../libexec/update-game-score > vcdiff -> ../libexec/vcdiff >=20 > Ie, create symlinks to the libexec programs in the bin directory? >=20 > These programs are supposed to be for internal Emacs use only, which = is > why they get installed in libexec in the first place. Short answer: So Emacs can find them :-) Long answer: The path to libexec is in PATH_EXEC epaths.h from epaths.in and then = added to exec-path. epaths.h is created at make time by the top level Makefile. make install for --with-ns installs to nextstep/Emacs.app in the emacs = tree. Emacs.app can then be copied to its final place, which can be anywhere = or another machine. Thus, PATH_EXEC points to libexec in nextstep/Emacs.app, but when = Emacs.app is installed (say on another machine), that values is not = valid. Hence the links into bin as bin is in exec-path (derived from = invocation directory and not by a compile time constant). The idea is that Emacs.app is self contained and can be relocated = anywhere as is how app-bundles are supposed to work. A more intelligent = search for libexec would also solve it. For NS we know it is in the = same place as bin, so we could just add libexec to exe-path the same way = as bin. But I guess nobody thought of this as a problem. Jan D.