Subject: [bug#67260] [PATCH emacs-team v3 3/3] build-system: emacs: Compute relative file names.

From: Liliana Marie Prikler <[email-masked]>
Date: Sat, 25 Nov 2023 12:13:53 +0100

With the previous commit, relative file names are expanded relative to
ELN_DIR -- more or less.  To make use of this in emacs-build-system, we must
also pass relative file names.

* guix/build/emacs-build-system.scm (emacs-compile-directory): Compute the
relative file names of the files to compile.

Change-Id: I8983f80fb0fe1573e46748222403ba8873f1599f
---
 guix/build/emacs-utils.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index 8e12b5b6d4..eca42bf305 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -146,7 +146,9 @@ (define* (emacs-compile-directory dir)
                               (cadr native-comp-eln-load-path))))
             (if byte+native-compile
                 (native-compile file
-                                (comp-el-to-eln-filename file eln-dir))
+                                (comp-el-to-eln-filename
+                                 (file-relative-name file ,dir)
+                                 eln-dir))
                 (byte-compile-file file))
             ;; After native compilation, write the bytecode file.
             (unless (null byte-to-native-output-buffer-file)
-- 
2.41.0