annotate lisp/update-elc-2.el @ 1292:f3437b56874d

[xemacs-hg @ 2003-02-13 09:57:04 by ben] profile updates profile.c: Major reworking. Keep track of new information -- total function timing (includes descendants), GC usage, total GC usage (includes descendants). New functions to be called appropriately from eval.c, alloc.c to keep track of this information. Keep track of when we're actually in a function vs. in its profile, for more accurate timing counts. Track profile overhead separately. Create new mechanism for specifying "internal sections" that are tracked just like regular Lisp functions and even appear in the backtrace if `backtrace-with-internal-sections' is non-nil (t by default for error-checking builds). Add some KKCC information for the straight (non-Elisp) hash table used by profile, which contains Lisp objects in its keys -- but not used yet. Remove old ad-hoc methods for tracking garbage collection, redisplay (which was incorrect anyway when Lisp was called within these sections). Don't record any tick info when blocking under MS Windows, since the timer there is in real time rather than in process time. Make `start-profiling', `stop-profiling' interactive. Be consistent wrt. recursive functions and functions currently on the stack when starting or stopping -- together these make implementing the `total' values extremely difficult. When we start profiling, we act as if we just entered all the functions currently on the stack. Likewise when exiting. Create vars in_profile for tracking time spent inside of profiling, and profiling_lock for setting exclusive access to the main hash table when reading from it or modifying it. (protects against getting screwed up by the signal handle going off at the same time. profile.h: New file. Create macros for declaring internal profiling sections. lisp.h: Move profile-related stuff to profile.h. alloc.c: Keep track of total consing, for profile. Tell profile when we are consing. Use new profile-section method for noting garbage-collection. alloc.c: Abort if we attempt to call the allocator reentrantly. backtrace.h, eval.c: Add info for use by profile in the backtrace frame and transfer PUSH_BACKTRACE/POP_BACKTRACE from eval.c, for use with profile. elhash.c: Author comment. eval.c, lisp.h: New Lisp var `backtrace-with-internal-sections'. Set to t when error-checking is on. eval.c: When unwinding, eval.c: Report to profile when we are about-to-call and just-called wrt. a function. alloc.c, eval.c: Allow for "fake" backtrace frames, for internal sections (used by profile and `backtrace-with-internal-sections'. event-Xt.c, event-gtk.c, event-msw.c, event-tty.c: Record when we are actually blocking on an event, for profile's sake. event-stream.c: Record internal profiling sections for getting, dispatching events. extents.c: Record internal profiling sections for map_extents. hash.c, hash.h: Add pregrow_hash_table_if_necessary(). (Used in profile code since the signal handler is the main grower but can't allow a realloc(). We make sure, at critical points, that the table is large enough.) lread.c: Create internal profiling sections for `load' (which may be triggered internally by autoload, etc.). redisplay.c: Remove old profile_redisplay_flag. Use new macros to declare internal profiling section for redisplay. text.c: Use new macros to declare internal profiling sections for char-byte conversion and internal-external conversion. SEMI-UNRELATED CHANGES: ----------------------- text.c: Update the long comments.
author ben
date Thu, 13 Feb 2003 09:57:08 +0000
parents 465bd3c7d932
children 1b4bc72f433e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1 ;;; update-elc-2.el --- Recompile remaining .el files, post-dumping
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
2
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
3 ;; Copyright (C) 1997 by Free Software Foundation, Inc.
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1232
diff changeset
4 ;; Copyright (C) 2000, 2003 Ben Wing.
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
5
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
6 ;; Author: Ben Wing <ben@xemacs.org>, based on cleantree.el by
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
7 ;; Steven L Baur <steve@xemacs.org>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
8 ;; Maintainer: XEmacs Development Team
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
9 ;; Keywords: internal
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
10
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
11 ;; This file is part of XEmacs.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
12
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
13 ;; XEmacs is free software; you can redistribute it and/or modify it
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
14 ;; under the terms of the GNU General Public License as published by
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
15 ;; the Free Software Foundation; either version 2, or (at your option)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
16 ;; any later version.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
17
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
18 ;; XEmacs is distributed in the hope that it will be useful, but
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
21 ;; General Public License for more details.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
22
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
23 ;; You should have received a copy of the GNU General Public License
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
24 ;; along with XEmacs; see the file COPYING. If not, write to the Free
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
25 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
26 ;; 02111-1307, USA.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
27
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
28 ;;; Synched up with: Not in FSF
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
29
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
30 ;;; Commentary:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
31
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
32 ;; This file should be used after XEmacs has been dumped, to recompile
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
33 ;; all remaining out-of-date .els and clean up orphaned .elcs. It should
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
34 ;; be called as
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
35 ;;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
36 ;; xemacs -batch -vanilla -l update-elc-2.el -f batch-update-elc-2 ${dirname}
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
37 ;;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
38 ;; where ${dirname} is the directory tree to recompile, usually `lisp'.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
39 ;;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
40 ;; Note that this is very different from update-elc.el, which is called
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
41 ;; BEFORE dumping, handles only the files needed to dump, and is called
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
42 ;; from temacs instead of xemacs.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
43 ;;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
44 ;; The original cleantree.el had the comment: This code is derived
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
45 ;; from Gnus based on a suggestion by David Moore <dmoore@ucsd.edu>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
46
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
47 ;;; Code:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
48
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1232
diff changeset
49 ;; Help debug problems.
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1232
diff changeset
50 (setq stack-trace-on-error t
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1232
diff changeset
51 load-always-display-messages t)
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1232
diff changeset
52
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
53 (defvar update-elc-ignored-dirs
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
54 `("." ".." "CVS" "SCCS" "RCS" ,@(unless (featurep 'mule) '("mule"))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
55
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
56 (defvar update-elc-ignored-files
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
57 ;; note: entries here are regexps
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
58 '("^," ;; #### huh?
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
59 "^paths\\.el$"
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
60 "^loadup\\.el$"
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
61 "^loadup-el\\.el$"
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
62 "^update-elc\\.el$"
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
63 "^update-elc-2\\.el$"
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
64 "^dumped-lisp\\.el$"
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
65 "^make-docfile\\.el$"
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
66 "^site-start\\.el$"
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
67 "^site-load\\.el$"
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
68 "^site-init\\.el$"
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
69 "^version\\.el$"
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
70 "^very-early-lisp\\.el$"))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
71
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
72 ;; SEEN accumulates the list of already-handled dirs.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
73 (defun do-update-elc-2 (dir compile-stage-p seen)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
74 (setq dir (file-name-as-directory dir))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
75 ;; Only scan this sub-tree if we haven't been here yet.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
76 (unless (member (file-truename dir) seen)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
77 (push (file-truename dir) seen)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
78
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
79 ;; Do this directory.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
80 (if compile-stage-p
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
81 ;; Stage 2: Recompile necessary .els
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
82 (let ((files (directory-files dir t "\\.el$"))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
83 file file-c)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
84 (while (setq file (car files))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
85 (setq files (cdr files))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
86 (setq file-c (concat file "c"))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
87 (when (and (file-exists-p file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
88 (or (not (file-exists-p file-c))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
89 (file-newer-than-file-p file file-c))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
90 (let (ignore)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
91 (mapcar
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
92 #'(lambda (regexp)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
93 (if (string-match regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
94 (file-name-nondirectory file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
95 (setq ignore t)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
96 update-elc-ignored-files)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
97 (not ignore)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
98 (byte-compile-file file))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
99
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
100 ;; Stage 1.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
101 ;; Remove out-of-date elcs
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
102 (let ((files (directory-files dir t "\\.el$"))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
103 file file-c)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
104 (while (setq file (car files))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
105 (setq files (cdr files))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
106 (setq file-c (concat file "c"))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
107 (when (and (file-exists-p file-c)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
108 (file-newer-than-file-p file file-c))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
109 (message "Removing out-of-date %s" file-c)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
110 (delete-file file-c))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
111 ;; Remove elcs without corresponding el
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
112 (let ((files (directory-files dir t "\\.elc$"))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
113 file file-c)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
114 (while (setq file-c (car files))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
115 (setq files (cdr files))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
116 (setq file (replace-in-string file-c "c$" ""))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
117 (when (and (file-exists-p file-c)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
118 (not (file-exists-p file)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
119 (message "Removing %s; no corresponding .el" file-c)
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 528
diff changeset
120 (delete-file file-c)))))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
121
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
122 ;; We descend recursively
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
123 (let ((dirs (directory-files dir t nil t))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
124 dir)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
125 (while (setq dir (pop dirs))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
126 (when (and (not (member (file-name-nondirectory dir)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
127 update-elc-ignored-dirs))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
128 (file-directory-p dir))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
129 (do-update-elc-2 dir compile-stage-p seen))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
130
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 528
diff changeset
131 ))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
132
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
133 (defun batch-update-elc-2 ()
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
134 (defvar command-line-args-left)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
135 (unless noninteractive
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
136 (error "`batch-update-elc-2' is to be used only with -batch"))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
137 (let ((dir (car command-line-args-left)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
138 ;; We remove all the bad .elcs before any byte-compilation, because
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
139 ;; there may be dependencies between one .el and another (even across
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
140 ;; directories), and we don't want to load an out-of-date .elc while
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
141 ;; byte-compiling a file.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
142 (message "Removing old or spurious .elcs in directory tree `%s'..." dir)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
143 (do-update-elc-2 dir nil nil)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
144 (message "Removing old or spurious .elcs in directory tree `%s'...done"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
145 dir)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
146 (message "Recompiling updated .els in directory tree `%s'..." dir)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
147 (do-update-elc-2 dir t nil)
528
ef4d2466a29c [xemacs-hg @ 2001-05-10 09:59:45 by ben]
ben
parents: 444
diff changeset
148 (message "Recompiling updated .els in directory tree `%s'...done" dir)
ef4d2466a29c [xemacs-hg @ 2001-05-10 09:59:45 by ben]
ben
parents: 444
diff changeset
149 ;; don't depend on being able to autoload `update-autoload-files'!
ef4d2466a29c [xemacs-hg @ 2001-05-10 09:59:45 by ben]
ben
parents: 444
diff changeset
150 (load "autoload")
1232
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
151 ;; #### the API used here is deprecated, convert to one with explicit
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
152 ;; arguments when it is available
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
153 (let ((generated-autoload-file (expand-file-name "auto-autoloads.el" dir))
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
154 (autoload-package-name "auto")) ; feature prefix
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
155 (update-autoload-files (list dir))
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
156 (byte-recompile-file generated-autoload-file 0))
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
157 (when (featurep 'modules)
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 617
diff changeset
158 (let* ((moddir (expand-file-name "../modules" (file-truename dir)))
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 617
diff changeset
159 (generated-autoload-file
1232
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
160 (expand-file-name "auto-autoloads.el" moddir))
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
161 (autoload-package-name "modules")) ; feature prefix
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
162 (update-autoload-files
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
163 (delete (concat (file-name-as-directory moddir) ".")
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
164 (delete (concat (file-name-as-directory moddir) "..")
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
165 (directory-files moddir t nil nil 0)))
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
166 t)
996
25e260cb7994 [xemacs-hg @ 2002-09-10 15:27:02 by james]
james
parents: 617
diff changeset
167 (byte-recompile-file generated-autoload-file 0)))
528
ef4d2466a29c [xemacs-hg @ 2001-05-10 09:59:45 by ben]
ben
parents: 444
diff changeset
168 (when (featurep 'mule)
1261
465bd3c7d932 [xemacs-hg @ 2003-02-06 06:35:47 by ben]
ben
parents: 1232
diff changeset
169 (let* ((muledir (expand-file-name "../lisp/mule" (file-truename dir)))
1232
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
170 (generated-autoload-file
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
171 (expand-file-name "auto-autoloads.el" muledir))
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
172 (autoload-package-name "mule")) ; feature prefix
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
173 (update-autoload-files (list muledir))
c08a6fa181d1 [xemacs-hg @ 2003-01-23 11:38:56 by stephent]
stephent
parents: 996
diff changeset
174 (byte-recompile-file generated-autoload-file 0)))
528
ef4d2466a29c [xemacs-hg @ 2001-05-10 09:59:45 by ben]
ben
parents: 444
diff changeset
175 ;; likewise here.
ef4d2466a29c [xemacs-hg @ 2001-05-10 09:59:45 by ben]
ben
parents: 444
diff changeset
176 (load "cus-dep")
ef4d2466a29c [xemacs-hg @ 2001-05-10 09:59:45 by ben]
ben
parents: 444
diff changeset
177 (Custom-make-dependencies dir)
ef4d2466a29c [xemacs-hg @ 2001-05-10 09:59:45 by ben]
ben
parents: 444
diff changeset
178 (byte-recompile-file (expand-file-name "custom-load.el" dir) 0)
ef4d2466a29c [xemacs-hg @ 2001-05-10 09:59:45 by ben]
ben
parents: 444
diff changeset
179 (when (featurep 'mule)
ef4d2466a29c [xemacs-hg @ 2001-05-10 09:59:45 by ben]
ben
parents: 444
diff changeset
180 (Custom-make-dependencies (expand-file-name "mule" dir))
ef4d2466a29c [xemacs-hg @ 2001-05-10 09:59:45 by ben]
ben
parents: 444
diff changeset
181 (byte-recompile-file (expand-file-name "mule/custom-load.el" dir) 0))
ef4d2466a29c [xemacs-hg @ 2001-05-10 09:59:45 by ben]
ben
parents: 444
diff changeset
182 )
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
183 (setq command-line-args-left nil))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
184
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
185 ;;; update-elc-2.el ends here