[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/raeburn-startup d38cc1a 5/5: Write updated loaddef
From: |
Ken Raeburn |
Subject: |
[Emacs-diffs] scratch/raeburn-startup d38cc1a 5/5: Write updated loaddefs to a temporary file and rename into place. |
Date: |
Mon, 10 Apr 2017 11:59:13 -0400 (EDT) |
branch: scratch/raeburn-startup
commit d38cc1a36dba56e806e43b9fa7bb8695cf4ba758
Author: Ken Raeburn <address@hidden>
Commit: Ken Raeburn <address@hidden>
Write updated loaddefs to a temporary file and rename into place.
In a parallel build, byte compilation can be running at the same times
as loaddefs.el is being regenerated. However, in a CANNOT_DUMP build,
loaddefs.el is read at startup and must always be in a usable state.
* lisp/Makefile.in ($(lisp)/loaddefs.el): Write generated output to
loaddefs.el.new and then rename it to loaddefs.el.
---
lisp/Makefile.in | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 12bb9c7..882b404 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -176,14 +176,18 @@ $(lisp)/finder-inf.el:
# Note that we set no-update-autoloads in _generated_ leim files.
# If you want to allow autoloads in such files, remove that,
# and make this depend on leim.
+#
+# Write to a temporary file in case we're doing a parallel build and a
+# CANNOT_DUMP-mode Emacs needs to read loaddefs at startup.
autoloads .PHONY: $(lisp)/loaddefs.el
$(lisp)/loaddefs.el: $(LOADDEFS)
@echo Directories for loaddefs: ${SUBDIRS_ALMOST}
$(AM_V_GEN)$(emacs) -l autoload \
--eval '(setq autoload-ensure-writable t)' \
--eval '(setq autoload-builtin-package-versions t)' \
- --eval '(setq generated-autoload-file (expand-file-name
(unmsys--file-name "$@")))' \
+ --eval '(setq generated-autoload-file (expand-file-name
(unmsys--file-name "$(lisp)/loaddefs.tmp")))' \
-f batch-update-autoloads ${SUBDIRS_ALMOST}
+ mv -f $(lisp)/loaddefs.tmp $@
# autoloads only runs when loaddefs.el is nonexistent, although it
# generates a number of different files. Provide a force option to enable
- [Emacs-diffs] scratch/raeburn-startup updated (6d75508 -> d38cc1a), Ken Raeburn, 2017/04/10
- [Emacs-diffs] scratch/raeburn-startup 100e5b0 2/5: Load cl-macs, needed for cl-labels., Ken Raeburn, 2017/04/10
- [Emacs-diffs] scratch/raeburn-startup d38cc1a 5/5: Write updated loaddefs to a temporary file and rename into place.,
Ken Raeburn <=
- [Emacs-diffs] scratch/raeburn-startup a4231c3 4/5: Don't dump artifacts of the dump process., Ken Raeburn, 2017/04/10
- [Emacs-diffs] scratch/raeburn-startup 2ccfbba 3/5: Dump and restore empty abbrev tables., Ken Raeburn, 2017/04/10
- [Emacs-diffs] scratch/raeburn-startup 5cd1910 1/5: Update load-path and purify-flag even if not bootstrapping., Ken Raeburn, 2017/04/10