diff options
author | Glenn Morris <rgm@gnu.org> | 2017-05-06 17:58:20 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2017-05-06 17:58:20 -0700 |
commit | 7f3d63908cd05fb34347d942e435c2964cd8b249 (patch) | |
tree | 3754fe9bb3be3da23196601a2908b112e0434122 /lisp/Makefile.in | |
parent | 03d941982fbdf96260fc47d1cafbdda78c1d128e (diff) | |
download | emacs-7f3d63908cd05fb34347d942e435c2964cd8b249.tar.gz emacs-7f3d63908cd05fb34347d942e435c2964cd8b249.tar.bz2 emacs-7f3d63908cd05fb34347d942e435c2964cd8b249.zip |
Write autoloads file atomically
* lisp/emacs-lisp/autoload.el (autoload--save-buffer):
New function, to save buffer atomically.
(autoload-save-buffers, update-directory-autoloads):
Use autoload--save-buffer.
* lisp/Makefile.in ($(lisp)/loaddefs.el):
No longer write to a temp file by hand.
Diffstat (limited to 'lisp/Makefile.in')
-rw-r--r-- | lisp/Makefile.in | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lisp/Makefile.in b/lisp/Makefile.in index cbbea78a00f..1da8814370a 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -203,28 +203,17 @@ $(lisp)/finder-inf.el: # batch-update-autoloads, which only updates the autoloads whose # sources have changed. -# 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. -# (FIXME: This seems like something that batch-update-autoloads should -# do internally, then it would Just Work for all loaddefs files.) -# We start by copying an existing loaddefs.el to loaddefs.tmp to avoid -# regenerating the entire file anew, which is slow; starting from an -# almost-correct content will enable the "only update where necessary" -# feature of batch-update-autoloads. - # Use expand-file-name rather than $abs_scrdir so that Emacs does not # get confused when it compares file-names for equality. autoloads .PHONY: $(lisp)/loaddefs.el $(lisp)/loaddefs.el: gen-lisp $(LOADDEFS) @echo Directories for loaddefs: ${SUBDIRS_ALMOST} - @if test -f $@ ; then cp $@ $(lisp)/loaddefs.tmp ; fi $(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 "$(lisp)/loaddefs.tmp")))' \ + --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$@")))' \ -f batch-update-autoloads ${SUBDIRS_ALMOST} - $(top_srcdir)/build-aux/move-if-change $(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 |