aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2012-05-14 09:33:11 -0700
committerGlenn Morris2012-05-14 09:33:11 -0700
commit985584aed1505c40f97b0cfc983f4a5e05b127d8 (patch)
tree8df1219c5e077a7bb26ab7d456f45e003756c6b2 /src
parent4374de8319c5666ac1fa295000e9753ea67f7673 (diff)
downloademacs-985584aed1505c40f97b0cfc983f4a5e05b127d8.tar.gz
emacs-985584aed1505c40f97b0cfc983f4a5e05b127d8.zip
Make a self-contained ns build able to find its own libexec directory
Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00298.html * src/nsterm.m (ns_init_paths): Put "libexec" before "bin", for the sake of init_callproc_1.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog1
-rw-r--r--src/nsterm.m11
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d6df87c27e5..2d20f13dced 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,7 @@
12012-05-14 Glenn Morris <rgm@gnu.org> 12012-05-14 Glenn Morris <rgm@gnu.org>
2 2
3 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec"). 3 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
4 Put "libexec" before "bin", for the sake of init_callproc_1.
4 5
52012-05-14 Paul Eggert <eggert@cs.ucla.edu> 62012-05-14 Paul Eggert <eggert@cs.ucla.edu>
6 7
diff --git a/src/nsterm.m b/src/nsterm.m
index 9a5122e5e80..4b8b2bb4820 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -338,11 +338,18 @@ ns_init_paths (void)
338/*NSLog (@"loadPath: '%@'\n", resourcePaths); */ 338/*NSLog (@"loadPath: '%@'\n", resourcePaths); */
339 } 339 }
340 340
341 /* Normally, Emacs does not add its own bin/ directory to the PATH.
342 However, a self-contained NS build has a different layout, with
343 bin/ and libexec/ subdirectories in the directory that contains
344 Emacs.app itself.
345 We put libexec first, because init_callproc_1 uses the first
346 element to initialize exec-directory. An alternative would be
347 for init_callproc to check for invocation-directory/libexec. */
341 if (!getenv ("EMACSPATH")) 348 if (!getenv ("EMACSPATH"))
342 { 349 {
343 NSArray *paths = [binDir stringsByAppendingPaths: 350 NSArray *paths = [binDir stringsByAppendingPaths:
344 [NSArray arrayWithObjects: @"bin", 351 [NSArray arrayWithObjects: @"libexec",
345 @"libexec", nil]]; 352 @"bin", nil]];
346 NSEnumerator *pathEnum = [paths objectEnumerator]; 353 NSEnumerator *pathEnum = [paths objectEnumerator];
347 resourcePaths = @""; 354 resourcePaths = @"";
348 while (resourcePath = [pathEnum nextObject]) 355 while (resourcePath = [pathEnum nextObject])