diff options
| author | Ken Raeburn | 2017-04-09 02:13:43 -0400 |
|---|---|---|
| committer | Ken Raeburn | 2017-04-09 02:45:45 -0400 |
| commit | 440bafef7cce6044d4f9d6ca3c3e0856ee9732b7 (patch) | |
| tree | 2f2931b8b150853e6f9a39678cf48e815e70b39e | |
| parent | e3c15342a5459135765789a7e19a70b1e655fd1e (diff) | |
| download | emacs-440bafef7cce6044d4f9d6ca3c3e0856ee9732b7.tar.gz emacs-440bafef7cce6044d4f9d6ca3c3e0856ee9732b7.zip | |
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.
| -rw-r--r-- | lisp/Makefile.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 185554ca63a..63d593c7e68 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in | |||
| @@ -179,14 +179,18 @@ $(lisp)/finder-inf.el: | |||
| 179 | # Note that we set no-update-autoloads in _generated_ leim files. | 179 | # Note that we set no-update-autoloads in _generated_ leim files. |
| 180 | # If you want to allow autoloads in such files, remove that, | 180 | # If you want to allow autoloads in such files, remove that, |
| 181 | # and make this depend on leim. | 181 | # and make this depend on leim. |
| 182 | # | ||
| 183 | # Write to a temporary file in case we're doing a parallel build and a | ||
| 184 | # CANNOT_DUMP-mode Emacs needs to read loaddefs at startup. | ||
| 182 | autoloads .PHONY: $(lisp)/loaddefs.el | 185 | autoloads .PHONY: $(lisp)/loaddefs.el |
| 183 | $(lisp)/loaddefs.el: $(LOADDEFS) | 186 | $(lisp)/loaddefs.el: $(LOADDEFS) |
| 184 | @echo Directories for loaddefs: ${SUBDIRS_ALMOST} | 187 | @echo Directories for loaddefs: ${SUBDIRS_ALMOST} |
| 185 | $(AM_V_GEN)$(emacs) -l autoload \ | 188 | $(AM_V_GEN)$(emacs) -l autoload \ |
| 186 | --eval '(setq autoload-ensure-writable t)' \ | 189 | --eval '(setq autoload-ensure-writable t)' \ |
| 187 | --eval '(setq autoload-builtin-package-versions t)' \ | 190 | --eval '(setq autoload-builtin-package-versions t)' \ |
| 188 | --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$@")))' \ | 191 | --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$(lisp)/loaddefs.tmp")))' \ |
| 189 | -f batch-update-autoloads ${SUBDIRS_ALMOST} | 192 | -f batch-update-autoloads ${SUBDIRS_ALMOST} |
| 193 | mv -f $(lisp)/loaddefs.tmp $@ | ||
| 190 | 194 | ||
| 191 | # autoloads only runs when loaddefs.el is nonexistent, although it | 195 | # autoloads only runs when loaddefs.el is nonexistent, although it |
| 192 | # generates a number of different files. Provide a force option to enable | 196 | # generates a number of different files. Provide a force option to enable |