Mercurial > hg > xemacs-beta
diff lisp/loadup.el @ 1330:4542b72c005e
[xemacs-hg @ 2003-03-01 07:25:26 by ben]
build patch
Makefile.in.in: Move src deletions to src/Makefile.in.in.
dump-paths.el, dumped-lisp.el: Delete. Combine stuff into setup-paths.el.
find-paths.el: Removed.
Make this file contain generic routines only. Move stuff to
compute Emacs roots to setup-paths.el.
startup.el: Removed.
Move these variables into setup-paths.el.
setup-paths.el, startup.el: Removed.
Combine all high-level code for computing the paths into
setup-paths.el. Create new function startup-find-load-path to
encapsulate all logic for computing `load-path'. Eliminate
invocation-directory and invocation-name parameters since
there is no point (false generality) -- the code references
other globals, which cannot be specified. Eliminate some code
duplicated between setup-paths.el and startup.el. Clean up
the debug-paths code and output load-path in addition.
Add logic to paths-emacs-root-p to support separated source
and build trees.
loadup.el, make-docfile.el, update-elc-2.el, update-elc.el: Rewrite to allow for separated source and build trees, as may occur
in MS Windows.
NOTE TO BUILD HACKERS:
loadup.el, make-docfile.el, update-elc.el and update-elc-2.el made two
assumptions that are no longer correct:
(1) The source and build trees are in the same place.
(2) They can make assumptions about where `.' is.
These files now compute the locations of the source and build
roots at the top of the file. *ALL* constant file names or path
snippets must now be made absolute using expand-file-name and one
of these roots.
dumped-lisp.el, packages.el: Removed.
Remove some unused lists of Lisp files. packages-hardcoded-lisp
(empty, in any case) moved to dumped-lisp.el.
startup.el: When a compiled init file is out-of-date wrt the uncompiled
version, load the uncompiled version and issue a nasty warning.
update-elc-2.el: Force touching of auto-autoloads files when REBUILD_AUTOLOADS
was set.
update-elc.el: Fix code that checks whether dumping is necessary to check against
xemacs.dmp, not xemacs.exe, when Unix and pdump.
lwlib-Xm.c: Fix compile warning.
README, config.inc.samp, xemacs.mak: -- Major reorganization and cleanup.
-- Add support for separated build tree and source tree.
-- Delete all support for X Windows building, since it's
totally bit-rotten and will never be fixed up. Instruct
people to use Cygwin if they want such support.
make-build-dir: New script to create a skeleton build tree for use with
separated build and source tree compilation.
m/acorn.h, m/alliant-2800.h, m/alliant.h, m/altos.h, m/amdahl.h, m/arm.h, m/att3b.h, m/aviion.h, m/clipper.h, m/cnvrgnt.h, m/convex.h, m/cydra5.h, m/delta.h, m/delta88k.h, m/dpx2.h, m/elxsi.h, m/ews4800r.h, m/gould.h, m/hp800.h, m/hp9000s300.h, m/i860.h, m/ibmps2-aix.h, m/ibmrs6000.h, m/ibmrt-aix.h, m/ibmrt.h, m/intel386.h, m/iris4d.h, m/iris5d.h, m/iris6d.h, m/irist.h, m/m68k.h, m/masscomp.h, m/mg1.h, m/mips-nec.h, m/mips-siemens.h, m/mips.h, m/nh3000.h, m/nh4000.h, m/ns32000.h, m/plexus.h, m/powerpc.h, m/sequent-ptx.h, m/sequent.h, m/sgi-challenge.h, m/stride.h, m/tad68k.h, m/targon31.h, m/tekxd88.h, m/template.h, m/tower32.h, m/tower32v3.h, m/ustation.h, m/wicat.h, m/xps100.h, data.c, doc.c, editfns.c, emacs.c, lrecord.h, ntheap.c, process-unix.c, sysdep.c, unexec.c: Delete all support for bit-rotten CANNOT_DUMP. Just use pdump.
Makefile.in.in: Lots o' cleanup. Use names like LISP, SRC instead of
lispdir, srcdir, for consistency with xemacs.mak and the
conventions in the rest of the file. Eliminate use of ${...}
in favor of $(...), to make it easier to move code between
this file and xemacs.mak. Fix dependency handling wrt
NEEDTODUMP to eliminate problems some people (e.g. Vin) have
been seeing with non-GNU makes. Write a long section about
the subtle but oh-so-important differences in dependency
processing between nmake, make, and GNU make. Add
unicode-encapsulate target, from xemacs.mak.
chartab.c, lrecord.h: Fix crash due to attempt to free objects across dump/undump.
author | ben |
---|---|
date | Sat, 01 Mar 2003 07:25:56 +0000 |
parents | 70921960b980 |
children | ecf1ebac70d8 |
line wrap: on
line diff
--- a/lisp/loadup.el Fri Feb 28 22:52:30 2003 +0000 +++ b/lisp/loadup.el Sat Mar 01 07:25:56 2003 +0000 @@ -39,6 +39,11 @@ (setq stack-trace-on-error t load-always-display-messages t) +;(princ (format "command-line-args: %s\n" command-line-args)) +;(princ (format "configure-lisp-directory: %S\n" configure-lisp-directory)) +;(princ (format "configure-data-directory: %S\n" configure-data-directory)) +;(princ (format "lisp-directory: %S\n" lisp-directory)) + (when (fboundp 'error) (error "loadup.el already loaded!")) @@ -50,6 +55,12 @@ (defvar Installation-string nil "Description of XEmacs installation.") +(defvar build-root (expand-file-name ".." invocation-directory)) +(defvar source-lisp (file-name-directory (expand-file-name + (nth 2 command-line-args)))) +(defvar source-root (expand-file-name ".." source-lisp)) +;(defvar build-lib-src (expand-file-name "lib-src" build-root)) + ;(start-profiling) (let ((gc-cons-threshold @@ -76,14 +87,14 @@ ;; insert-file-contents-internal bogusly calls ;; format-decode without checking if it's defined. (fset 'format-decode #'(lambda (f l &optional v) l)) - (insert-file-contents-internal "../Installation") + (insert-file-contents-internal + (expand-file-name "Installation" build-root)) (fmakunbound 'format-decode) (prog1 (buffer-substring) (kill-buffer (current-buffer))))) - (let ((build-root (expand-file-name ".." invocation-directory))) - (setq load-path (list (expand-file-name "lisp" build-root))) - (setq module-load-path (list (expand-file-name "modules" build-root)))) + (setq load-path (list source-lisp)) + (setq module-load-path (list (expand-file-name "modules" build-root))) ;; message not defined yet ... (external-debugging-output (format "\nUsing load-path %s" load-path)) @@ -133,7 +144,7 @@ ;;(print (format "guessed-data-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name #'paths-emacs-data-root-p))) nil))) - (load (expand-file-name "../lisp/dumped-lisp.el")) + (load (expand-file-name "dumped-lisp.el" source-lisp)) (let ((files preloaded-file-list) file) @@ -212,69 +223,6 @@ ;(stop-profiling) -;; yuck! need to insert the function def here, and rewrite the dolist -;; loop below. - -;(defun loadup-profile-results (&optional info stream) -; "Print profiling info INFO to STREAM in a pretty format. -;If INFO is omitted, the current profiling info is retrieved using -; `get-profiling-info'. -;If STREAM is omitted, either a *Profiling Results* buffer or standard -; output are used, depending on whether the function was called -; interactively or not." -; (interactive) -; (setq info (if info -; (copy-alist info) -; (get-profiling-info))) -; (when (and (not stream) -; (interactive-p)) -; (pop-to-buffer (get-buffer-create "*Profiling Results*")) -; (erase-buffer)) -; (let ((standard-output (or stream (if (interactive-p) -; (current-buffer) -; standard-output))) -; ;; Calculate the longest function -; (maxfunlen (apply #'max -; (length "Function Name") -; (mapcar -; (lambda (el) -; ;; Functions longer than 50 characters (usually -; ;; anonymous functions) don't qualify -; (let ((l (length (format "%s" (car el))))) -; (if (< l 50) -; l 0))) -; info)))) -; (princ (format "%-*s Ticks %%/Total Call Count\n" -; maxfunlen "Function Name")) -; (princ (make-string maxfunlen ?=)) -; (princ " ===== ======= ==========\n") -; (let ((sum (float (apply #'+ (mapcar #'cdr info))))) -; (let (entry -; (entry-list (nreverse (sort info #'cdr-less-than-cdr)))) -; (while entry-list -; (setq entry (car entry-list)) -; (princ (format "%-*s %-5d %-6.3f %s\n" -; maxfunlen (car entry) (cdr entry) -; (* 100 (/ (cdr entry) sum)) -; (or (gethash (car entry) call-count-profile-table) -; ""))) -; (setq entry-list (cdr entry-list)))) -; (princ (make-string maxfunlen ?-)) -; (princ "---------------------------------\n") -; (princ (format "%-*s %-5d %-6.2f\n" maxfunlen "Total" sum 100.0)) -; (princ (format "\n\nOne tick = %g ms\n" -; (/ default-profiling-interval 1000.0))) -; (and (boundp 'internal-error-checking) -; internal-error-checking -; (princ " -;WARNING: Error checking is turned on in this XEmacs. This might make -; the measurements very unreliable.\n")))) -; (when (and (not stream) -; (interactive-p)) -; (goto-char (point-min)))) - -;(loadup-profile-results nil 'external-debugging-output) - ;; Dump into the name `xemacs' (only) (when (member "dump" command-line-args) (message "Dumping under the name xemacs")