From: Glenn Morris <rgm@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Juanma Barranquero <lekktu@gmail.com>, emacs-devel@gnu.org
Subject: Re: ignoring autoloads in preloaded files on Windows
Date: Sat, 10 Oct 2009 17:17:27 -0400 [thread overview]
Message-ID: <78tyy7ymmw.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <83pr8vjsne.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Oct 2009 15:16:37 +0200")
Thanks for the feedback. Here is a revised version.
*** lisp/makefile.w32-in.~1.99.~ 2009-10-08 23:28:21.000000000 -0700
--- lisp/makefile.w32-in 2009-10-10 14:01:28.000000000 -0700
***************
*** 214,220 ****
@echo Directories: . $(WINS_UPDATES)
$(emacs) -l autoload \
--eval $(ARGQUOTE)(setq find-file-hook nil find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
! -f w32-batch-update-autoloads "$(lisp)/loaddefs.el" . $(WINS_UPDATES)
$(lisp)/subdirs.el:
$(MAKE) $(MFLAGS) update-subdirs
--- 214,220 ----
@echo Directories: . $(WINS_UPDATES)
$(emacs) -l autoload \
--eval $(ARGQUOTE)(setq find-file-hook nil find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
! -f w32-batch-update-autoloads "$(lisp)/loaddefs.el" $(MAKE) . $(WINS_UPDATES)
$(lisp)/subdirs.el:
$(MAKE) $(MFLAGS) update-subdirs
*** lisp/w32-fns.el.~1.97.~ 2009-09-14 19:30:52.000000000 -0700
--- lisp/w32-fns.el 2009-10-10 14:01:19.000000000 -0700
***************
*** 490,496 ****
munge command-line arguments that include file names to a horrible mess
that Emacs is unable to cope with."
(let ((generated-autoload-file
! (expand-file-name (pop command-line-args-left))))
(batch-update-autoloads)))
(defun w32-append-code-lines (orig extra)
--- 490,497 ----
munge command-line arguments that include file names to a horrible mess
that Emacs is unable to cope with."
(let ((generated-autoload-file
! (expand-file-name (pop command-line-args-left)))
! (autoload-make-program (pop command-line-args-left)))
(batch-update-autoloads)))
(defun w32-append-code-lines (orig extra)
*** lib-src/makefile.w32-in 27 Sep 2009 08:27:28 -0000 2.101
--- lib-src/makefile.w32-in 10 Oct 2009 21:13:32 -0000
***************
*** 289,294 ****
--- 289,299 ----
$(lispsource)window.elc \
$(lispsource)version.el
+ # Used by batch-update-autoloads.
+ echolisp:
+ @echo $(lisp1)
+ @echo $(lisp2)
+
# This is needed the first time we build the tree, since temacs.exe
# does not exist yet, and the DOC rule needs it to rebuild DOC whenever
# Emacs is rebuilt.
***************
*** 348,353 ****
--- 353,359 ----
- $(DEL) getopt.h
- $(DEL_TREE) $(OBJDIR)
- $(DEL) stamp_BLD
+ - $(DEL) echolisp.tmp
distclean: cleanall
- $(DEL) TAGS
*** lisp/emacs-lisp/autoload.el 7 Oct 2009 16:10:37 -0000 1.149
--- lisp/emacs-lisp/autoload.el 10 Oct 2009 21:14:02 -0000
***************
*** 679,684 ****
--- 679,687 ----
(define-obsolete-function-alias 'update-autoloads-from-directories
'update-directory-autoloads "22.1")
+ (defvar autoload-make-program (or (getenv "MAKE") "make")
+ "Name of the make program in use during the Emacs build process.")
+
;;;###autoload
(defun batch-update-autoloads ()
"Update loaddefs.el autoloads in batch mode.
***************
*** 686,694 ****
;; 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= " nil t)
--- 689,722 ----
;; For use during the Emacs build process only.
(unless autoload-excludes
(let* ((ldir (file-name-directory generated-autoload-file))
! (default-directory
! (file-name-as-directory
! (expand-file-name (if (eq system-type 'windows-nt)
! "../lib-src"
! "../src") ldir)))
! (mfile "Makefile")
! (tmpfile "echolisp.tmp")
lim)
(when (file-readable-p mfile)
+ (if (eq system-type 'windows-nt)
+ (when (ignore-errors
+ (if (file-exists-p tmpfile) (delete-file tmpfile))
+ (shell-command (format "%s echolisp > %s"
+ autoload-make-program tmpfile))
+ (file-readable-p tmpfile))
+ (with-temp-buffer
+ (insert-file-contents tmpfile)
+ (while (not (eobp))
+ (setq lim (line-end-position))
+ (while (re-search-forward "\\([^ ]+\\.el\\)c?\\>" lim t)
+ (push (expand-file-name (match-string 1))
+ autoload-excludes))
+ (forward-line 1))))
+ ;; Non-Windows platforms do not use the echolisp approach
+ ;; because the maximum safe command-line length for all
+ ;; supported platforms is unknown. Also it would seem a
+ ;; shame to split $lisp into $lisp1 etc just for the sake of
+ ;; this command (Windows requires it for other reasons).
(with-temp-buffer
(insert-file-contents mfile)
(when (re-search-forward "^lisp= " nil t)
***************
*** 696,702 ****
(while (re-search-forward "\\${lispsource}\\([^ ]+\\.el\\)c?\\>"
lim t)
(push (expand-file-name (match-string 1) ldir)
! autoload-excludes)))))))
(let ((args command-line-args-left))
(setq command-line-args-left nil)
(apply 'update-directory-autoloads args)))
--- 724,730 ----
(while (re-search-forward "\\${lispsource}\\([^ ]+\\.el\\)c?\\>"
lim t)
(push (expand-file-name (match-string 1) ldir)
! autoload-excludes))))))))
(let ((args command-line-args-left))
(setq command-line-args-left nil)
(apply 'update-directory-autoloads args)))
next prev parent reply other threads:[~2009-10-10 21:17 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1Mv3iq-0005oI-5L@monty-python.gnu.org>
2009-10-06 7:44 ` Changes in lisp/Makefile.in to skip preloaded files Eli Zaretskii
2009-10-06 9:25 ` Eli Zaretskii
2009-10-06 9:33 ` Miles Bader
2009-10-06 9:42 ` Eli Zaretskii
2009-10-06 10:14 ` Miles Bader
2009-10-06 13:12 ` Dan Nicolaescu
2009-10-06 13:45 ` Dan Nicolaescu
2009-10-06 16:20 ` Glenn Morris
2009-10-06 16:50 ` Dan Nicolaescu
2009-10-06 15:28 ` Stefan Monnier
2009-10-06 16:16 ` Glenn Morris
2009-10-06 18:41 ` Eli Zaretskii
2009-10-07 3:00 ` Glenn Morris
2009-10-07 7:23 ` Glenn Morris
2009-10-07 9:23 ` Eli Zaretskii
2009-10-07 10:00 ` Juanma Barranquero
2009-10-07 16:16 ` Glenn Morris
2009-10-08 23:08 ` Lennart Borgman
2009-10-08 23:31 ` Juanma Barranquero
2009-10-08 23:34 ` Lennart Borgman
2009-10-09 0:02 ` Juanma Barranquero
2009-10-09 0:04 ` Glenn Morris
2009-10-09 0:25 ` Juanma Barranquero
2009-10-09 11:48 ` Lennart Borgman
2009-10-10 0:50 ` ignoring autoloads in preloaded files on Windows [was Re: Changes in lisp/Makefile.in to skip preloaded files] Glenn Morris
2009-10-10 2:27 ` Juanma Barranquero
2009-10-10 3:34 ` ignoring autoloads in preloaded files on Windows Glenn Morris
2009-10-10 3:57 ` Juanma Barranquero
2009-10-10 4:17 ` Juanma Barranquero
2009-10-10 4:19 ` Juanma Barranquero
2009-10-10 5:13 ` Juanma Barranquero
2009-10-10 7:37 ` Eli Zaretskii
2009-10-13 19:16 ` Stefan Monnier
2009-10-15 6:14 ` Glenn Morris
2009-10-10 7:32 ` Eli Zaretskii
2009-10-10 11:51 ` Juanma Barranquero
2009-10-10 13:16 ` Eli Zaretskii
2009-10-10 21:17 ` Glenn Morris [this message]
2009-10-11 2:02 ` Juanma Barranquero
2009-10-11 2:36 ` Glenn Morris
2009-10-11 2:44 ` Glenn Morris
2009-10-11 3:35 ` Juanma Barranquero
2009-10-11 14:04 ` Juanma Barranquero
2009-10-07 9:57 ` Changes in lisp/Makefile.in to skip preloaded files Eli Zaretskii
2009-10-07 9:15 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=78tyy7ymmw.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lekktu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.