build: emacs-utils: Adjust ‘emacs-compile-directory’ for Emacs 29.
* guix/build/emacs-utils.scm (emacs-compile-directory): After native compilation, write the bytecode file with ‘comp-write-bytecode-file’. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
parent
506d6ce080
commit
4a00fa9bea
1 changed files with 4 additions and 8 deletions
|
@ -139,7 +139,7 @@ If native code is not supported, compile to bytecode instead."
|
||||||
(files (directory-files-recursively ,dir "\\.el$")))
|
(files (directory-files-recursively ,dir "\\.el$")))
|
||||||
(mapc
|
(mapc
|
||||||
(lambda (file)
|
(lambda (file)
|
||||||
(let (byte-to-native-output-file
|
(let (byte-to-native-output-buffer-file
|
||||||
;; First entry is the eln-cache of the homeless shelter,
|
;; First entry is the eln-cache of the homeless shelter,
|
||||||
;; second entry is the install directory.
|
;; second entry is the install directory.
|
||||||
(eln-dir (and (native-comp-available-p)
|
(eln-dir (and (native-comp-available-p)
|
||||||
|
@ -148,13 +148,9 @@ If native code is not supported, compile to bytecode instead."
|
||||||
(native-compile file
|
(native-compile file
|
||||||
(comp-el-to-eln-filename file eln-dir))
|
(comp-el-to-eln-filename file eln-dir))
|
||||||
(byte-compile-file file))
|
(byte-compile-file file))
|
||||||
;; Sadly, we can't use pcase because quasiquote works different in
|
;; After native compilation, write the bytecode file.
|
||||||
;; Emacs. See `batch-byte+native-compile' in comp.el for the
|
(unless (null byte-to-native-output-buffer-file)
|
||||||
;; actual shape of byte-to-native-output-file.
|
(comp-write-bytecode-file nil))))
|
||||||
(unless (null byte-to-native-output-file)
|
|
||||||
(rename-file (car byte-to-native-output-file)
|
|
||||||
(cdr byte-to-native-output-file)
|
|
||||||
t))))
|
|
||||||
files))
|
files))
|
||||||
#:dynamic? #t))
|
#:dynamic? #t))
|
||||||
|
|
||||||
|
|
Reference in a new issue