1 ;; dump-paths.el --- set up SXEmacs paths for dumping
3 ;; Copyright (C) 1985, 1986, 1992, 1994, 1997 Free Software Foundation, Inc.
5 ;; Maintainer: SXEmacs Development Team
6 ;; Keywords: internal, dumped
8 ;; This file is part of SXEmacs.
10 ;; SXEmacs is free software: you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation, either version 3 of the License, or
13 ;; (at your option) any later version.
15 ;; SXEmacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
23 ;;; Synched up with: Not in FSF
27 ;; This sets up the various paths for continuing loading files for
29 ;; #### This code is duplicated in startup.el (startup-setup-paths).
31 (let ((debug-paths (or debug-paths
32 (and (getenv "EMACSDEBUGPATHS")
34 (roots (paths-find-emacs-roots invocation-directory
38 (princ (format "SXEmacs thinks the roots of its hierarchy are:\n%S\n"
41 (let* ((package-locations
42 (packages-compute-package-locations
44 ;; this should be synched with startup.el
45 (paths-construct-path '("~" ".sxemacs"))))
46 (stuff (packages-find-packages roots package-locations)))
47 (setq late-packages (car (cdr stuff))))
49 (setq late-package-load-path (packages-find-package-load-path late-packages))
53 (princ (format "configure-package-path:\n%S\n" configure-package-path)
54 'external-debugging-output)
55 (princ (format "late-packages and late-package-load-path:\n%S\n%S\n"
56 late-packages late-package-load-path)
57 'external-debugging-output)))
59 (setq lisp-directory (paths-find-lisp-directory roots))
61 (princ (format "lisp-directory:\n%S\n" lisp-directory)
62 'external-debugging-output))
65 (setq mule-lisp-directory
66 (paths-find-mule-lisp-directory roots
69 (princ (format "mule-lisp-directory:\n%S\n"
71 'external-debugging-output)))
72 (setq mule-lisp-directory '()))
74 (setq ffi-lisp-directory
75 (when (fboundp #'ffi-defun)
76 (paths-find-ffi-lisp-directory roots
79 (setq load-path (paths-construct-load-path roots
81 late-package-load-path
88 (setq exec-directory (paths-find-exec-directory roots))
90 (princ (format "exec-directory:\n%S\n" exec-directory)
91 'external-debugging-output))
93 (setq module-directory (paths-find-module-directory roots))
95 (princ (format "module-directory:\n%S\n" module-directory)
96 'external-debugging-output))
97 (setq site-module-directory (and (null inhibit-site-modules)
98 (paths-find-site-module-directory roots)))
99 (if (and debug-paths (null inhibit-site-modules))
100 (princ (format "site-module-directory:\n%S\n" site-module-directory)
101 'external-debugging-output))
104 (princ (format "load-path:\n%S\n" load-path))))
106 ;;; dump-paths.el ends here