summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2009-10-07 07:18:53 +0000
committerGlenn Morris <rgm@gnu.org>2009-10-07 07:18:53 +0000
commit5152da64b8b8c43a021ee528dbd538a8da91997f (patch)
tree81105c5cc64774869b6bda0b6aac584e16a31373 /lisp
parent8b31f1a61228193ffb09ca3b4d4bd00265e2436a (diff)
downloademacs-5152da64b8b8c43a021ee528dbd538a8da91997f.tar.gz
emacs-5152da64b8b8c43a021ee528dbd538a8da91997f.tar.bz2
emacs-5152da64b8b8c43a021ee528dbd538a8da91997f.zip
(batch-update-autoloads): Rather than having the list of preloaded
files passed on the command-line, get it from src/Makefile.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/autoload.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 05e1c228ea7..593cdb68284 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -683,18 +683,19 @@ directory or directories specified."
(defun batch-update-autoloads ()
"Update loaddefs.el autoloads in batch mode.
Calls `update-directory-autoloads' on the command line arguments."
- ;; For use during the Emacs build process only. We do the file-name
- ;; expansion here rather than in lisp/Makefile in order to keep the
- ;; shell command line short. (Long lines are an issue on some systems.)
- (if (stringp autoload-excludes)
- (setq autoload-excludes
- (mapcar
- (lambda (file)
- (concat
- (expand-file-name (file-name-sans-extension file)
- (file-name-directory generated-autoload-file))
- ".el"))
- (split-string autoload-excludes))))
+ ;; For use during the Emacs build process only.
+ (unless autoload-excludes
+ (let* ((ldir (file-name-directory generated-autoload-file))
+ (mfile (expand-file-name "../src/Makefile" ldir))
+ lim)
+ (when (file-readable-p mfile)
+ (with-temp-buffer
+ (insert-file-contents mfile)
+ (when (re-search-forward "^lisp= ")
+ (setq lim (line-end-position))
+ (while (re-search-forward "\\${lispsource}\\([^ ]*\\)\\.elc?" lim t)
+ (push (concat (expand-file-name (match-string 1) ldir) ".el")
+ autoload-excludes)))))))
(let ((args command-line-args-left))
(setq command-line-args-left nil)
(apply 'update-directory-autoloads args)))