From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: acm@muc.de, raeburn@raeburn.org, joakim@verona.se,
jan.h.d@swipnet.se, emacs-devel@gnu.org
Subject: Re: build broken: no defun org-float-time. Who's guilty, and what does he propose?
Date: Tue, 08 Sep 2009 23:14:24 -0400 [thread overview]
Message-ID: <jwv63bsstdg.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83iqft2ul1.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 08 Sep 2009 20:51:38 +0300")
>> When byte-compiling elc files with a preexisting emacs-bootstrap
>> binary, re-load all the files that were preloaded but that have been
>> changed since building emacs-bootstrap, before doing the actual
>> recompilation (i.e. when starting emacs-bootstrap, check the
>> load-history to see if any of those files have changed and reload them
>> if needed).
> Sounds like a good plan to me.
You can try the patch below (actually: first apply the second hunk,
recompile all, then install the first hunk).
Stefan
Index: lisp/Makefile.in
===================================================================
RCS file: /sources/emacs/emacs/lisp/Makefile.in,v
retrieving revision 1.188
diff -u -r1.188 Makefile.in
--- lisp/Makefile.in 27 Aug 2009 18:35:24 -0000 1.188
+++ lisp/Makefile.in 9 Sep 2009 03:13:25 -0000
@@ -1287,7 +1287,7 @@
# src/Makefile.in to rebuild a particular Lisp file, no questions asked.
compile-onefile:
@echo Compiling $(THEFILE)
- @$(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $(THEFILE)
+ @$(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f byte-compile-refresh-preloaded -f batch-byte-compile $(THEFILE)
# Files MUST be compiled one by one. If we compile several files in a
# row (i.e., in the same instance of Emacs) we can't make sure that
Index: lisp/emacs-lisp/bytecomp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/bytecomp.el,v
retrieving revision 2.257
diff -u -r2.257 bytecomp.el
--- lisp/emacs-lisp/bytecomp.el 5 Sep 2009 19:10:40 -0000 2.257
+++ lisp/emacs-lisp/bytecomp.el 9 Sep 2009 03:13:26 -0000
@@ -4362,6 +4363,24 @@
nil))))
;;;###autoload
+(defun byte-compile-refresh-preloaded ()
+ (let* ((argv0 (car command-line-args))
+ (emacs-file (executable-find argv0)))
+ (if (not (and emacs-file (file-executable-p emacs-file)))
+ (message "Can't find %s to refresh preloaded Lisp files" argv0)
+ (dolist (f (reverse load-history))
+ (setq f (car f))
+ (if (string-match "elc\\'" f) (setq f (substring f 0 -1)))
+ (when (and (file-readable-p f)
+ (file-newer-than-file-p f emacs-file))
+ (message "Reloading stale %s" (file-name-nondirectory f))
+ (condition-case nil
+ (load f 'noerror nil 'nosuffix)
+ ;; Probably shouldn't happen, but in case of an error, it seems
+ ;; at least as useful to ignore it as it is to stop compilation.
+ (error nil)))))))
+
+;;;###autoload
(defun batch-byte-recompile-directory (&optional arg)
"Run `byte-recompile-directory' on the dirs remaining on the command line.
Must be used only with `-batch', and kills Emacs on completion.
next prev parent reply other threads:[~2009-09-09 3:14 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-07 9:28 build broken: no defun org-float-time. Who's guilty, and what does he propose? Alan Mackenzie
2009-09-07 9:47 ` Andreas Schwab
2009-09-07 9:52 ` joakim
2009-09-07 10:09 ` Lennart Borgman
2009-09-07 11:37 ` joakim
2009-09-07 10:30 ` Jan D.
2009-09-07 17:42 ` Eli Zaretskii
2009-09-07 17:59 ` Ken Raeburn
2009-09-07 18:32 ` Drew Adams
2009-09-07 18:42 ` Lennart Borgman
2009-09-07 19:22 ` Ken Raeburn
2009-09-07 19:03 ` Glenn Morris
2009-09-07 19:20 ` Drew Adams
2009-09-07 20:08 ` Eli Zaretskii
2009-09-07 21:43 ` more reliable `make' Glenn Morris
2009-09-08 16:46 ` Stefan Monnier
2009-09-10 6:28 ` Glenn Morris
2009-09-10 13:37 ` Stefan Monnier
2009-09-07 20:59 ` build broken: no defun org-float-time. Who's guilty, and what does he propose? joakim
2009-09-07 21:39 ` Glenn Morris
2009-09-07 21:55 ` joakim
2009-09-07 21:13 ` Alan Mackenzie
2009-09-08 16:48 ` Stefan Monnier
2009-09-08 18:17 ` build broken: no defun org-float-time. A workaround Alan Mackenzie
2009-09-08 19:08 ` Ken Raeburn
2009-09-07 20:06 ` build broken: no defun org-float-time. Who's guilty, and what does he propose? Eli Zaretskii
2009-09-07 23:39 ` Ken Raeburn
2009-09-08 2:41 ` Stephen J. Turnbull
2009-09-08 3:20 ` Eli Zaretskii
2009-09-08 7:54 ` Ken Raeburn
2009-09-08 17:47 ` Eli Zaretskii
2009-09-08 18:32 ` Ken Raeburn
2009-09-08 17:01 ` Stefan Monnier
2009-09-08 17:51 ` Eli Zaretskii
2009-09-09 3:14 ` Stefan Monnier [this message]
2009-09-08 2:37 ` Stephen J. Turnbull
2009-09-08 3:14 ` Eli Zaretskii
2009-09-08 17:11 ` Stefan Monnier
2009-09-07 10:05 ` Miles Bader
2009-09-07 11:15 ` joakim
2009-09-07 13:35 ` Alan Mackenzie
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=jwv63bsstdg.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=acm@muc.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jan.h.d@swipnet.se \
--cc=joakim@verona.se \
--cc=raeburn@raeburn.org \
/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.