aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-21 08:43:33 +0000
committerRichard M. Stallman1994-04-21 08:43:33 +0000
commitf5ab9736a5e30006cd9e6dec5c6a1ed0d239e248 (patch)
tree64da61a1e769f720809156379599c08c46747804 /src
parent996e89cd0501cacfa2168f062c057094399c15fc (diff)
downloademacs-f5ab9736a5e30006cd9e6dec5c6a1ed0d239e248.tar.gz
emacs-f5ab9736a5e30006cd9e6dec5c6a1ed0d239e248.zip
(init_cmdargs): Just check for etc and lib-src subdirs
when setting Vinstallation_directory.
Diffstat (limited to 'src')
-rw-r--r--src/emacs.c64
1 files changed, 23 insertions, 41 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 50a0f9f3c3d..d5b89b896d9 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -210,57 +210,39 @@ init_cmdargs (argc, argv, skip_args)
210 name = Fexpand_file_name (Vinvocation_name, dir); 210 name = Fexpand_file_name (Vinvocation_name, dir);
211 while (1) 211 while (1)
212 { 212 {
213 Lisp_Object tem, lisp_exists, lib_src_exists; 213 Lisp_Object tem, lib_src_exists;
214 Lisp_Object etc_exists, info_exists; 214 Lisp_Object etc_exists, info_exists;
215 215
216 /* See if dir contains subdirs for use by Emacs. */ 216 /* See if dir contains subdirs for use by Emacs.
217 tem = Fexpand_file_name (build_string ("lisp"), dir); 217 Check for the ones that would exist in a build directory,
218 lisp_exists = Ffile_exists_p (tem); 218 not including lisp and info. */
219 if (!NILP (lisp_exists)) 219 tem = Fexpand_file_name (build_string ("lib-src"), dir);
220 lib_src_exists = Ffile_exists_p (tem);
221 if (!NILP (lib_src_exists))
220 { 222 {
221 tem = Fexpand_file_name (build_string ("lib-src"), dir); 223 tem = Fexpand_file_name (build_string ("etc"), dir);
222 lib_src_exists = Ffile_exists_p (tem); 224 etc_exists = Ffile_exists_p (tem);
223 if (!NILP (lib_src_exists)) 225 if (!NILP (etc_exists))
224 { 226 {
225 tem = Fexpand_file_name (build_string ("etc"), dir); 227 Vinstallation_directory
226 etc_exists = Ffile_exists_p (tem); 228 = Ffile_name_as_directory (dir);
227 if (!NILP (etc_exists)) 229 break;
228 {
229 tem = Fexpand_file_name (build_string ("info"), dir);
230 info_exists = Ffile_exists_p (tem);
231 if (!NILP (info_exists))
232 {
233 Vinstallation_directory
234 = Ffile_name_as_directory (dir);
235 break;
236 }
237 }
238 } 230 }
239 } 231 }
240 232
241 /* See if dir's parent contains those subdirs. */ 233 /* See if dir's parent contains those subdirs. */
242 tem = Fexpand_file_name (build_string ("../lisp"), dir); 234 tem = Fexpand_file_name (build_string ("../lib-src"), dir);
243 lisp_exists = Ffile_exists_p (tem); 235 lib_src_exists = Ffile_exists_p (tem);
244 if (!NILP (lisp_exists)) 236 if (!NILP (lib_src_exists))
245 { 237 {
246 tem = Fexpand_file_name (build_string ("../lib-src"), dir); 238 tem = Fexpand_file_name (build_string ("../etc"), dir);
247 lib_src_exists = Ffile_exists_p (tem); 239 etc_exists = Ffile_exists_p (tem);
248 if (!NILP (lib_src_exists)) 240 if (!NILP (etc_exists))
249 { 241 {
250 tem = Fexpand_file_name (build_string ("../etc"), dir); 242 tem = Fexpand_file_name (build_string (".."), dir);
251 etc_exists = Ffile_exists_p (tem); 243 Vinstallation_directory
252 if (!NILP (etc_exists)) 244 = Ffile_name_as_directory (tem);
253 { 245 break;
254 tem = Fexpand_file_name (build_string ("../info"), dir);
255 info_exists = Ffile_exists_p (tem);
256 if (!NILP (info_exists))
257 {
258 tem = Fexpand_file_name (build_string (".."), dir);
259 Vinstallation_directory
260 = Ffile_name_as_directory (tem);
261 break;
262 }
263 }
264 } 246 }
265 } 247 }
266 248